code_manifest 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/code_manifest/manifest.rb +16 -14
- data/lib/code_manifest/version.rb +1 -1
- metadata +24 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 954a51776f486956c9c233fa8c3b1eeea14dff085eea71f2f45f0c1fdb46a6f8
|
4
|
+
data.tar.gz: eb4ade750b31af1cc7e7a8673968bfb3ee5ab43c773593d76c14ad2478de2279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da6063df72327a5cbdff35fa5c06078390475bc4af266c63d1c5432fcb92c56c4fcd5f94b94e4b125e04eb755c9c4008aa93209df2d6456beb40eb04f9295b5f
|
7
|
+
data.tar.gz: dfdf732aac67d9eeb23e05f1b12464874673e13815117a9f1b52e083779bb98e4522cea0a0aa2f375f473244ddcc083642442b820a9af99aa8e8b1a3bdaccc50
|
@@ -13,15 +13,13 @@ module CodeManifest
|
|
13
13
|
@rules ||= Array(patterns).map do |pattern|
|
14
14
|
Rule.new(pattern)
|
15
15
|
end
|
16
|
+
@cache = {}
|
16
17
|
end
|
17
18
|
|
18
19
|
def files
|
19
20
|
@files ||= begin
|
20
|
-
|
21
|
-
|
22
|
-
exclusion_rules.any? { |rule| rule.match?(file) }
|
23
|
-
end
|
24
|
-
files_with_relative_path(inclusion_files).sort!.freeze
|
21
|
+
matched_files = matches(Dir.glob(inclusion_rules.map(&:glob), GLOB_OPTIONS, base: CodeManifest.root))
|
22
|
+
files_with_relative_path(matched_files).freeze
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
@@ -33,18 +31,22 @@ module CodeManifest
|
|
33
31
|
end
|
34
32
|
|
35
33
|
def matches(paths)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
Array(paths).select do |path|
|
35
|
+
cached_match =
|
36
|
+
if @cache.key?(path)
|
37
|
+
@cache.fetch(path)
|
38
|
+
else
|
39
|
+
@cache[path] = [
|
40
|
+
inclusion_rules.any? { |rule| rule.match?(path) },
|
41
|
+
exclusion_rules.any? { |rule| rule.match?(path) }
|
42
|
+
]
|
43
|
+
end
|
44
|
+
cached_match.first && !cached_match.last
|
45
|
+
end.sort!
|
44
46
|
end
|
45
47
|
|
46
48
|
def matches_all?(paths)
|
47
|
-
matches(paths) == paths
|
49
|
+
matches(paths).size == paths.size
|
48
50
|
end
|
49
51
|
|
50
52
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_manifest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: psych
|
@@ -28,16 +28,30 @@ dependencies:
|
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: debug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
54
|
+
version: '0'
|
41
55
|
description: A code manifest
|
42
56
|
email:
|
43
57
|
- dev@gusto.com
|
@@ -56,7 +70,7 @@ metadata:
|
|
56
70
|
homepage_uri: https://github.com/rubyatscale/code_manifest
|
57
71
|
source_code_uri: https://github.com/rubyatscale/code_manifest
|
58
72
|
changelog_uri: https://github.com/rubyatscale/code_manifest/releases
|
59
|
-
post_install_message:
|
73
|
+
post_install_message:
|
60
74
|
rdoc_options: []
|
61
75
|
require_paths:
|
62
76
|
- lib
|
@@ -71,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
85
|
- !ruby/object:Gem::Version
|
72
86
|
version: '0'
|
73
87
|
requirements: []
|
74
|
-
rubygems_version: 3.5.
|
75
|
-
signing_key:
|
88
|
+
rubygems_version: 3.5.16
|
89
|
+
signing_key:
|
76
90
|
specification_version: 4
|
77
91
|
summary: A code manifest
|
78
92
|
test_files: []
|