bin/sb in starting_blocks-0.5.2 vs bin/sb in starting_blocks-0.6.0
- old
+ new
@@ -1,8 +1,9 @@
#!/usr/bin/env ruby
-require File.expand_path(File.dirname(__FILE__) + '/../lib/starting_blocks.rb')
+#require File.expand_path(File.dirname(__FILE__) + '/../lib/starting_blocks.rb')
+require 'starting_blocks'
options = {}
arguments = ARGV
config_file = File.expand_path('~/.sb')
@@ -33,10 +34,13 @@
if arguments.include? '--watch'
listener = StartingBlocks::Watcher.start_watching Dir, options
StartingBlocks.display "Going to sleep, waiting for changes"
listener.start
loop do
- sleep(5)
+ user_input = STDIN.gets
+ if user_input == "stop\n"
+ exit
+ end
end
elsif arguments.include? '--off'
StartingBlocks::Extensions::BlinkyLighting.turn_off!
else
results = run_all_specs options