From efca35cbea836fac954fb655d76493f03b36e96f Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 8 Feb 2011 16:24:30 -0800 Subject: Finishing migration from puppet repo The whole system seems to work again, as long as you run it against 2.6.next. Signed-off-by: Luke Kanies --- lib/puppet/application/data.rb | 13 +++++++++++-- lib/puppet/application/data_baseclass.rb | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/puppet/application') diff --git a/lib/puppet/application/data.rb b/lib/puppet/application/data.rb index cfbf4305a..8d98d4416 100644 --- a/lib/puppet/application/data.rb +++ b/lib/puppet/application/data.rb @@ -52,6 +52,8 @@ class Puppet::Application::Data < Puppet::Application def setup Puppet::Util::Log.newdestination :console + load_applications # Call this to load all of the apps + @verb, @arguments = command_line.args @arguments ||= [] @@ -77,8 +79,15 @@ class Puppet::Application::Data < Puppet::Application end def actions(indirection) - return [] unless app = Puppet::Application.find(indirection) - return app.actions.sort { |a,b| a.to_s <=> b.to_s } + return [] unless interface = Puppet::Interface.interface(indirection) + interface.load_actions + return interface.actions.sort { |a,b| a.to_s <=> b.to_s } + end + + def load_applications + command_line.available_subcommands.each do |app| + command_line.require_application app + end end end diff --git a/lib/puppet/application/data_baseclass.rb b/lib/puppet/application/data_baseclass.rb index 95142b8ba..3f498f56f 100644 --- a/lib/puppet/application/data_baseclass.rb +++ b/lib/puppet/application/data_baseclass.rb @@ -60,6 +60,7 @@ class Puppet::Application::DataBaseclass < Puppet::Application @type = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym @interface = Puppet::Interface.interface(@type).new + @interface.format = format if format validate -- cgit