build-files 0.2.0 → 0.2.1

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: dea84d68b0394c651e2593a20dc08b7f7631e4b3
4
- data.tar.gz: 40cf1afa1b7bbfb740b73383529137d8810456c6
3
+ metadata.gz: b0e9df595930cd10f04835cd412e5433ac3fb397
4
+ data.tar.gz: a3caddaada1da8b22354ee6d1f96d8c8be606dbf
5
5
  SHA512:
6
- metadata.gz: c7a42fa79f16d31f4376b9dd86ca98ed794e14955b100cb844caead310f2f84c5d0b99e5d0060df9f0d1d7361f8e5d61e46a428adcbda4af4fe96e90c4c05d9c
7
- data.tar.gz: 87603e85d029f54e8613348034c6846f3ef9a6ef19699fd3680de8b44ff7410d926abe8ef1a45b52de6ff258b329ebcc745c2ef7abc3de1b098fc8edb643f5b7
6
+ metadata.gz: 88d97a6446e7cbbabbbda3bc2f59510a982b3470e629e8ce1692b7b1edd57bf011210ec53217468b2c61a03ab0ab8c99f5ac46d6fd67186351fa6c967698c334
7
+ data.tar.gz: d27587bea9749292160c0f02b1019865ea3945066e71e35daad2c59163f161f23e41896aa0890838c519ded4d503e8343de3ce7e20ba03cb4b2e8f6a8d78ad4a
@@ -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 self.run(monitor, options = {}, &block)
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
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Build
22
22
  module Files
23
- VERSION = "0.2.0"
23
+ VERSION = "0.2.1"
24
24
  end
25
25
  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.2.0
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-04 00:00:00.000000000 Z
11
+ date: 2014-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler