lib/rzo/option_parsing.rb in rzo-0.4.0 vs lib/rzo/option_parsing.rb in rzo-0.5.0
- old
+ new
@@ -57,11 +57,11 @@
banner BANNER
log_msg = 'Log file to write to or keywords '\
'STDOUT, STDERR {RZO_LOGTO}'
opt :logto, log_msg, default: env['RZO_LOGTO'] || 'STDERR'
opt :validate, 'Check the configuration for common issues {RZO_VALIDATE="false"}',
- default: env['RZO_VALIDATE'] == 'false' ? false : true
+ default: !(env['RZO_VALIDATE'] == 'false')
opt :syslog, 'Log to syslog', default: false, conflicts: :logto
opt :verbose, 'Set log level to INFO {RZO_VERBOSE="true"}',
default: env['RZO_VERBOSE'] == 'true'
opt :debug, 'Set log level to DEBUG {RZO_DEBUG="true"}',
default: env['RZO_DEBUG'] == 'true'
@@ -117,17 +117,17 @@
# The name of the executable, could be `rizzo` or `rzo`
NAME = File.basename($PROGRAM_NAME).freeze
# rubocop:disable Layout/IndentHeredoc
- BANNER = <<-"EOBANNER".freeze
+ BANNER = <<-BANNERMSG.freeze
usage: #{NAME} [GLOBAL OPTIONS] SUBCOMMAND [ARGS]
Sub Commands:
config Print out the combined rizzo json config
generate Initialize Vagrantfile in top control repo
roles Output all roles defined in the combined config
Global options: (Note, command line arguments supersede ENV vars in {}'s)
- EOBANNER
+ BANNERMSG
end
end