diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-23 16:39:42 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-23 16:39:42 -0700 |
| commit | 0bdbe18b3f3981c1e1f661e211e20ccab1278f81 (patch) | |
| tree | c602ca1f0777073be8cf789f643296b86515eeff /lib/puppet/application | |
| parent | 635751d809af309c7c36c0c9d7a94a731ef8bd1c (diff) | |
| parent | c25fb94725c9abfb36e67938356f97823f8b605e (diff) | |
Merge branch 'tickets/master/6770'
Conflicts:
lib/puppet/interface/certificate.rb
spec/unit/application/interface_base_spec.rb
spec/unit/interface/interface_collection_spec.rb
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/configurer.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/application/interface.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/application/interface_base.rb | 7 |
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/puppet/application/configurer.rb b/lib/puppet/application/configurer.rb index 378364430..5c9af37d7 100644 --- a/lib/puppet/application/configurer.rb +++ b/lib/puppet/application/configurer.rb @@ -17,7 +17,7 @@ class Puppet::Application::Configurer < Puppet::Application end def run_command - report = Puppet::Interface.interface(:configurer).synchronize(Puppet[:certname]) - Puppet::Interface.interface(:report).submit(report) + report = Puppet::Interface[:configurer, '0.0.1'].synchronize(Puppet[:certname]) + Puppet::Interface[:report, '0.0.1'].submit(report) end end diff --git a/lib/puppet/application/interface.rb b/lib/puppet/application/interface.rb index 10823e920..f447dc30d 100644 --- a/lib/puppet/application/interface.rb +++ b/lib/puppet/application/interface.rb @@ -81,7 +81,7 @@ class Puppet::Application::Interface < Puppet::Application end def actions(indirection) - return [] unless interface = Puppet::Interface.interface(indirection) + return [] unless interface = Puppet::Interface[indirection, '0.0.1'] interface.load_actions return interface.actions.sort { |a,b| a.to_s <=> b.to_s } end diff --git a/lib/puppet/application/interface_base.rb b/lib/puppet/application/interface_base.rb index 7a31ce323..c1c02040a 100644 --- a/lib/puppet/application/interface_base.rb +++ b/lib/puppet/application/interface_base.rb @@ -71,10 +71,11 @@ class Puppet::Application::InterfaceBase < Puppet::Application @type = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym - unless Puppet::Interface.interface?(@type) - raise "Could not find interface '#{@type}'" + # TODO: These should be configurable versions. + unless Puppet::Interface.interface?(@type, '0.0.1') + raise "Could not find version #{1} of interface '#{@type}'" end - @interface = Puppet::Interface.interface(@type) + @interface = Puppet::Interface[@type, '0.0.1'] @format ||= @interface.default_format # We copy all of the app options to the interface. |
