code_manifest 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/code_manifest/manifest.rb +4 -0
- data/lib/code_manifest/version.rb +1 -1
- data/lib/code_manifest.rb +10 -17
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce96e05345e51d540aacc972db444154ae247a78ff6bf49e5b2b7ffa1c3f387c
|
4
|
+
data.tar.gz: 6a11aa482a2aacd63e2013bdf1a17eb7a329c9003727daf90ed4b730f847fafc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab83455ee76f574238dc5de1f3c1ca5263302719c915557021ef8aa4291e938ee81e7672b1f28c9800c167ef5ae6ad86f441d063ef22d7a1e18a33d4eba75c35
|
7
|
+
data.tar.gz: eb00e5a8bb44dcf64f636ba3a4509e410ab5fee7f83a6afb7433aab0abf96b7bf8674dbc0c0542229532a86fd757dc9cd484a6614469bf45f461ae2068d9dcdc
|
data/README.md
CHANGED
data/lib/code_manifest.rb
CHANGED
@@ -21,20 +21,20 @@ module CodeManifest
|
|
21
21
|
@root ||= find_root(start_path)
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
def load_file(manifest_file)
|
25
|
+
YAML.load_file(manifest_file, aliases: true).each_with_object({}) do |(name, patterns), collection|
|
26
|
+
next unless name.match?(KEY_PATTERN)
|
25
27
|
|
26
|
-
|
27
|
-
@manifests ||= begin
|
28
|
-
manifest_file = root.join(MANIFEST_FILE)
|
28
|
+
raise ArgumentError, "#{name} defined multiple times in #{manifest_file}" if collection.key?(name)
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
collection[name] = Manifest.new(patterns.flatten)
|
31
|
+
end
|
32
|
+
end
|
32
33
|
|
33
|
-
|
34
|
+
private
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
end
|
36
|
+
def manifests
|
37
|
+
@manifests ||= load_file(root.join(MANIFEST_FILE))
|
38
38
|
end
|
39
39
|
|
40
40
|
def find_root(path)
|
@@ -44,12 +44,5 @@ module CodeManifest
|
|
44
44
|
|
45
45
|
raise "#{MANIFEST_FILE} was not found in your project directory, please check README for instructions."
|
46
46
|
end
|
47
|
-
|
48
|
-
# https://stackoverflow.com/a/71192990
|
49
|
-
def load_manifest(file)
|
50
|
-
YAML.load_file(file, aliases: true)
|
51
|
-
rescue ArgumentError
|
52
|
-
YAML.load_file(file)
|
53
|
-
end
|
54
47
|
end
|
55
48
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_manifest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.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:
|
11
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: psych
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.0.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rspec
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,7 +56,7 @@ metadata:
|
|
42
56
|
homepage_uri: https://github.com/rubyatscale/code_manifest
|
43
57
|
source_code_uri: https://github.com/rubyatscale/code_manifest
|
44
58
|
changelog_uri: https://github.com/rubyatscale/code_manifest/releases
|
45
|
-
post_install_message:
|
59
|
+
post_install_message:
|
46
60
|
rdoc_options: []
|
47
61
|
require_paths:
|
48
62
|
- lib
|
@@ -57,8 +71,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
71
|
- !ruby/object:Gem::Version
|
58
72
|
version: '0'
|
59
73
|
requirements: []
|
60
|
-
rubygems_version: 3.
|
61
|
-
signing_key:
|
74
|
+
rubygems_version: 3.5.9
|
75
|
+
signing_key:
|
62
76
|
specification_version: 4
|
63
77
|
summary: A code manifest
|
64
78
|
test_files: []
|