build-files 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/build/files/monitor.rb +2 -0
- data/lib/build/files/path.rb +3 -0
- data/lib/build/files/version.rb +1 -1
- data/spec/build/files/monitor_spec.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3809d8bed57d7862f74c35cda9b396784537f26e
|
4
|
+
data.tar.gz: 1a0551a1f94d10ef77f3daf7ef23c71ed7640a74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2cf244dd15dddc8d0f9649efb3cbf82ff6b1b10687d593d3dbe6656c549c802934139906895c6f508f36cd29095157984c0eb70837fa8a58218866ce7fb756c
|
7
|
+
data.tar.gz: ade83990959c59d889dc1e77489b115536e262499036d36be0db7dd3479f7260df3e8a3d6f9029086e4319612a738a9f2d0d871b5d226e54716158fab4729565
|
data/lib/build/files/monitor.rb
CHANGED
data/lib/build/files/path.rb
CHANGED
@@ -75,6 +75,9 @@ module Build
|
|
75
75
|
# Effectively dirname and basename:
|
76
76
|
@root, _, @relative_path = full_path.rpartition(File::SEPARATOR)
|
77
77
|
end
|
78
|
+
|
79
|
+
# This improves the cost of hash/eql? slightly but the root cannot be deconstructed if it was an instance of Path.
|
80
|
+
# @root = @root.to_s
|
78
81
|
end
|
79
82
|
|
80
83
|
def components
|
data/lib/build/files/version.rb
CHANGED
@@ -51,10 +51,14 @@ module Build::Files::MonitorSpec
|
|
51
51
|
changed = state.added.include? path
|
52
52
|
end
|
53
53
|
|
54
|
+
touched = false
|
55
|
+
|
54
56
|
thread = Thread.new do
|
55
|
-
sleep 1
|
57
|
+
sleep 0.1
|
56
58
|
|
57
59
|
path.touch
|
60
|
+
|
61
|
+
touched = true
|
58
62
|
end
|
59
63
|
|
60
64
|
triggered = 0
|
@@ -62,13 +66,13 @@ module Build::Files::MonitorSpec
|
|
62
66
|
monitor.run do
|
63
67
|
triggered += 1
|
64
68
|
|
65
|
-
throw :interrupt
|
69
|
+
throw :interrupt if touched
|
66
70
|
end
|
67
71
|
|
68
72
|
thread.join
|
69
73
|
|
70
74
|
expect(changed).to be true
|
71
|
-
expect(triggered).to be
|
75
|
+
expect(triggered).to be >= 1
|
72
76
|
end
|
73
77
|
end
|
74
78
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-files
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|