diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-24 18:55:32 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-25 08:59:08 -0700 |
| commit | 6aea116701b8e03558ef7a5a15766b267af14281 (patch) | |
| tree | 1ca02494756c402321e84e9df2f327beb0b78bcb /lib/puppet/application | |
| parent | 1af9bb232ed73f16789f465e89a0d498c39e1b78 (diff) | |
| download | puppet-6aea116701b8e03558ef7a5a15766b267af14281.tar.gz puppet-6aea116701b8e03558ef7a5a15766b267af14281.tar.xz puppet-6aea116701b8e03558ef7a5a15766b267af14281.zip | |
(#6770) Add support for version :latest.
Specifying a version of `:latest` will find the most recent version of the
named interface installed in your RUBYLIB, and attempt to load that. This is
unlikely to provide a stable dependency in the future, so should be used
sparingly, acknowledging the dangers.
Reviewed-By: Daniel Pittman
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/interface_base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/application/interface_base.rb b/lib/puppet/application/interface_base.rb index c1c02040a..841f3ca12 100644 --- a/lib/puppet/application/interface_base.rb +++ b/lib/puppet/application/interface_base.rb @@ -72,10 +72,10 @@ class Puppet::Application::InterfaceBase < Puppet::Application @type = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym # TODO: These should be configurable versions. - unless Puppet::Interface.interface?(@type, '0.0.1') - raise "Could not find version #{1} of interface '#{@type}'" + unless Puppet::Interface.interface?(@type, :latest) + raise "Could not find any version of interface '#{@type}'" end - @interface = Puppet::Interface[@type, '0.0.1'] + @interface = Puppet::Interface[@type, :latest] @format ||= @interface.default_format # We copy all of the app options to the interface. |
