[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5

James Turnbull james at lovedthanlost.net
Wed Apr 8 21:48:04 UTC 2009


The following commit has been merged in the master branch:
commit 012efe359fdaebd738727e42bb9b520ac48fdecf
Author: Luke Kanies <luke at madstop.com>
Date:   Tue Feb 10 14:31:44 2009 -0600

    Fixing #1912 - gid still works with no 'should' value.
    
    This makes 'ralsh' work again with users.
    
    Signed-off-by: Luke Kanies <luke at madstop.com>

diff --git a/CHANGELOG b/CHANGELOG
index 438d97e..b12b94d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,8 @@
 0.24.8
+    Fixing #1912 - gid still works with no 'should' value fixing ralsh issues
+
+    Fixing the Rakefile to use 'git format-patch'
+
     Added README.rst file
 
     Enhancements to Stored Configuration performance
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index e6b16a9..5603886 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -100,6 +100,8 @@ module Puppet
             end
 
             def insync?(is)
+                return true unless self.should
+
                 # We know the 'is' is a number, so we need to convert the 'should' to a number,
                 # too.
                 @should.each do |value|
diff --git a/spec/unit/type/user.rb b/spec/unit/type/user.rb
index 0b1f5f9..15a3e25 100755
--- a/spec/unit/type/user.rb
+++ b/spec/unit/type/user.rb
@@ -186,6 +186,12 @@ describe user do
                 @gid = user.attrclass(:gid).new(:resource => @resource, :should => %w{foo bar})
             end
 
+            it "should return true if no 'should' values are set" do
+                @gid = user.attrclass(:gid).new(:resource => @resource)
+
+                @gid.must be_insync(500)
+            end
+
             it "should return true if any of the specified groups are equal to the current integer" do
                 Puppet::Util.expects(:gid).with("foo").returns 300
                 Puppet::Util.expects(:gid).with("bar").returns 500

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list