fast_ignore 0.8.0 → 0.8.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/fast_ignore/rule_set_builder.rb +5 -3
- data/lib/fast_ignore/version.rb +1 -1
- data/lib/fast_ignore.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02257f4f18a12cf4bae69ef8d4aa79c617f765726ae76a03bccf5391d920031e
|
4
|
+
data.tar.gz: 79fc7d4960118dbff36a42a6fae04d69890011842a2bb94c35966e7b9b1f8651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be65dc38c204c7b1bfabd9cb61379a3516658c14bdbc242b396da79a247a1663e5d866194118f9da200410815f9888e946d9ac716e59ca9df9892cafede71da2
|
7
|
+
data.tar.gz: a6a4178e53e44c46f952e38aa66e7d5b92b90d449bacf449638afded35c82549c543ccd9aeebe1e53f505d0847f585c9be9fd0c13fcfa3f1344990f2faeee57d
|
data/CHANGELOG.md
CHANGED
@@ -71,11 +71,13 @@ class FastIgnore
|
|
71
71
|
|
72
72
|
rule_set = ::FastIgnore::RuleSet.new(project_root: root, allow: allow, and_no_ext: and_no_ext)
|
73
73
|
|
74
|
-
rules.
|
75
|
-
rule_string.each_line do |rule_line|
|
76
|
-
parse_rules(rule_line, rule_set:
|
74
|
+
rules.each do |rule_string|
|
75
|
+
rule_string.to_s.each_line do |rule_line|
|
76
|
+
parse_rules(rule_line, rule_set: rule_set, allow: allow, root: root, expand_path: expand_path)
|
77
77
|
end
|
78
78
|
end
|
79
|
+
|
80
|
+
rule_set
|
79
81
|
end
|
80
82
|
|
81
83
|
def self.parse_rules(rule_line, rule_set:, allow: false, root: Dir.pwd, expand_path: false)
|
data/lib/fast_ignore/version.rb
CHANGED
data/lib/fast_ignore.rb
CHANGED
@@ -118,8 +118,8 @@ class FastIgnore
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def prepare_shebang_pattern(rules)
|
121
|
-
return if !rules || rules.empty?
|
121
|
+
return if !rules || (rules = Array(rules)).empty?
|
122
122
|
|
123
|
-
/\A#!.*\b(?:#{rules.map { |s| Regexp.escape(s.to_s) }.join('|')})\b/.freeze
|
123
|
+
/\A#!.*\b(?:#{rules.flat_map { |s| s.to_s.split("\n") }.map { |s| Regexp.escape(s.to_s) }.join('|')})\b/.freeze
|
124
124
|
end
|
125
125
|
end
|