listen 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +1 -1
- data/lib/listen/listener.rb +4 -3
- data/lib/listen/version.rb +1 -1
- data/listen.gemspec +2 -2
- data/spec/lib/listen/listener_spec.rb +9 -1
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968f171fec1b3b5600ac4e789f5d01ec91c8acbf
|
4
|
+
data.tar.gz: 38a66c48a8ea7a1c1a56511349c3372f2dee13a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5ac8813595d071733abef351324858ffb0f2af05a6f25ee7e629ff3e8a5d9863b3c4b7988352790986b9d08e653a152b9c8cf1d7caba9745c319a344b017dca
|
7
|
+
data.tar.gz: 4e6b618a757f09d028dd48d057e597faf345fa65e258a54b5d7b4f6edc5fd0244b31e8b7979f65dc12f7b9ea2b188f40bdf55e57ca3831627d8ea78aecdc0105
|
data/.travis.yml
CHANGED
@@ -3,6 +3,7 @@ bundler_args: --without tool
|
|
3
3
|
rvm:
|
4
4
|
- 1.9.3
|
5
5
|
- 2.0.0
|
6
|
+
- 2.1.0
|
6
7
|
- jruby-19mode
|
7
8
|
- rbx-19mode
|
8
9
|
matrix:
|
@@ -11,5 +12,5 @@ matrix:
|
|
11
12
|
- rvm: rbx-19mode
|
12
13
|
notifications:
|
13
14
|
recipients:
|
14
|
-
- thibaud@thibaud.
|
15
|
+
- thibaud@thibaud.gg
|
15
16
|
- remy@rymai.me
|
data/README.md
CHANGED
@@ -219,7 +219,7 @@ For questions please join us in our [Google group](http://groups.google.com/grou
|
|
219
219
|
|
220
220
|
## Author
|
221
221
|
|
222
|
-
|
222
|
+
[Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](https://twitter.com/thibaudgg))
|
223
223
|
|
224
224
|
## Contributors
|
225
225
|
|
data/lib/listen/listener.rb
CHANGED
@@ -6,7 +6,7 @@ require 'listen/silencer'
|
|
6
6
|
|
7
7
|
module Listen
|
8
8
|
class Listener
|
9
|
-
attr_accessor :options, :directories, :paused, :changes, :block, :thread
|
9
|
+
attr_accessor :options, :directories, :paused, :changes, :block, :thread, :stopping
|
10
10
|
attr_accessor :registry, :supervisor
|
11
11
|
|
12
12
|
RELATIVE_PATHS_WITH_MULTIPLE_DIRECTORIES_WARNING_MESSAGE = "The relative_paths option doesn't work when listening to multiple diretories."
|
@@ -39,6 +39,7 @@ module Listen
|
|
39
39
|
_signals_trap
|
40
40
|
_init_actors
|
41
41
|
unpause
|
42
|
+
@stopping = false
|
42
43
|
registry[:adapter].async.start
|
43
44
|
@thread = Thread.new { _wait_for_changes }
|
44
45
|
end
|
@@ -71,12 +72,12 @@ module Listen
|
|
71
72
|
@paused == true
|
72
73
|
end
|
73
74
|
|
74
|
-
# Returns true if Listener is
|
75
|
+
# Returns true if Listener is neither paused nor stopped
|
75
76
|
#
|
76
77
|
# @return [Boolean]
|
77
78
|
#
|
78
79
|
def listen?
|
79
|
-
@paused == false
|
80
|
+
@paused == false && @stopping == false
|
80
81
|
end
|
81
82
|
|
82
83
|
# Adds ignore patterns to the existing one (See DEFAULT_IGNORED_DIRECTORIES and DEFAULT_IGNORED_EXTENSIONS in Listen::Silencer)
|
data/lib/listen/version.rb
CHANGED
data/listen.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.version = Listen::VERSION
|
9
9
|
s.license = 'MIT'
|
10
10
|
s.author = 'Thibaud Guillaume-Gentil'
|
11
|
-
s.email = 'thibaud@thibaud.
|
11
|
+
s.email = 'thibaud@thibaud.gg'
|
12
12
|
s.homepage = 'https://github.com/guard/listen'
|
13
13
|
s.summary = 'Listen to file modifications'
|
14
14
|
s.description = 'The Listen gem listens to file modifications and notifies you about the changes. Works everywhere!'
|
@@ -25,6 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
s.add_development_dependency 'bundler', '>= 1.3.5'
|
27
27
|
s.add_development_dependency 'rake'
|
28
|
-
s.add_development_dependency 'rspec'
|
28
|
+
s.add_development_dependency 'rspec', '~> 2.14'
|
29
29
|
s.add_development_dependency 'rspec-retry'
|
30
30
|
end
|
@@ -168,17 +168,25 @@ describe Listen::Listener do
|
|
168
168
|
end
|
169
169
|
end
|
170
170
|
|
171
|
-
describe "#
|
171
|
+
describe "#listen?" do
|
172
172
|
it "returns true when not paused (false)" do
|
173
173
|
listener.paused = false
|
174
|
+
listener.stopping = false
|
174
175
|
expect(listener.listen?).to be_true
|
175
176
|
end
|
176
177
|
it "returns false when not paused (nil)" do
|
177
178
|
listener.paused = nil
|
179
|
+
listener.stopping = false
|
178
180
|
expect(listener.listen?).to be_false
|
179
181
|
end
|
180
182
|
it "returns false when paused" do
|
181
183
|
listener.paused = true
|
184
|
+
listener.stopping = false
|
185
|
+
expect(listener.listen?).to be_false
|
186
|
+
end
|
187
|
+
it "returns false when stopped" do
|
188
|
+
listener.paused = false
|
189
|
+
listener.stopping = true
|
182
190
|
expect(listener.listen?).to be_false
|
183
191
|
end
|
184
192
|
end
|
metadata
CHANGED
@@ -1,124 +1,124 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: listen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibaud Guillaume-Gentil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.15.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.15.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rb-fsevent
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.9.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.9.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rb-inotify
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.9'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.3.5
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.3.5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.14'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.14'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec-retry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: The Listen gem listens to file modifications and notifies you about the
|
112
112
|
changes. Works everywhere!
|
113
|
-
email: thibaud@thibaud.
|
113
|
+
email: thibaud@thibaud.gg
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- .gitignore
|
119
|
-
- .rspec
|
120
|
-
- .travis.yml
|
121
|
-
- .yardopts
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".travis.yml"
|
121
|
+
- ".yardopts"
|
122
122
|
- CHANGELOG.md
|
123
123
|
- CONTRIBUTING.md
|
124
124
|
- Gemfile
|
@@ -171,17 +171,17 @@ require_paths:
|
|
171
171
|
- lib
|
172
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
|
-
- -
|
174
|
+
- - ">="
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: 1.9.3
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- -
|
179
|
+
- - ">="
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.1
|
184
|
+
rubygems_version: 2.2.1
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Listen to file modifications
|