bin/sb in starting_blocks-0.5.1 vs bin/sb in starting_blocks-0.5.2
- old
+ new
@@ -2,13 +2,10 @@
require File.expand_path(File.dirname(__FILE__) + '/../lib/starting_blocks.rb')
options = {}
-def display value
-end
-
arguments = ARGV
config_file = File.expand_path('~/.sb')
if File.exists?(config_file)
additional_arguments = File.read(config_file).split(' ')
@@ -32,11 +29,15 @@
StartingBlocks::Runner.new(options).run_files files
end
if arguments.include? '--watch'
- StartingBlocks::Watcher.start_watching Dir, options
- sleep
+ listener = StartingBlocks::Watcher.start_watching Dir, options
+ StartingBlocks.display "Going to sleep, waiting for changes"
+ listener.start
+ loop do
+ sleep(5)
+ end
elsif arguments.include? '--off'
StartingBlocks::Extensions::BlinkyLighting.turn_off!
else
results = run_all_specs options