automated-commands 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
data/tasks/watch.rake
CHANGED
@@ -5,16 +5,26 @@ namespace :automated_commands do
|
|
5
5
|
require 'pathname'
|
6
6
|
|
7
7
|
%x[mkfifo ./test_pipe]
|
8
|
-
at_exit {
|
9
|
-
%x[rm ./test_pipe]
|
10
|
-
}
|
8
|
+
at_exit { %x[rm ./test_pipe] }
|
11
9
|
|
12
|
-
|
10
|
+
p "listening for changes in your tests"
|
11
|
+
|
12
|
+
Listen.to('test', filter: /.*_test\.rb$/, latency: 0.2) do |modified, added, removed|
|
13
13
|
output = open("test_pipe", "w+")
|
14
|
-
path = Pathname.new(modified.first)
|
15
14
|
|
16
|
-
|
17
|
-
|
15
|
+
(modified || []).each do |modified_file|
|
16
|
+
path = Pathname.new(modified_file)
|
17
|
+
|
18
|
+
output.puts path.relative_path_from(Pathname.pwd)
|
19
|
+
output.flush
|
20
|
+
end
|
21
|
+
|
22
|
+
(added || []).each do |added_file|
|
23
|
+
path = Pathname.new(added_file)
|
24
|
+
|
25
|
+
output.puts path.relative_path_from(Pathname.pwd)
|
26
|
+
output.flush
|
27
|
+
end
|
18
28
|
end
|
19
29
|
end
|
20
30
|
end
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: automated-commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Raphael Randschau
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|