fast_ignore 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +3 -0
- data/lib/fast_ignore/rule.rb +4 -0
- data/lib/fast_ignore/rule_set.rb +5 -7
- data/lib/fast_ignore/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dd3cffbf805ab15bbbfe22e5e4afb0462ada58ec1baaf6281e9bb8ef5d80697a
|
4
|
+
data.tar.gz: 81a228932c87cc9fbec0a21562b6a6d295a3f45aed8502f9bb38dd4237a826f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24adff6dfcc51add546f9f7ed2e67eee3e71ef574f449f834161d642426e019095394f73733d5cd29a4f0b3db40b7b845cb024a3958b2b6ca8ef27490023e51f
|
7
|
+
data.tar.gz: cac2c9eea6dbcce19adbe0ed7c2c0c332e8453e3ff25f0124e2f7850133cec84fdd977c7e24d931654d9150d2b808dd91f7ad43639b9bc9ce7bb133ba58ff2fd
|
data/CHANGELOG.md
CHANGED
data/lib/fast_ignore/rule.rb
CHANGED
data/lib/fast_ignore/rule_set.rb
CHANGED
@@ -9,9 +9,9 @@ class FastIgnore
|
|
9
9
|
def initialize(project_root: Dir.pwd, allow: false)
|
10
10
|
@rules = []
|
11
11
|
@non_dir_only_rules = []
|
12
|
-
@allowed_unrecursive = {}
|
13
|
-
@allowed_recursive = {}
|
14
12
|
@project_root = project_root
|
13
|
+
@allowed_unrecursive = { @project_root => true }
|
14
|
+
@allowed_recursive = { @project_root => true }
|
15
15
|
@any_not_anchored = false
|
16
16
|
@empty = true
|
17
17
|
@allow = allow
|
@@ -29,11 +29,9 @@ class FastIgnore
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def allowed_recursive?(path, dir)
|
32
|
-
return true if path == @project_root
|
33
|
-
|
34
32
|
@allowed_recursive.fetch(path) do
|
35
33
|
@allowed_recursive[path] =
|
36
|
-
allowed_recursive?(path, true) &&
|
34
|
+
allowed_recursive?(::File.dirname(path), true) && allowed_unrecursive?(path, dir)
|
37
35
|
end
|
38
36
|
end
|
39
37
|
|
@@ -51,8 +49,8 @@ class FastIgnore
|
|
51
49
|
end
|
52
50
|
|
53
51
|
def clear_cache
|
54
|
-
@allowed_unrecursive = {}
|
55
|
-
@allowed_recursive = {}
|
52
|
+
@allowed_unrecursive = { @project_root => true }
|
53
|
+
@allowed_recursive = { @project_root => true }
|
56
54
|
end
|
57
55
|
|
58
56
|
private
|
data/lib/fast_ignore/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_ignore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dana Sherson
|
@@ -145,8 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
|
149
|
-
rubygems_version: 2.5.2.1
|
148
|
+
rubygems_version: 3.1.2
|
150
149
|
signing_key:
|
151
150
|
specification_version: 4
|
152
151
|
summary: Parse gitignore files, quickly
|