lib/bolt.rb in marcinbunsch-bolt-0.2.3 vs lib/bolt.rb in marcinbunsch-bolt-0.2.4
- old
+ new
@@ -21,21 +21,32 @@
end
# read the .bolt file for configuration
def self.read_dotfile
if File.exists?('.bolt')
- $stdout.puts "** Found .bolt file"
- @@config.merge!(YAML.load_file('.bolt'))
+ $stdout.puts "** Found .bolt file" if Bolt['verbose']
+ read = YAML.load_file('.bolt')
+ @@config.merge!(read) if read
end
end
+ # read the arguments passed in cli
+ def self.read_argv
+ ARGV.each do |arg|
+ self['verbose'] = true if arg == '-v'
+ end
+ end
+
def self.start
$stdout.puts "** Starting Bolt..."
# read the dotfile
Bolt.read_dotfile
+ # read the arguments passed
+ Bolt.read_argv
+
Bolt::Listener.new
end
autoload :Mapper, 'bolt/mapper'
autoload :Runner, 'bolt/runner'
@@ -67,9 +78,11 @@
def self.files
@@noticed_files
end
+ autoload :Base, 'bolt/runners/base'
+ autoload :Cucumber, 'bolt/runners/cucumber'
autoload :TestUnit, 'bolt/runners/test_unit'
autoload :RSpec, 'bolt/runners/rspec'
end
#