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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/spellr/file.rb +2 -0
- data/lib/spellr/language.rb +5 -2
- data/lib/spellr/version.rb +1 -1
- data/spellr.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f536be7fdf055e77cf278ccc2b4980da48bcbaae1d821bdf581df338c6ffa4e
|
4
|
+
data.tar.gz: 8c33f240c847e4b9557f2c02c4804b8e1e375f65135c0f5801165fd9ce3fe53c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bed7f3fd56ca81cde5796ee61e96caeebe1e4bb0456d50ed9c3e7e34ab794f10130a13b668ee8c9eb175d5f5a8c63defc7c308fed3d6e2f79e431a396419839
|
7
|
+
data.tar.gz: 7ac9605ef35b4e66c98c919102098e3e59c901a3f019674254c00c2769cb1f852878e00bba9c60ce666ce891aaa848b63d94ec8efd3607498b91801acaa573d6
|
data/CHANGELOG.md
CHANGED
data/lib/spellr/file.rb
CHANGED
@@ -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 != ''
|
data/lib/spellr/language.rb
CHANGED
@@ -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?
|
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
|
-
@
|
52
|
+
@hashbang_pattern.match?(file.hashbang)
|
50
53
|
end
|
51
54
|
|
52
55
|
def matches_includes?(file)
|
data/lib/spellr/version.rb
CHANGED
data/spellr.gemspec
CHANGED
@@ -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', '
|
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.
|
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
|