listen 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/listen/adapter/base.rb +7 -0
- data/lib/listen/adapter/darwin.rb +1 -1
- data/lib/listen/adapter/linux.rb +4 -0
- data/lib/listen/backend.rb +1 -1
- data/lib/listen/directory.rb +10 -14
- data/lib/listen/record/symlink_detector.rb +1 -1
- data/lib/listen/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: 4b59a31bbecd30ab120fd1275ecf8efab7fb40b6
|
4
|
+
data.tar.gz: 112070345fa8127b6963b527c5f117de8913f40a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baa38667f71ae00c579bce1be611f463b76810ce03bc7cbb854792809edba260b1f096ab431d95de84283a2c6ee6a18b4e3218d3ed34a5ccc4b0231a23edd62c
|
7
|
+
data.tar.gz: 89e5dbc7c8872f97fc18227b243966dc5ec56a5fbecae1a4ee586652121abf943f74fdaf73a80a4487daf3c7d32e26659c5b7c6bcf38a1508c2b58056333fd2f
|
data/lib/listen/adapter/base.rb
CHANGED
@@ -85,12 +85,19 @@ module Listen
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
+
def stop
|
89
|
+
_stop
|
90
|
+
end
|
91
|
+
|
88
92
|
def self.usable?
|
89
93
|
const_get('OS_REGEXP') =~ RbConfig::CONFIG['target_os']
|
90
94
|
end
|
91
95
|
|
92
96
|
private
|
93
97
|
|
98
|
+
def _stop
|
99
|
+
end
|
100
|
+
|
94
101
|
def _timed(title)
|
95
102
|
start = Time.now.to_f
|
96
103
|
yield
|
@@ -50,7 +50,7 @@ module Listen
|
|
50
50
|
_log :debug, "fsevent: running worker: #{worker.inspect}"
|
51
51
|
worker.run
|
52
52
|
rescue
|
53
|
-
_log_exception 'fsevent: running worker failed: %s: %s'
|
53
|
+
_log_exception 'fsevent: running worker failed: %s:%s called from: %s', caller
|
54
54
|
end
|
55
55
|
|
56
56
|
def _run_workers_in_background(workers)
|
data/lib/listen/adapter/linux.rb
CHANGED
data/lib/listen/backend.rb
CHANGED
data/lib/listen/directory.rb
CHANGED
@@ -20,10 +20,16 @@ module Listen
|
|
20
20
|
rel_path, options.inspect, previous.inspect, current.inspect)
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
begin
|
24
|
+
current.each do |full_path|
|
25
|
+
type = ::File.lstat(full_path.to_s).directory? ? :dir : :file
|
26
|
+
item_rel_path = full_path.relative_path_from(dir).to_s
|
27
|
+
_change(snapshot, type, item_rel_path, options)
|
28
|
+
end
|
29
|
+
rescue Errno::ENOENT
|
30
|
+
# The directory changed meanwhile, so rescan it
|
31
|
+
current = Set.new(path.children)
|
32
|
+
retry
|
27
33
|
end
|
28
34
|
|
29
35
|
# TODO: this is not tested properly
|
@@ -66,15 +72,5 @@ module Listen
|
|
66
72
|
opts.delete(:recursive)
|
67
73
|
snapshot.invalidate(type, path, opts)
|
68
74
|
end
|
69
|
-
|
70
|
-
def self.detect_type(full_path)
|
71
|
-
# TODO: should probably check record first
|
72
|
-
stat = ::File.lstat(full_path.to_s)
|
73
|
-
stat.directory? ? :dir : :file
|
74
|
-
rescue Errno::ENOENT
|
75
|
-
# TODO: ok, it should really check the record here
|
76
|
-
# report as dir for scanning
|
77
|
-
:dir
|
78
|
-
end
|
79
75
|
end
|
80
76
|
end
|
data/lib/listen/version.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.5
|
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: 2015-11-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb-fsevent
|