Class: ConfigKit::Cli::Describe
- Defined in:
- lib/config_kit/cli/commands/describe.rb
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Describe
constructor
A new instance of Describe.
- #run ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(args) ⇒ Describe
Returns a new instance of Describe.
5 6 7 8 9 10 |
# File 'lib/config_kit/cli/commands/describe.rb', line 5 def initialize(args) @app = 'idc' @output = nil args << ['-a', @app] unless args.include?('-a') super(args) end |
Class Method Details
.command ⇒ Object
3 |
# File 'lib/config_kit/cli/commands/describe.rb', line 3 def self.command; "describe"; end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/config_kit/cli/commands/describe.rb', line 12 def run begin @output = ConfigKit::Manager.describe(@app, @version) pp @output rescue ConfigKit::Cli::Command::CommandFailure raise rescue => e ConfigKit.logger.error "Unexpected error attempting to get config data #{@uri} in env #{@env} for #{@app.nil? ? 'all' : @app}" ConfigKit.logger.debug "#{e}: #{e.backtrace.join("\n ")}" raise ConfigKit::Cli::Command::CommandFailure.new(e.to_s) end end |