summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-05-13 16:29:47 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-05-16 15:13:48 -0700
commit615946619b7121ab724fac1a3d78b8f4072b867d (patch)
tree073d3042f9c1cf068f1072912fd7c2ffae67b301
parent61d732231fa1d23a5e9c32bc38ec9f11430229ba (diff)
downloadpuppet-615946619b7121ab724fac1a3d78b8f4072b867d.tar.gz
puppet-615946619b7121ab724fac1a3d78b8f4072b867d.tar.xz
puppet-615946619b7121ab724fac1a3d78b8f4072b867d.zip
(#7291) The 'script' version of actions needs options argument
Ruby 1.9 is stricter about arity for for arguments passed as a block. A test case just hadn't been updated to take this into account for Face scripts (a simpler form of action), which isn't surprising since script isn't used anywhere in the code, which makes it a prime candidate for removal as far as I'm concerned, but apparently Luke wants it in there. Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>
-rwxr-xr-xspec/lib/puppet/face/huzzah.rb2
-rw-r--r--spec/lib/puppet/face/version_matching.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/puppet/face/huzzah.rb b/spec/lib/puppet/face/huzzah.rb
index 6593d358a..ab465d9e0 100755
--- a/spec/lib/puppet/face/huzzah.rb
+++ b/spec/lib/puppet/face/huzzah.rb
@@ -3,5 +3,5 @@ Puppet::Face.define(:huzzah, '2.0.1') do
copyright "Puppet Labs", 2011
license "Apache 2 license; see COPYING"
summary "life is a thing for celebration"
- script :bar do "is where beer comes from" end
+ script :bar do |options| "is where beer comes from" end
end
diff --git a/spec/lib/puppet/face/version_matching.rb b/spec/lib/puppet/face/version_matching.rb
index 52bc71dbd..bfdf5e36e 100644
--- a/spec/lib/puppet/face/version_matching.rb
+++ b/spec/lib/puppet/face/version_matching.rb
@@ -7,6 +7,6 @@ require 'puppet/face'
copyright "Puppet Labs", 2011
license "Apache 2 license; see COPYING"
summary "version matching face #{version}"
- script :version do version end
+ script :version do |options| version end
end
end