listen 2.7.11 → 2.7.12

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.
@@ -429,7 +429,7 @@ describe Listener do
429
429
 
430
430
  changes = [
431
431
  [:file, :moved_from, dir, 'ignored', cookie: 4321],
432
- [:file, :moved_to, dir, 'foo' , cookie: 4321]
432
+ [:file, :moved_to, dir, 'foo', cookie: 4321]
433
433
  ]
434
434
 
435
435
  expect(silencer).to receive(:silenced?).
@@ -285,7 +285,7 @@ describe Listen::Record do
285
285
  to eq(
286
286
  'foo' => {},
287
287
  'foo/bar' => {},
288
- 'foo/baz' => {},
288
+ 'foo/baz' => {}
289
289
  )
290
290
  expect(record.paths['/dir2']).to eq({})
291
291
  end
@@ -49,7 +49,7 @@ describe Listen::Silencer do
49
49
  end
50
50
 
51
51
  context 'when ignoring foo/bar* and *.pid' do
52
- let(:options) { { ignore: [%r{^foo/bar}, /\.pid$/] } }
52
+ let(:options) { { ignore: [/^foo\/bar/, /\.pid$/] } }
53
53
  it { should_not accept(:file, 'foo/bar/baz') }
54
54
  it { should_not accept(:file, 'foo.pid') }
55
55
  end
@@ -61,13 +61,13 @@ describe Listen::Silencer do
61
61
  end
62
62
 
63
63
  context 'when accepting only *foo*' do
64
- let(:options) { { only: %r{foo} } }
64
+ let(:options) { { only: /foo/ } }
65
65
  it { should accept(:file, 'foo') }
66
66
  it { should_not accept(:file, 'bar') }
67
67
  end
68
68
 
69
69
  context 'when accepting only foo/* and *.txt' do
