metadata_json_deps 0.6.0 → 1.1.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/bin/metadata-json-deps +1 -1
- data/lib/metadata_json_deps.rb +11 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c6840a3a6e17518cfef0344bf3c5cc0108f15d737283f2a9079b226102cffad
|
4
|
+
data.tar.gz: 356bcd12f1b3f663fe34bd49065939e99312411fd23f19e9053cdd54768a24de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a90c6e2465c768669076fab95b4874923ee746ef29ea6163947906e0cfec8c042768e54de9f89a9aa836f4b97eeede3e982490a8652a763d21778a2be1d1fb7
|
7
|
+
data.tar.gz: 3e38f96adb93132466817b9413a296ba3dd2c8f8d4950755578e19183d66691ad971d2ac7aa47f0163a55754e37085209662e29de90296955600a2b32c0636b8
|
data/README.md
CHANGED
data/bin/metadata-json-deps
CHANGED
data/lib/metadata_json_deps.rb
CHANGED
@@ -9,7 +9,11 @@ module MetadataJsonDeps
|
|
9
9
|
|
10
10
|
def get_module(name)
|
11
11
|
name = PuppetForge::V3.normalize_name(name)
|
12
|
-
|
12
|
+
begin
|
13
|
+
@cache[name] ||= PuppetForge::Module.find(name)
|
14
|
+
rescue Faraday::ResourceNotFound
|
15
|
+
raise PuppetForge::ModuleNotFound.new("Dependency #{name} not found on forge.puppet.com")
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
@@ -76,6 +80,8 @@ module MetadataJsonDeps
|
|
76
80
|
def self.run(filenames, verbose = false)
|
77
81
|
forge = ForgeVersions.new
|
78
82
|
|
83
|
+
exit_code = 0
|
84
|
+
|
79
85
|
filenames.each do |filename|
|
80
86
|
puts "Checking #{filename}"
|
81
87
|
metadata = PuppetMetadata.read(filename)
|
@@ -84,6 +90,7 @@ module MetadataJsonDeps
|
|
84
90
|
mod = forge.get_module(dependency)
|
85
91
|
|
86
92
|
if mod.deprecated_at
|
93
|
+
exit_code |= 2
|
87
94
|
if mod.superseded_by
|
88
95
|
puts " #{dependency} was superseded by #{mod.superseded_by[:slug]}"
|
89
96
|
elsif mod.deprecated_for
|
@@ -99,10 +106,13 @@ module MetadataJsonDeps
|
|
99
106
|
puts " #{dependency} (#{constraint}) matches #{current}"
|
100
107
|
end
|
101
108
|
else
|
109
|
+
exit_code |= 1
|
102
110
|
puts " #{dependency} (#{constraint}) doesn't match #{current}"
|
103
111
|
end
|
104
112
|
end
|
105
113
|
end
|
114
|
+
|
115
|
+
exit_code
|
106
116
|
end
|
107
117
|
rescue Interrupt
|
108
118
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metadata_json_deps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ewoud Kohl van Wijngaarden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet_forge
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 0.3.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '4'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: 0.3.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '4'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rspec
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
|
-
rubygems_version: 3.3.
|
117
|
+
rubygems_version: 3.3.26
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Check your Puppet metadata dependencies
|