Class: Puppet::Module::Tool::CLI
- Inherits:
-
Thor
- Object
- Thor
- Puppet::Module::Tool::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/puppet/module/tool/cli.rb
Overview
CLI
This class is used by the command-line program to dispatch actions.
Class Method Summary collapse
Instance Method Summary collapse
- #build(path = nil) ⇒ Object
- #changelog ⇒ Object
- #changes(path = nil) ⇒ Object
- #clean ⇒ Object
- #generate(name) ⇒ Object
- #install(name) ⇒ Object
- #repository ⇒ Object
- #search(term) ⇒ Object
- #usage ⇒ Object
- #version ⇒ Object
Class Method Details
.method_option_repository ⇒ Object
17 18 19 |
# File 'lib/puppet/module/tool/cli.rb', line 17 def self.method_option_repository method_option :puppet_module_repository, :aliases => '-r', :default => Puppet.settings[:puppet_module_repository], :desc => "Module repository to use" end |
Instance Method Details
#build(path = nil) ⇒ Object
44 45 46 |
# File 'lib/puppet/module/tool/cli.rb', line 44 def build(path = nil) Puppet::Module::Tool::Applications::Builder.run(find_module_root(path), ) end |
#changelog ⇒ Object
107 108 109 110 111 112 113 114 |
# File 'lib/puppet/module/tool/cli.rb', line 107 def changelog Puppet::Module::Tool.prepare_settings() if ENV['PAGER'] exec ENV['PAGER'], Puppet::Module::Tool.changelog_filename else puts File.read(Puppet::Module::Tool.changelog_filename) end end |
#changes(path = nil) ⇒ Object
86 87 88 |
# File 'lib/puppet/module/tool/cli.rb', line 86 def changes(path = nil) Puppet::Module::Tool::Applications::Checksummer.run(find_module_root(path), ) end |
#clean ⇒ Object
39 40 41 |
# File 'lib/puppet/module/tool/cli.rb', line 39 def clean Puppet::Module::Tool::Applications::Cleaner.run() end |
#generate(name) ⇒ Object
28 29 30 |
# File 'lib/puppet/module/tool/cli.rb', line 28 def generate(name) Puppet::Module::Tool::Applications::Generator.run(name, ) end |
#install(name) ⇒ Object
68 69 70 |
# File 'lib/puppet/module/tool/cli.rb', line 68 def install(name) Puppet::Module::Tool::Applications::Installer.run(name, ) end |
#repository ⇒ Object
91 92 93 94 |
# File 'lib/puppet/module/tool/cli.rb', line 91 def repository Puppet::Module::Tool.prepare_settings() say Puppet.settings[:puppet_module_repository] end |
#search(term) ⇒ Object
74 75 76 |
# File 'lib/puppet/module/tool/cli.rb', line 74 def search(term) Puppet::Module::Tool::Applications::Searcher.run(term, ) end |
#usage ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'lib/puppet/module/tool/cli.rb', line 97 def usage Puppet::Module::Tool.prepare_settings() if ENV['PAGER'] exec ENV['PAGER'], Puppet::Module::Tool.usage_filename else puts File.read(Puppet::Module::Tool.usage_filename) end end |