listen 2.7.3 → 2.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/listen/silencer.rb +6 -2
- data/lib/listen/version.rb +1 -1
- data/spec/lib/listen/silencer_spec.rb +10 -4
- 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: 959fbba40046ffb9eed7759c7c3169bfbd5c592a
|
4
|
+
data.tar.gz: e3a755884abdc5e53bba22a87afaf4c167ddc9d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1a7354c43c2f29405183e81d5497241e3238acb3cb6b3b4987c720125b1dcc09f64ef29ef704985116008b32a63f35a53ea2d97c075a0451daa0c9904ab6e5
|
7
|
+
data.tar.gz: 73755c82578e92f4d6a2111a30445c4cd7c9a40c9399347da5d37c7ef68a7cd373d17381a1c24cff517a9936ab799ac564e3dc6ef698a73dcd4ef55b69113313
|
data/lib/listen/silencer.rb
CHANGED
@@ -6,7 +6,8 @@ module Listen
|
|
6
6
|
DEFAULT_IGNORED_DIRECTORIES = %w[.bundle .git .hg .rbx .svn bundle log tmp vendor/ruby vendor/bundle]
|
7
7
|
|
8
8
|
# The default list of files that get ignored.
|
9
|
-
|
9
|
+
KATE_TEMP_FILES = /\..*[a-z]\d+\.new/
|
10
|
+
DEFAULT_IGNORED_EXTENSIONS = %w(.DS_Store .tmp ~) + [KATE_TEMP_FILES]
|
10
11
|
|
11
12
|
attr_accessor :listener, :only_patterns, :ignore_patterns
|
12
13
|
|
@@ -52,7 +53,10 @@ module Listen
|
|
52
53
|
end
|
53
54
|
|
54
55
|
def _default_ignored_extensions_patterns
|
55
|
-
ignored_extensions = DEFAULT_IGNORED_EXTENSIONS.map
|
56
|
+
ignored_extensions = DEFAULT_IGNORED_EXTENSIONS.map do
|
57
|
+
|e| e.is_a?(Regexp) ? e : Regexp.escape(e)
|
58
|
+
end
|
59
|
+
|
56
60
|
%r{(?:#{ignored_extensions.join('|')})$}
|
57
61
|
end
|
58
62
|
|
data/lib/listen/version.rb
CHANGED
@@ -38,12 +38,18 @@ describe Listen::Silencer do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
|
41
|
+
%w(.DS_Store foo.tmp foo~ foo.rbo54321.new).each do |path|
|
42
42
|
describe do
|
43
|
-
|
43
|
+
it "by default silences files like: #{path}" do
|
44
|
+
expect(silencer.silenced?(pwd.join(path))).to be_true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
44
48
|
|
45
|
-
|
46
|
-
|
49
|
+
%w(foo.tmpl file.new file54321.new).each do |path|
|
50
|
+
describe do
|
51
|
+
it "by default does not silence files like: #{path}" do
|
52
|
+
expect(silencer.silenced?(pwd.join(path))).to be_false
|
47
53
|
end
|
48
54
|
end
|
49
55
|
end
|
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.
|
4
|
+
version: 2.7.4
|
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-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid
|