build-files 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/build/files/monitor.rb +10 -10
- data/lib/build/files/version.rb +1 -1
- 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: b0e9df595930cd10f04835cd412e5433ac3fb397
|
4
|
+
data.tar.gz: a3caddaada1da8b22354ee6d1f96d8c8be606dbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d97a6446e7cbbabbbda3bc2f59510a982b3470e629e8ce1692b7b1edd57bf011210ec53217468b2c61a03ab0ab8c99f5ac46d6fd67186351fa6c967698c334
|
7
|
+
data.tar.gz: d27587bea9749292160c0f02b1019865ea3945066e71e35daad2c59163f161f23e41896aa0890838c519ded4d503e8343de3ce7e20ba03cb4b2e8f6a8d78ad4a
|
data/lib/build/files/monitor.rb
CHANGED
@@ -27,12 +27,12 @@ module Build
|
|
27
27
|
class Monitor
|
28
28
|
def initialize
|
29
29
|
@directories = Hash.new { |hash, key| hash[key] = Set.new }
|
30
|
-
|
30
|
+
|
31
31
|
@updated = false
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
attr :updated
|
35
|
-
|
35
|
+
|
36
36
|
# Notify the monitor that files in these directories have changed.
|
37
37
|
def update(directories, *args)
|
38
38
|
directories.each do |directory|
|
@@ -81,12 +81,12 @@ module Build
|
|
81
81
|
handle
|
82
82
|
end
|
83
83
|
end
|
84
|
-
|
84
|
+
|
85
85
|
def self.run_with_fsevent(monitor, options = {}, &block)
|
86
86
|
require 'rb-fsevent'
|
87
|
-
|
87
|
+
|
88
88
|
fsevent ||= FSEvent.new
|
89
|
-
|
89
|
+
|
90
90
|
catch(:interrupt) do
|
91
91
|
while true
|
92
92
|
fsevent.watch monitor.roots do |directories|
|
@@ -103,7 +103,7 @@ module Build
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
106
|
-
|
106
|
+
|
107
107
|
def self.run_with_polling(monitor, options = {}, &block)
|
108
108
|
catch(:interrupt) do
|
109
109
|
while true
|
@@ -115,9 +115,9 @@ module Build
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
end
|
118
|
-
|
119
|
-
def
|
120
|
-
run_with_polling(monitor, options, &block)
|
118
|
+
|
119
|
+
def run(monitor, options = {}, &block)
|
120
|
+
self.class.run_with_polling(monitor, options, &block)
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
data/lib/build/files/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|