listen 2.7.1 → 2.7.2

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: 15c303b4292e7a0d6c1406f08354026a6afce90d
4
- data.tar.gz: 72470e17d6c39b4c72b46685eec317db75d2478a
3
+ metadata.gz: c2b82792fadddb794945b7796d42a8c35d3dabfc
4
+ data.tar.gz: e5f725bb1c8446f51fd54285c0c48f26d0740a67
5
5
  SHA512:
6
- metadata.gz: 69afc0f874fe99bcb8c43ba6c42264219484ef59802f6a1daa8ebf84d5b2134b5b3ed29a5570a07358de710d343d3b0b2ff0420d76adc9c5b2987f4e0fc99d84
7
- data.tar.gz: d63742fbc8b428ca7837a5d9549545d061ea1d0351b89e475be9614c7eb67872247b187e1b777eda93ce16a979905350a54d23fa0032f5f751c7cfe8fc316340
6
+ metadata.gz: 7441734e63b119c9139b4272c512a7bd34a6ab7e507dfdf99c7483a70108959fafc96c1e0b489dafe9648b41f77b58141efbb3c91c14889291590d03298319d3
7
+ data.tar.gz: 0d00f5195e985526a4697dda89d1e1015f2b39f0e2c4c9b776a91f92ecfae13f8ce4e207b0f17ee80bd5e024c3ff75d5b816a6877324d9c6d6f96d8aa9590e6b
@@ -14,7 +14,7 @@ module Listen
14
14
  # The message to show when the limit of inotify watchers is not enough
15
15
  #
16
16
  INOTIFY_LIMIT_MESSAGE = <<-EOS.gsub(/^\s*/, '')
17
- Listen error: unable to monitor directories for changes.
17
+ FATAL: Listen error: unable to monitor directories for changes.
18
18
 
19
19
  Please head to https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
20
20
  for information on how to solve this issue.
@@ -33,6 +33,8 @@ module Listen
33
33
  worker = _init_worker
34
34
  Thread.new { worker.run }
35
35
  rescue Errno::ENOSPC
36
+ STDERR.puts INOTIFY_LIMIT_MESSAGE
37
+ STDERR.flush
36
38
  abort(INOTIFY_LIMIT_MESSAGE)
37
39
  end
38
40
 
@@ -1,3 +1,3 @@
1
1
  module Listen
2
- VERSION = '2.7.1'
2
+ VERSION = '2.7.2'
3
3
  end
@@ -17,6 +17,26 @@ describe Listen::Adapter::Linux do
17
17
  expect(defined?(INotify)).to be_true
18
18
  end
19
19
  end
20
+
21
+ # workaround: Celluloid ignores SystemExit exception messages
22
+ describe "inotify limit message" do
23
+ let(:adapter) { described_class.new(listener) }
24
+ let(:expected_message) { described_class.const_get('INOTIFY_LIMIT_MESSAGE') }
25
+
26
+ before do
27
+ allow_any_instance_of(INotify::Notifier).to receive(:watch).and_raise(Errno::ENOSPC)
28
+ allow(listener).to receive(:directories) { [ 'foo/dir' ] }
29
+ end
30
+
31
+ it "should be show before calling abort" do
32
+ expect(STDERR).to receive(:puts).with(expected_message)
33
+
34
+ # Expect RuntimeError here, for the sake of unit testing (actual
35
+ # handling depends on Celluloid supervisor setup, which is beyond the
36
+ # scope of adapter tests)
37
+ expect{adapter.start}.to raise_error RuntimeError, expected_message
38
+ end
39
+ end
20
40
  end
21
41
 
22
42
  if darwin?
@@ -24,8 +24,9 @@ end
24
24
 
25
25
  def relative_path(changes)
26
26
  changes.map do |change|
27
- [paths].flatten.each { |path| change.gsub!(%r{#{path.to_s}/}, '') }
28
- change
27
+ unfrozen_copy = change.dup
28
+ [paths].flatten.each { |path| unfrozen_copy.gsub!(%r{#{path.to_s}/}, '') }
29
+ unfrozen_copy
29
30
  end
30
31
  end
31
32
 
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.1
4
+ version: 2.7.2
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-03-14 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  requirements: []
209
209
  rubyforge_project:
210
- rubygems_version: 2.2.1
210
+ rubygems_version: 2.2.2
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: Listen to file modifications