dependency_checker 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac8695cea83068ecec8de3b97952c34c2ee44adbd1a93ccfaea2d7435162dca6
4
- data.tar.gz: c55c5de0e6737e3a16d3d458887653b8a421fb55b17c41decce893868ebe3e71
3
+ metadata.gz: dd47b3f349f0a15ba2992970b7e38c5227e2c001c2923e9de00275d95bbd1ea3
4
+ data.tar.gz: 05aa4dffcaafb836cd296be47fb713f3b58988f1db7c883481103fa4d84b0e43
5
5
  SHA512:
6
- metadata.gz: 11591af11e78c61a130e204a1f60267f62f115d14dbbf9c75a204cb4340fd149d97d87f54577e8805f7077c343b3fe8a62dab0f11cdbd3e471f73b8fab69ef93
7
- data.tar.gz: 3cddb912ed15ade3b7a74befb00d444e95802d0048613c0ea9c6e1283ccf82a9844039634ddf7a035d06b5ea05b3f3abcc04ca78583b432ab5cb37aef72a4aa6
6
+ metadata.gz: '059bb4192c99662c50f3fcde3ee787d166bf46957b37a2d02d2c0bc9438220ecea9a73fc00026e413a89ebaf5946bc910d5e12d5277bb11296600c49d4e40446'
7
+ data.tar.gz: e29a530b9c3a24e3ef6956bc384c4fad075eec3f47b49e45fd5ea6bfc76081c0f101d9a3d70a35b09d22dd93832845575473f3c876c6265d863fff5264047fb9
data/README.md CHANGED
@@ -50,7 +50,7 @@ Or you can supply an override value directly:
50
50
 
51
51
  $ dependency-checker ../*/metadata.json -o puppetlabs/stdlib,10.0.0
52
52
 
53
- The tool defaults to validating all modules supported by the Puppet IAC team if
53
+ The tool defaults to validating all modules supported by the Puppet CAT team if
54
54
  no module specification arguments are provided.
55
55
 
56
56
  The following optional parameters are available:
@@ -86,8 +86,8 @@ if options[:namespace]
86
86
  runner.resolve_from_namespace(options[:namespace], options[:endorsement])
87
87
 
88
88
  elsif ARGV.empty?
89
- puts "No module criteria specified. Defaulting to IAC supported modules.\n\n"
90
- runner.resolve_from_path('https://puppetlabs.github.io/iac/modules.json')
89
+ puts "No module criteria specified. Defaulting to CAT supported modules.\n\n"
90
+ runner.resolve_from_path('https://puppetlabs.github.io/content-and-tooling-team/modules/list.json')
91
91
 
92
92
  elsif ARGV.map { |arg| File.basename arg } != ['metadata.json']
93
93
  runner.resolve_from_path(ARGV.first)
@@ -31,7 +31,7 @@ module DependencyChecker
31
31
  module_data = @cache[module_name]
32
32
  begin
33
33
  @cache[module_name] = module_data = PuppetForge::Module.find(module_name) unless module_data
34
- rescue Faraday::ClientError
34
+ rescue StandardError
35
35
  return nil
36
36
  end
37
37
 
@@ -8,7 +8,7 @@ require 'parallel'
8
8
 
9
9
  # Main runner for DependencyChecker
10
10
  module DependencyChecker
11
- class Runner
11
+ class Runner # rubocop:disable Metrics/ClassLength
12
12
  attr_reader :problems
13
13
 
14
14
  def initialize(verbose = false, forge_hostname = nil, forge_token = nil)
@@ -184,10 +184,12 @@ module DependencyChecker
184
184
  raise "*Error:* Ensure syntax of #{path} file is valid YAML or JSON"
185
185
  end
186
186
 
187
- # transform from IAC supported module hash to simple list
188
- modules = modules.filter_map { |_key, val| val['puppet_module'] } if modules.is_a? Hash
189
-
190
- modules
187
+ # transform from CAT supported module hash to simple list
188
+ if path.end_with? '/content-and-tooling-team/modules/list.json'
189
+ modules.filter_map { |key, _val| key['name'] } if modules.is_a? Array
190
+ elsif modules.is_a? Hash
191
+ modules.filter_map { |_key, val| val['puppet_module'] }
192
+ end
191
193
  end
192
194
 
193
195
  # Post message to terminal
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DependencyChecker
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependency_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ewoud Kohl van Wijngaarden
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-04-25 00:00:00.000000000 Z
12
+ date: 2023-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: '2.2'
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: '4.0'
37
+ version: '6.0'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: '2.2'
45
45
  - - "<"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.0'
47
+ version: '6.0'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rake
50
50
  requirement: !ruby/object:Gem::Requirement