diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-05 22:25:21 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-05 22:25:21 +0000 |
commit | 3446dd60bd5d7790b60b2c8f474615ed4619279f (patch) | |
tree | 3891ca03dbf162b0f9f46df67b08d35d881f9b0b | |
parent | 954a285a25c990c48d68aeb46bf866cede0af007 (diff) | |
download | puppet-3446dd60bd5d7790b60b2c8f474615ed4619279f.tar.gz puppet-3446dd60bd5d7790b60b2c8f474615ed4619279f.tar.xz puppet-3446dd60bd5d7790b60b2c8f474615ed4619279f.zip |
Last round of fixes before the next release
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2058 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | lib/puppet/metatype/closure.rb | 3 | ||||
-rw-r--r-- | lib/puppet/type/resources.rb | 6 | ||||
-rwxr-xr-x | lib/puppet/type/user.rb | 4 | ||||
-rwxr-xr-x | test/types/resources.rb | 4 |
4 files changed, 10 insertions, 7 deletions
diff --git a/lib/puppet/metatype/closure.rb b/lib/puppet/metatype/closure.rb index 8892222d5..ebff33eeb 100644 --- a/lib/puppet/metatype/closure.rb +++ b/lib/puppet/metatype/closure.rb @@ -46,7 +46,8 @@ class Puppet::Type else @managed = false states.each { |state| - if state.should and ! state.class.unmanaged + s = state.should + if s and ! state.class.unmanaged @managed = true break end diff --git a/lib/puppet/type/resources.rb b/lib/puppet/type/resources.rb index 4796435bf..806858212 100644 --- a/lib/puppet/type/resources.rb +++ b/lib/puppet/type/resources.rb @@ -85,8 +85,8 @@ Puppet::Type.newtype(:resources) do end end - # Generate any new resources we need to manage. This is pretty hackish right now, - # because it only supports purging. + # Generate any new resources we need to manage. This is pretty hackish + # right now, because it only supports purging. def generate return [] unless self.purge? hascheck = false @@ -138,4 +138,4 @@ Puppet::Type.newtype(:resources) do end end -# $Id$
\ No newline at end of file +# $Id$ diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index 5aa7c4f4b..4fb1d02cd 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -228,7 +228,9 @@ module Puppet retrieve end - @should ||= [] + unless defined? @should and @should + return nil + end if @parent[:membership] == :inclusive return @should.sort.join(",") diff --git a/test/types/resources.rb b/test/types/resources.rb index 5da04e71c..03df5e4ab 100755 --- a/test/types/resources.rb +++ b/test/types/resources.rb @@ -182,7 +182,7 @@ class TestResources < Test::Unit::TestCase else # We'll reset the limit, since we can't really guarantee that # there are any users with uid > 500 - if ! high and entry.uid > 50 + if ! high and entry.uid > 100 high = entry.name break end @@ -214,4 +214,4 @@ class TestResources < Test::Unit::TestCase end end -# $Id$
\ No newline at end of file +# $Id$ |