Class: Cheflow::Cli
- Inherits:
-
Thor
- Object
- Thor
- Cheflow::Cli
- Defined in:
- lib/cheflow/cli.rb
Constant Summary collapse
- LATEST =
"latest".freeze
Instance Method Summary collapse
- #default ⇒ Object
- #info ⇒ Object
-
#initialize(*args) ⇒ Cli
constructor
A new instance of Cli.
- #version ⇒ Object
Constructor Details
#initialize(*args) ⇒ Cli
Returns a new instance of Cli.
14 15 16 17 18 19 |
# File 'lib/cheflow/cli.rb', line 14 def initialize(*args) super(*args) Ridley.logger.level = ::Logger::INFO if [:verbose] Ridley.logger.level = ::Logger::DEBUG if [:debug] end |
Instance Method Details
#default ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/cheflow/cli.rb', line 82 def default invoke :version say say '-' * 90 invoke :info say '-' * 90 say invoke :help end |
#info ⇒ Object
70 71 72 73 74 75 76 77 78 79 |
# File 'lib/cheflow/cli.rb', line 70 def info say "#{cookbook.type} Cookbook: #{cookbook}" say cookbook.path say say "Environments: #{cookbook.node_environments.join("\n ")}" say say 'Versions:' say " Production: " + cookbook.prod_versions.join(', ') say " Development: " + cookbook.dev_versions.join(', ') end |
#version ⇒ Object
65 66 67 |
# File 'lib/cheflow/cli.rb', line 65 def version say "Cheflow v#{Cheflow::VERSION}" end |