diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-07-21 16:43:16 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-07-22 13:29:32 -0700 |
| commit | 532c4f37e4f8289cf4a9871ebc0cb5086c2ba26a (patch) | |
| tree | b8e682f621a8974874d79c60a9562611bd6e21b0 /spec/lib/puppet/face | |
| parent | 2cd3bc47993fbd32a77ca9dfdd51353f2dfbcb58 (diff) | |
| download | puppet-532c4f37e4f8289cf4a9871ebc0cb5086c2ba26a.tar.gz puppet-532c4f37e4f8289cf4a9871ebc0cb5086c2ba26a.tar.xz puppet-532c4f37e4f8289cf4a9871ebc0cb5086c2ba26a.zip | |
(#7184) Load the core of obsolete versions of Faces.
When we define an action on an older version of a Face, we must be sure to
directly load the core of that version, not just define it with the external
Action(s) that it had.
Otherwise we break our contract, which is that any core Actions for a specific
version will be available to your external Action for as long as we support
that core version.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'spec/lib/puppet/face')
| -rwxr-xr-x | spec/lib/puppet/face/1.0.0/huzzah.rb | 9 | ||||
| -rwxr-xr-x | spec/lib/puppet/face/huzzah.rb | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/puppet/face/1.0.0/huzzah.rb b/spec/lib/puppet/face/1.0.0/huzzah.rb new file mode 100755 index 000000000..00f20f096 --- /dev/null +++ b/spec/lib/puppet/face/1.0.0/huzzah.rb @@ -0,0 +1,9 @@ +require 'puppet/face' +Puppet::Face.define(:huzzah, '1.0.0') do + copyright "Puppet Labs", 2011 + license "Apache 2 license; see COPYING" + summary "life is a thing for celebration" + script :obsolete_in_core do |_| "you are in obsolete core now!" end + + script :call_newer do method_on_newer end +end diff --git a/spec/lib/puppet/face/huzzah.rb b/spec/lib/puppet/face/huzzah.rb index ab465d9e0..47cc3f32c 100755 --- a/spec/lib/puppet/face/huzzah.rb +++ b/spec/lib/puppet/face/huzzah.rb @@ -4,4 +4,6 @@ Puppet::Face.define(:huzzah, '2.0.1') do license "Apache 2 license; see COPYING" summary "life is a thing for celebration" script :bar do |options| "is where beer comes from" end + + script :call_older do method_on_older end end |
