spellr 0.7.0 → 0.7.1

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
  SHA256:
3
- metadata.gz: c712613dec647be23db6a02ac4612afe8ec9af7347bb5aae0b6068f4c8b609e6
4
- data.tar.gz: ccb5af415199801c8d68b278105cb93156e3ab2d8d73c2a0a5221a7307e39102
3
+ metadata.gz: 0f536be7fdf055e77cf278ccc2b4980da48bcbaae1d821bdf581df338c6ffa4e
4
+ data.tar.gz: 8c33f240c847e4b9557f2c02c4804b8e1e375f65135c0f5801165fd9ce3fe53c
5
5
  SHA512:
6
- metadata.gz: e2003cd517d9e915d8e154474bf404ee64c87796e7a59ea47710e3963c681e90b52cb6a93be80ca1ccfe810062b4882f344b0ac2ba04c6f85ab9685f3bb0bcc6
7
- data.tar.gz: 1e8144ed3b9f86b194e91952acfac4536ad432cd47ee2ccadc22dbbc6d5f3d126f6db0a7a219a31a3b0dfb5ff8d7627b470f9ea32c91868edf0e23f102678e48
6
+ metadata.gz: 9bed7f3fd56ca81cde5796ee61e96caeebe1e4bb0456d50ed9c3e7e34ab794f10130a13b668ee8c9eb175d5f5a8c63defc7c308fed3d6e2f79e431a396419839
7
+ data.tar.gz: 7ac9605ef35b4e66c98c919102098e3e59c901a3f019674254c00c2769cb1f852878e00bba9c60ce666ce891aaa848b63d94ec8efd3607498b91801acaa573d6
@@ -1,3 +1,6 @@
1
+ # v0.7.1
2
+ - relax fast_ignore requirement
3
+
1
4
  # v0.7.0
2
5
  - dry_run checks config validity
3
6
  - require fast_ignore 0.6.0
@@ -8,6 +8,8 @@ module Spellr
8
8
  file.is_a?(Spellr::File) ? file : Spellr::File.new(file)
9
9
  end
10
10
 
11
+ # don't use FastIgnore shebang handling
12
+ # because i use lots of different FastIgnore instances and each would to open the files.
11
13
  def hashbang
12
14
  @hashbang ||= begin
13
15
  return if extname != ''
@@ -15,6 +15,9 @@ module Spellr
15
15
  @key = key
16
16
  @includes = includes
17
17
  @hashbangs = hashbangs
18
+ unless hashbangs.empty?
19
+ @hashbang_pattern = /\A#!.*\b(?:#{hashbangs.map { |s| Regexp.escape(s) }.join('|')})\b/
20
+ end
18
21
  @locales = Array(locale)
19
22
  @addable = addable
20
23
  end
@@ -41,12 +44,12 @@ module Spellr
41
44
  private
42
45
 
43
46
  def matches_hashbangs?(file)
44
- return @includes.empty? if @hashbangs.empty?
47
+ return @includes.empty? unless @hashbang_pattern
45
48
 
46
49
  file = Spellr::File.wrap(file)
47
50
  return unless file.hashbang
48
51
 
49
- @hashbangs.any? { |h| file.hashbang.include?(h) }
52
+ @hashbang_pattern.match?(file.hashbang)
50
53
  end
51
54
 
52
55
  def matches_includes?(file)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spellr
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
@@ -40,6 +40,6 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency 'tty_string', '>= 0.2.1'
41
41
  spec.add_development_dependency 'webmock', '~> 3.8'
42
42
 
43
- spec.add_dependency 'fast_ignore', '~> 0.6.0'
43
+ spec.add_dependency 'fast_ignore', '>= 0.6.0'
44
44
  spec.add_dependency 'parallel', '~> 1.0'
45
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spellr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dana Sherson
@@ -182,14 +182,14 @@ dependencies:
182
182
  name: fast_ignore
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: 0.6.0
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: 0.6.0
195
195
  - !ruby/object:Gem::Dependency