lib/bora/cli_base.rb in bora-1.6.0 vs lib/bora/cli_base.rb in bora-1.7.0

- old
+ new

@@ -1,32 +1,32 @@ -require "thor" +require 'thor' class Bora class CliBase < Thor # Fix for incorrect subcommand help. See https://github.com/erikhuda/thor/issues/261 - def self.banner(command, namespace = nil, subcommand = false) + def self.banner(command, _namespace = nil, subcommand = false) subcommand = subcommand_prefix - subcommand_str = subcommand ? " #{subcommand}" : "" + subcommand_str = subcommand ? " #{subcommand}" : '' "#{basename}#{subcommand_str} #{command.usage}" end def self.subcommand_prefix nil end no_commands do def stack(config_file, stack_name) region = options.region - cfn_stack_name = options["cfn-stack-name"] + cfn_stack_name = options['cfn-stack-name'] override_config = {} - override_config["default_region"] = region if region - override_config["cfn_stack_name"] = cfn_stack_name if cfn_stack_name + override_config['default_region'] = region if region + override_config['cfn_stack_name'] = cfn_stack_name if cfn_stack_name bora = bora(config_file, override_config) stack = bora.stack(stack_name) - if !stack + unless stack STDERR.puts "Could not find stack #{stack_name}" exit(1) end stack end @@ -34,10 +34,10 @@ def bora(config_file, override_config = {}) Bora.new(config_file_or_hash: config_file, override_config: override_config) end def params - options.params ? Hash[options.params.map { |param| param.split("=", 2) }] : {} + options.params ? Hash[options.params.map { |param| param.split('=', 2) }] : {} end end end end