Class: ConfigKit::Cli::Rollback
- Defined in:
- lib/config_kit/cli/commands/rollback.rb
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Rollback
constructor
A new instance of Rollback.
- #run ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(args) ⇒ Rollback
Returns a new instance of Rollback.
5 6 7 8 |
# File 'lib/config_kit/cli/commands/rollback.rb', line 5 def initialize(args) @app = nil super(args) end |
Class Method Details
.command ⇒ Object
3 |
# File 'lib/config_kit/cli/commands/rollback.rb', line 3 def self.command; "rollback"; end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/config_kit/cli/commands/rollback.rb', line 10 def run begin @output = ConfigKit::Manager.rollback(@app, @version) pp @output.to_h.to_json 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 |