starting_blocks 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/sb CHANGED
@@ -4,9 +4,6 @@ require File.expand_path(File.dirname(__FILE__) + '/../lib/starting_blocks.rb')
4
4
 
5
5
  options = {}
6
6
 
7
- def display value
8
- end
9
-
10
7
  arguments = ARGV
11
8
  config_file = File.expand_path('~/.sb')
12
9
 
@@ -34,8 +31,12 @@ def run_all_specs options
34
31
  end
35
32
 
36
33
  if arguments.include? '--watch'
37
- StartingBlocks::Watcher.start_watching Dir, options
38
- sleep
34
+ listener = StartingBlocks::Watcher.start_watching Dir, options
35
+ StartingBlocks.display "Going to sleep, waiting for changes"
36
+ listener.start
37
+ loop do
38
+ sleep(5)
39
+ end
39
40
  elsif arguments.include? '--off'
40
41
  StartingBlocks::Extensions::BlinkyLighting.turn_off!
41
42
  else
@@ -1,3 +1,3 @@
1
1
  module StartingBlocks
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -9,6 +9,7 @@ module StartingBlocks
9
9
 
10
10
  class << self
11
11
  def start_watching(dir, options)
12
+ StartingBlocks.display("Start watching #{dir.getwd} with #{options.inspect}")
12
13
  set_up_the_runner options
13
14
 
14
15
  location = dir.getwd
@@ -24,7 +25,7 @@ module StartingBlocks
24
25
  StartingBlocks::Watcher.run_it(modified[0]) if modified.count > 0
25
26
  end
26
27
 
27
- ::Listen.to location, &callback
28
+ ::Listen::Listener.new location, &callback
28
29
  end
29
30
 
30
31
  def add_it(file_that_changed)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starting_blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -150,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  segments:
152
152
  - 0
153
- hash: -3150958472910428791
153
+ hash: 1983398542128326990
154
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
@@ -159,10 +159,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  segments:
161
161
  - 0
162
- hash: -3150958472910428791
162
+ hash: 1983398542128326990
163
163
  requirements: []
164
164
  rubyforge_project:
165
- rubygems_version: 1.8.25
165
+ rubygems_version: 1.8.24
166
166
  signing_key:
167
167
  specification_version: 3
168
168
  summary: One command to run all tests, test watcher, etc.