starting_blocks 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e135f4612703400b5917807b46d8781740453b8
4
- data.tar.gz: 2a1784884a61ad2a2e2d5e2670b67fc1c1db5f3a
3
+ metadata.gz: cd15084e6c8d1923239d6ccf175770b85e1aa7fa
4
+ data.tar.gz: 4674757c19aa0cec5f92a0f59e8871ef32b35894
5
5
  SHA512:
6
- metadata.gz: 1c5388582f72d3c7ecd7c10ade41219e6ab393fd922657b3957f6ae6efade2cfe5a4f19f9983f42909c150c8b336a401a617d7fe148448efcc975c35f393d185
7
- data.tar.gz: 4d9a597fc7d8ea6e84e1c8f758b7141efb699bebcf93c4cbaef9b31db2e98ce2675b74e359fb21a9817548ec043a01c3fb6624152e01ef9f9babc7eb0eff415f
6
+ metadata.gz: c80bca79a9e2b5e78e77fbb4e5b48662230031d91b1b26fc75e171a09b721b48039d248640ed8e28653ff87f41c93dffd8de8b1a1f1850f5515bcd1be2285a46
7
+ data.tar.gz: 79e2f139ab809e3e33b0e9520827499ecc64ebba988473be71f5919a396e1ef1dccb4a2ed3d83b56903fbcf975b7ade7d5848e2dba5f2e2d67202d07bc4f6a54
data/bin/sb CHANGED
@@ -27,6 +27,7 @@ end
27
27
 
28
28
  if ARGV.include? '--watch'
29
29
  StartingBlocks::Watcher.start_watching Dir, options
30
+ sleep
30
31
  elsif ARGV.include? '--off'
31
32
  StartingBlocks::Extensions::BlinkyLighting.turn_off!
32
33
  else
@@ -1,3 +1,3 @@
1
1
  module StartingBlocks
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -17,12 +17,15 @@ module StartingBlocks
17
17
  @all_files = Dir['**/*']
18
18
 
19
19
  puts "Listening to: #{location}"
20
- Listen.to!(location) do |modified, added, removed|
21
- StartingBlocks::Watcher.add_it(added[0]) if added.count > 0
22
- StartingBlocks::Watcher.delete_it(removed[0]) if removed.count > 0
23
- return if @running
24
- StartingBlocks::Watcher.run_it(modified[0]) if modified.count > 0
25
- end
20
+
21
+ callback = Proc.new do |modified, added, removed|
22
+ StartingBlocks::Watcher.add_it(added[0]) if added.count > 0
23
+ StartingBlocks::Watcher.delete_it(removed[0]) if removed.count > 0
24
+ next if @running
25
+ StartingBlocks::Watcher.run_it(modified[0]) if modified.count > 0
26
+ end
27
+
28
+ ::Listen.to location, &callback
26
29
  end
27
30
 
28
31
  def add_it(file_that_changed)
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "contrast"
24
24
  spec.add_development_dependency "subtle"
25
25
  spec.add_development_dependency "mocha"
26
- spec.add_runtime_dependency 'listen', '~> 1.3.1', '>= 1.0', '< 2.0'
26
+ spec.add_runtime_dependency 'listen', '>= 2.0'
27
27
  end
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.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Cauthon
@@ -84,26 +84,14 @@ dependencies:
84
84
  name: listen
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 1.3.1
90
87
  - - '>='
91
- - !ruby/object:Gem::Version
92
- version: '1.0'
93
- - - <
94
88
  - !ruby/object:Gem::Version
95
89
  version: '2.0'
96
90
  type: :runtime
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
- - - ~>
101
- - !ruby/object:Gem::Version
102
- version: 1.3.1
103
94
  - - '>='
104
- - !ruby/object:Gem::Version
105
- version: '1.0'
106
- - - <
107
95
  - !ruby/object:Gem::Version
108
96
  version: '2.0'
109
97
  description: Faster minitest TDD.