diff options
Diffstat (limited to 'lib/puppet/application')
-rw-r--r-- | lib/puppet/application/apply.rb | 8 | ||||
-rw-r--r-- | lib/puppet/application/cert.rb | 2 | ||||
-rw-r--r-- | lib/puppet/application/describe.rb | 2 | ||||
-rw-r--r-- | lib/puppet/application/doc.rb | 4 | ||||
-rw-r--r-- | lib/puppet/application/filebucket.rb | 2 | ||||
-rw-r--r-- | lib/puppet/application/resource.rb | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index 88385f0a0..fde0c9b8d 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -66,10 +66,10 @@ class Puppet::Application::Apply < Puppet::Application def parseonly # Set our code or file to use. - if options[:code] or Puppet::Util::CommandLine.args.length == 0 + if options[:code] or command_line.args.length == 0 Puppet[:code] = options[:code] || STDIN.read else - Puppet[:manifest] = Puppet::Util::CommandLine.args.shift + Puppet[:manifest] = command_line.args.shift end begin Puppet::Resource::TypeCollection.new(Puppet[:environment]).perform_initial_import @@ -82,10 +82,10 @@ class Puppet::Application::Apply < Puppet::Application def main # Set our code or file to use. - if options[:code] or Puppet::Util::CommandLine.args.length == 0 + if options[:code] or command_line.args.length == 0 Puppet[:code] = options[:code] || STDIN.read else - Puppet[:manifest] = Puppet::Util::CommandLine.args.shift + Puppet[:manifest] = command_line.args.shift end # Collect our facts. diff --git a/lib/puppet/application/cert.rb b/lib/puppet/application/cert.rb index 92da03ca7..a4ee5fef3 100644 --- a/lib/puppet/application/cert.rb +++ b/lib/puppet/application/cert.rb @@ -44,7 +44,7 @@ class Puppet::Application::Cert < Puppet::Application if @all hosts = :all else - hosts = Puppet::Util::CommandLine.args.collect { |h| puts h; h.downcase } + hosts = command_line.args.collect { |h| puts h; h.downcase } end begin @ca.apply(:revoke, :to => hosts) if @mode == :destroy diff --git a/lib/puppet/application/describe.rb b/lib/puppet/application/describe.rb index 45f017a48..ae33fb92a 100644 --- a/lib/puppet/application/describe.rb +++ b/lib/puppet/application/describe.rb @@ -203,7 +203,7 @@ class Puppet::Application::Describe < Puppet::Application end def setup - options[:types] = Puppet::Util::CommandLine.args.dup + options[:types] = command_line.args.dup unless options[:list] || options[:types].size > 0 handle_help(nil) end diff --git a/lib/puppet/application/doc.rb b/lib/puppet/application/doc.rb index 295cd6771..74cde98bd 100644 --- a/lib/puppet/application/doc.rb +++ b/lib/puppet/application/doc.rb @@ -70,7 +70,7 @@ class Puppet::Application::Doc < Puppet::Application files += env.modulepath files << File.dirname(env[:manifest]) end - files += Puppet::Util::CommandLine.args + files += command_line.args Puppet.info "scanning: %s" % files.inspect Puppet.settings.setdefaults("puppetdoc", "document_all" => [false, "Document all resources"] @@ -167,7 +167,7 @@ class Puppet::Application::Doc < Puppet::Application def setup # sole manifest documentation - if Puppet::Util::CommandLine.args.size > 0 + if command_line.args.size > 0 options[:mode] = :rdoc @manifest = true end diff --git a/lib/puppet/application/filebucket.rb b/lib/puppet/application/filebucket.rb index ddc46e394..8e930f5e4 100644 --- a/lib/puppet/application/filebucket.rb +++ b/lib/puppet/application/filebucket.rb @@ -15,7 +15,7 @@ class Puppet::Application::Filebucket < Puppet::Application attr :args def run_command - @args = Puppet::Util::CommandLine.args + @args = command_line.args command = args.shift return send(command) if %w[get backup restore].include? command help diff --git a/lib/puppet/application/resource.rb b/lib/puppet/application/resource.rb index 52320e7a1..6a8c4e47c 100644 --- a/lib/puppet/application/resource.rb +++ b/lib/puppet/application/resource.rb @@ -38,7 +38,7 @@ class Puppet::Application::Resource < Puppet::Application end def main - args = Puppet::Util::CommandLine.args + args = command_line.args type = args.shift or raise "You must specify the type to display" typeobj = Puppet::Type.type(type) or raise "Could not find type #{type}" name = args.shift |