class ConfigKit::Cli::Get
Public Class Methods
command()
click to toggle source
# File lib/config_kit/cli/commands/get.rb, line 3 def self.command; "get"; end
new(args)
click to toggle source
Calls superclass method
ConfigKit::Cli::Command::new
# File lib/config_kit/cli/commands/get.rb, line 5 def initialize(args) @app = 'all' @output = nil super(args) end
Public Instance Methods
run()
click to toggle source
# File lib/config_kit/cli/commands/get.rb, line 11 def run begin @output = ConfigKit::Manager.get(@app) 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
Private Instance Methods
options()
click to toggle source
# File lib/config_kit/cli/commands/get.rb, line 25 def options OptionParser.new %Q{Usage: #{$0} #{self.class.command} [OPTIONS] ["description"] }, 40 do |opts| opts.separator '' opts.separator 'Specific options:' opts.on('-a APP', '--app', 'Specify an app of config to create(default: all to deploy all apps)') do |app| @app = app end end end