bin/rconf in rconf-0.8.3 vs bin/rconf in rconf-0.8.4
- old
+ new
@@ -35,12 +35,13 @@
opt :configurators, 'Show available configurators'
opt :update, 'Update rconf to latest version'
opt :remove, 'Remove rconf from all gemsets'
opt :config, 'Set path to configuration file', :type => :string
opt :output, 'Output file (output to STDOUT by default)', :type => :string
- opt :force, 'Run rconf even if configuration file has not changed'
- opt :verbose, 'Print debug output'
+ opt :reconfigure, 'Bypass all checks and force configuration'
+ opt :force, 'Run rconf even if configuration file has not changed'
+ opt :verbose,'Print debug output'
end
if opts[:config].nil? && !opts[:configurators] && !opts[:update] && !opts[:remove]
opts[:config] = Dir["./*#{CONFIG_EXTENSION}"]
if opts[:config].empty?
Trollop::die :config, "not used and could not find a '#{CONFIG_EXTENSION}' file in the working directory"
@@ -181,11 +182,12 @@
# options[:output](String):: Output file, optional
#
# === Return
# true:: Always return true
def configure(options)
- Profile.force if options[:force]
+ Profile.force_check if options[:force]
+ Profile.force_reconfigure if options[:reconfigure]
ProgressReporter.report_to_stdout
ProgressReporter.report_to_file(options[:output]) if options[:output]
begin
lang = Language.load(options[:config])
report_fatal("Validation of configuration file failed:\n -#{lang.validation_errors.join("\n -").map(&:red)}") unless lang.validation_errors.empty?
@@ -205,10 +207,10 @@
else
report("Successfully configured #{project} for #{platform}")
end
rescue Exception => e
raise if e.is_a?(SystemExit)
- report_fatal("Execution failed with exception '#{e.message.red}'\n#{e.backtrace.join("\n").grey}")
+ report_fatal("Execution failed with exception '#{e.message.red}'\n#{e.backtrace.join("\n")}")
ensure
lang.configurators.each { |c| report("\n!!NOTE: #{c.post_note}\n".green) if c.post_note }
end
end