fast_ignore 0.8.2 → 0.8.3
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/version.rb +1 -1
- data/lib/fast_ignore.rb +5 -5
- 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: 9218ac549a0d5f73ff24a656320561307b89c7137f105e2921d4adb81074bcd8
|
4
|
+
data.tar.gz: 6ed5b5a316d48e7a10bd87b3159fa61f750154c7614c9ad11a1ceb992df0bace
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366a9500c6a9e1b725bb7fcb691040bbd0385b20f4e8e496f7199f4640c05bbc51de4593a634f82166ec81d5c9a1fd2251c38a1bfc37a5bacf06934154965c94
|
7
|
+
data.tar.gz: 11b0afcc962cd225be140384dd3dc3e61c4006c699b22b1016e6b339b11fae26f30a59f4f98740ad46769653761850b4385b04e9c62b53457a1244075dec8dbe
|
data/CHANGELOG.md
CHANGED
data/lib/fast_ignore/version.rb
CHANGED
data/lib/fast_ignore.rb
CHANGED
@@ -35,7 +35,7 @@ class FastIgnore
|
|
35
35
|
@root_trailing_slash = "#{@root}/"
|
36
36
|
@shebang_pattern = prepare_shebang_pattern(include_shebangs)
|
37
37
|
|
38
|
-
|
38
|
+
rule_sets = ::FastIgnore::RuleSetBuilder.from_args(
|
39
39
|
root: @root,
|
40
40
|
ignore_rules: ignore_rules,
|
41
41
|
ignore_files: ignore_files,
|
@@ -45,7 +45,7 @@ class FastIgnore
|
|
45
45
|
argv_rules: argv_rules
|
46
46
|
)
|
47
47
|
|
48
|
-
@include_rule_sets, @ignore_rule_sets =
|
48
|
+
@include_rule_sets, @ignore_rule_sets = rule_sets.partition(&:allow?)
|
49
49
|
@has_include_rule_sets = !@include_rule_sets.empty?
|
50
50
|
@relative = relative
|
51
51
|
end
|
@@ -85,13 +85,13 @@ class FastIgnore
|
|
85
85
|
child = path + basename
|
86
86
|
dir = ::File.stat(child).directory? # equivalent to directory? and exist?
|
87
87
|
|
88
|
+
next unless @ignore_rule_sets.all? { |r| r.allowed_unrecursive?(child, dir) }
|
89
|
+
|
88
90
|
if dir
|
89
|
-
next unless @shebang_pattern || @
|
91
|
+
next unless @shebang_pattern || @include_rule_sets.all? { |r| r.allowed_unrecursive?(child, dir) }
|
90
92
|
|
91
93
|
each_allowed("#{child}/", &block)
|
92
94
|
else
|
93
|
-
next unless @ignore_rule_sets.all? { |r| r.allowed_unrecursive?(child, dir) }
|
94
|
-
|
95
95
|
if @shebang_pattern
|
96
96
|
unless (@has_include_rule_sets &&
|
97
97
|
@include_rule_sets.all? { |r| r.allowed_unrecursive?(child, dir) }) ||
|