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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28cb6340a990a1236af6107a77e1d2315f4b0a6d
4
- data.tar.gz: 7c84f25f243f6c6dbabfa2744484896a9e5b3f8d
3
+ metadata.gz: 959fbba40046ffb9eed7759c7c3169bfbd5c592a
4
+ data.tar.gz: e3a755884abdc5e53bba22a87afaf4c167ddc9d7
5
5
  SHA512:
6
- metadata.gz: 86e66ba1d8d19640984a28c0d5aeeea4fd7cfa06fb35f7815b83e3396882b092cb8ae65ddc8af53eae2f5858810aadea128f4fea95dc92357cc98142b83f6be1
7
- data.tar.gz: d6c2c1afe48406ef8db1b15f4d5f52741318728f77a07c7acbf70fdc0b348efb10db1760846edb73e052cb17c32a86c2be537eee779f478640b7571c86371d54
6
+ metadata.gz: 2f1a7354c43c2f29405183e81d5497241e3238acb3cb6b3b4987c720125b1dcc09f64ef29ef704985116008b32a63f35a53ea2d97c075a0451daa0c9904ab6e5
7
+ data.tar.gz: 73755c82578e92f4d6a2111a30445c4cd7c9a40c9399347da5d37c7ef68a7cd373d17381a1c24cff517a9936ab799ac564e3dc6ef698a73dcd4ef55b69113313
@@ -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
- DEFAULT_IGNORED_EXTENSIONS = %w[.DS_Store .tmp]
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 { |e| Regexp.escape(e) }
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
 
@@ -1,3 +1,3 @@
1
1
  module Listen
2
- VERSION = '2.7.3'
2
+ VERSION = '2.7.4'
3
3
  end
@@ -38,12 +38,18 @@ describe Listen::Silencer do
38
38
  end
39
39
  end
40
40
 
41
- Listen::Silencer::DEFAULT_IGNORED_EXTENSIONS.each do |extension|
41
+ %w(.DS_Store foo.tmp foo~ foo.rbo54321.new).each do |path|
42
42
  describe do
43
- let(:path) { pwd.join(extension) }
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
- it "silences default ignored extension: #{extension}" do
46
- expect(silencer.silenced?(path)).to be_true
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.3
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-04-28 00:00:00.000000000 Z
11
+ date: 2014-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid