starting_blocks 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/starting_blocks/version.rb +1 -1
- data/lib/starting_blocks/watcher.rb +12 -5
- data/starting_blocks.gemspec +1 -1
- metadata +5 -5
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'listen'
|
2
2
|
|
3
3
|
module StartingBlocks
|
4
4
|
module Watcher
|
@@ -9,10 +9,17 @@ module StartingBlocks
|
|
9
9
|
def start_watching(dir, options)
|
10
10
|
location = dir.getwd
|
11
11
|
all_files = Dir['**/*']
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
puts "Listening to: #{location}"
|
13
|
+
Listen.to(location) do |modified, added, removed|
|
14
|
+
if modified.count > 0
|
15
|
+
StartingBlocks::Watcher.run_it modified[0], all_files, options
|
16
|
+
end
|
17
|
+
if added.count > 0
|
18
|
+
StartingBlocks::Watcher.add_it added[0], all_files, options
|
19
|
+
end
|
20
|
+
if removed.count > 0
|
21
|
+
StartingBlocks::Watcher.delete_it removed[0], all_files, options
|
22
|
+
end
|
16
23
|
end
|
17
24
|
end
|
18
25
|
|
data/starting_blocks.gemspec
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.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -92,7 +92,7 @@ dependencies:
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
95
|
+
name: listen
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
segments:
|
149
149
|
- 0
|
150
|
-
hash:
|
150
|
+
hash: -3678462627453505781
|
151
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
152
|
none: false
|
153
153
|
requirements:
|
@@ -156,10 +156,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
segments:
|
158
158
|
- 0
|
159
|
-
hash:
|
159
|
+
hash: -3678462627453505781
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 1.8.
|
162
|
+
rubygems_version: 1.8.24
|
163
163
|
signing_key:
|
164
164
|
specification_version: 3
|
165
165
|
summary: One command to run all tests, test watcher, etc.
|