lib/console_runner.rb in console_runner-0.1.27 vs lib/console_runner.rb in console_runner-0.1.28
- old
+ new
@@ -2,15 +2,15 @@
require 'command_line_parser'
require 'console_runner/version'
# console_runner logic is here
module ConsoleRunner
- SEPARATOR = '==================================='.freeze
+ CommandLineParser.debug = ARGV.any? { |a| %w(-d --debug).include? a }
+ SEPARATOR = '==================================='.freeze
begin
start_time = Time.now
success_status = true
puts "#{SEPARATOR}\nStart Time: #{start_time}\n#{SEPARATOR}".blue
-
file_from_arg = ARGV.shift
raise ConsoleRunnerError, 'Specify file to be executed' unless file_from_arg
file_path = File.realpath file_from_arg
file_parser = FileParser.new(file_path)
next_arguments = ARGV.dup
\ No newline at end of file