70
- let(:options) { { only: [%r{^foo/}, %r{\.txt$}] } }
70
+ let(:options) { { only: [/^foo\//, /\.txt$/] } }
71
71
  it { should accept(:file, 'foo/bar.rb') }
72
72
  it { should accept(:file, 'bar.txt') }
73
73
  it { should_not accept(:file, 'bar/baz.rb') }
@@ -76,7 +76,7 @@ describe Listen::Silencer do
76
76
 
77
77
  context 'when accepting only *.pid' do
78
78
  context 'when ignoring bar*' do
79
- let(:options) { { only: /\.pid$/, ignore: %r{^bar} } }
79
+ let(:options) { { only: /\.pid$/, ignore: /^bar/ } }
80
80
  it { should_not accept(:file, 'foo.rb') }
81
81
  it { should_not accept(:file, 'bar.pid') }
82
82
  it { should accept(:file, 'foo.pid') }
@@ -3,6 +3,8 @@ require 'rubygems'
3
3
  require 'listen'
4
4
  require 'listen/tcp'
5
5
 
6
+ require 'listen/internals/thread_pool'
7
+
6
8
  def ci?
7
9
  ENV['CI']
8
10
  end
@@ -40,9 +42,11 @@ Thread.abort_on_exception = true
40
42
  Celluloid.logger.level = Logger::ERROR
41
43
 
42
44
  RSpec.configuration.before(:each) do
45
+ Listen::Internals::ThreadPool.stop
43
46
  Celluloid.boot
44
47
  end
45
48
 
46
49
  RSpec.configuration.after(:each) do
47
50
  Celluloid.shutdown
51
+ Listen::Internals::ThreadPool.stop
48
52
  end
@@ -3,7 +3,7 @@
3
3
  addition: :added,
4
4
  removal: :removed,
5
5
  queued_modification: :modified,
6
- queued_addition: :added,
6
+ queued_addition: :added
7
7
  }.each do |description, type|
8
8
 
9
9
  RSpec::Matchers.define "process_#{description}_of".to_sym do |expected|
@@ -195,9 +195,7 @@ class ListenerWrapper
195
195
 
196
196
  # Polling sleep (default: 1s)
197
197
  adapter = @listener.sync(:adapter)
198
- if adapter.is_a?(Listen::Adapter::Polling)
199
- sleep adapter.options.latency
200
- end
198
+ sleep(adapter.options.latency) if adapter.is_a?(Listen::Adapter::Polling)
201
199
 
202
200
  # Lag should include:
203
201
  # 0.1s - 0.2s if the test needs Listener queue to be processed
@@ -0,0 +1,259 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+
5
+ AccessorMethodName:
6
+ Enabled: false
7
+
8
+ ActionFilter:
9
+ Enabled: false
10
+
11
+ Alias:
12
+ Enabled: false
13
+
14
+ ArrayJoin:
15
+ Enabled: false
16
+
17
+ AsciiComments:
18
+ Enabled: false
19
+
20
+ AsciiIdentifiers:
21
+ Enabled: false
22
+
23
+ Attr:
24
+ Enabled: false
25
+
26
+ BlockNesting:
27
+ Enabled: false
28
+
29
+ CaseEquality:
30
+ Enabled: false
31
+
32
+ CharacterLiteral:
33
+ Enabled: false
34
+
35
+ ClassAndModuleChildren:
36
+ Enabled: false
37
+
38
+ ClassLength:
39
+ Enabled: false
40
+
41
+ ClassVars:
42
+ Enabled: false
43
+
44
+ Style/CollectionMethods:
45
+ PreferredMethods:
46
+ find: detect
47
+ reduce: inject
48
+ collect: map
49
+ find_all: select
50
+
51
+ ColonMethodCall:
52
+ Enabled: false
53
+
54
+ CommentAnnotation:
55
+ Enabled: false
56
+
57
+ CyclomaticComplexity:
58
+ Enabled: false
59
+
60
+ Delegate:
61
+ Enabled: false
62
+
63
+ DeprecatedHashMethods:
64
+ Enabled: false
65
+
66
+ Documentation:
67
+ Enabled: false
68
+
69
+ DotPosition:
70
+ EnforcedStyle: trailing
71
+
72
+ DoubleNegation:
73
+ Enabled: false
74
+
75
+ EachWithObject:
76
+ Enabled: false
77
+
78
+ EmptyLiteral:
79
+ Enabled: false
80
+
81
+ Encoding:
82
+ Enabled: false
83
+
84
+ EvenOdd:
85
+ Enabled: false
86
+
87
+ FileName:
88
+ Enabled: false
89
+
90
+ FlipFlop:
91
+ Enabled: false
92
+
93
+ FormatString:
94
+ Enabled: false
95
+
96
+ GlobalVars:
97
+ Enabled: false
98
+
99
+ GuardClause:
100
+ Enabled: false
101
+
102
+ IfUnlessModifier:
103
+ Enabled: false
104
+
105
+ IfWithSemicolon:
106
+ Enabled: false
107
+
108
+ InlineComment:
109
+ Enabled: false
110
+
111
+ Lambda:
112
+ Enabled: false
113
+
114
+ LambdaCall:
115
+ Enabled: false
116
+
117
+ LineEndConcatenation:
118
+ Enabled: false
119
+
120
+ LineLength:
121
+ Max: 80
122
+
123
+ MethodLength:
124
+ Enabled: false
125
+
126
+ ModuleFunction:
127
+ Enabled: false
128
+
129
+ NegatedIf:
130
+ Enabled: false
131
+
132
+ NegatedWhile:
133
+ Enabled: false
134
+
135
+ Next:
136
+ Enabled: false
137
+
138
+ NilComparison:
139
+ Enabled: false
140
+
141
+ Not:
142
+ Enabled: false
143
+
144
+ NumericLiterals:
145
+ Enabled: false
146
+
147
+ OneLineConditional:
148
+ Enabled: false
149
+
150
+ OpMethod:
151
+ Enabled: false
152
+
153
+ ParameterLists:
154
+ Enabled: false
155
+
156
+ PercentLiteralDelimiters:
157
+ Enabled: false
158
+
159
+ PerlBackrefs:
160
+ Enabled: false
161
+
162
+ PredicateName:
163
+ NamePrefixBlacklist:
164
+ - is_
165
+
166
+ Proc:
167
+ Enabled: false
168
+
169
+ RaiseArgs:
170
+ Enabled: false
171
+
172
+ RegexpLiteral:
173
+ Enabled: false
174
+
175
+ SelfAssignment:
176
+ Enabled: false
177
+
178
+ SingleLineBlockParams:
179
+ Enabled: false
180
+
181
+ SingleLineMethods:
182
+ Enabled: false
183
+
184
+ SignalException:
185
+ Enabled: false
186
+
187
+ SpecialGlobalVars:
188
+ Enabled: false
189
+
190
+ StringLiterals:
191
+ EnforcedStyle: double_quotes
192
+
193
+ VariableInterpolation:
194
+ Enabled: false
195
+
196
+ TrailingComma:
197
+ Enabled: false
198
+
199
+ TrivialAccessors:
200
+ Enabled: false
201
+
202
+ VariableInterpolation:
203
+ Enabled: false
204
+
205
+ WhenThen:
206
+ Enabled: false
207
+
208
+ WhileUntilModifier:
209
+ Enabled: false
210
+
211
+ WordArray:
212
+ Enabled: false
213
+
214
+ # Lint
215
+
216
+ AmbiguousOperator:
217
+ Enabled: false
218
+
219
+ AmbiguousRegexpLiteral:
220
+ Enabled: false
221
+
222
+ AssignmentInCondition:
223
+ Enabled: false
224
+
225
+ ConditionPosition:
226
+ Enabled: false
227
+
228
+ DeprecatedClassMethods:
229
+ Enabled: false
230
+
231
+ ElseLayout:
232
+ Enabled: false
233
+
234
+ HandleExceptions:
235
+ Enabled: false
236
+
237
+ InvalidCharacterLiteral:
238
+ Enabled: false
239
+
240
+ LiteralInCondition:
241
+ Enabled: false
242
+
243
+ LiteralInInterpolation:
244
+ Enabled: false
245
+
246
+ Loop:
247
+ Enabled: false
248
+
249
+ ParenthesesAsGroupedExpression:
250
+ Enabled: false
251
+
252
+ RequireParentheses:
253
+ Enabled: false
254
+
255
+ UnderscorePrefixedVariableName:
256
+ Enabled: false
257
+
258
+ Void:
259
+ Enabled: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listen
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.11
4
+ version: 2.7.12
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: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2014-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid
@@ -131,8 +131,10 @@ extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
+ - ".hound.yml"
134
135
  - ".rspec"
135
136
  - ".rubocop.yml"
137
+ - ".rubocop_todo.yml"
136
138
  - ".travis.yml"
137
139
  - ".yardopts"
138
140
  - CHANGELOG.md
@@ -142,6 +144,7 @@ files:
142
144
  - LICENSE.txt
143
145
  - README.md
144
146
  - Rakefile
147
+ - TROUBLESHOOTING.md
145
148
  - bin/listen
146
149
  - lib/listen.rb
147
150
  - lib/listen/adapter.rb
@@ -156,6 +159,8 @@ files:
156
159
  - lib/listen/cli.rb
157
160
  - lib/listen/directory.rb
158
161
  - lib/listen/file.rb
162
+ - lib/listen/internals/logging.rb
163
+ - lib/listen/internals/thread_pool.rb
159
164
  - lib/listen/listener.rb
160
165
  - lib/listen/options.rb
161
166
  - lib/listen/queue_optimizer.rb
@@ -190,6 +195,7 @@ files:
190
195
  - spec/support/acceptance_helper.rb
191
196
  - spec/support/fixtures_helper.rb
192
197
  - spec/support/platform_helper.rb
198
+ - vendor/hound/config/style_guides/ruby.yml
193
199
  homepage: https://github.com/guard/listen
194
200
  licenses:
195
201
  - MIT