metadata-json-lint 4.2.1 → 5.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 618157af48848153bddab21052da6d58df6f5c88af598b1722a3e0d76d2e1817
4
- data.tar.gz: a55aca8b94ff158854a4a8997de5d6639323a5da7b83d47c0e16a09a6c206438
3
+ metadata.gz: 29e4b11eb67ac424ce447445c58a2f2d1cc401dd38512403e444b9d05dd7eec7
4
+ data.tar.gz: 6c5e706887327a973a8a65d36a9ca00d1fc5b3ca1a4fa65526a5faa86df42671
5
5
  SHA512:
6
- metadata.gz: 5960265ab1a4e15345c5c17a60f4eddf1ccc4a1ba21c7c58dd4a695a1dacff7251acc3cac09eaee3a3b8e540533d8cf431de1d9253cd207752176b027ad9b433
7
- data.tar.gz: 70d54d7bb0d4a686b630815bb63b8d7b7681030c13de32e67a96fbc41d5a72e7167c2e4dabfbffd719c03e520be3c9fe3cd92577be4575fee04a3d23e800718d
6
+ metadata.gz: b7899527b37037203171485090dc06297ea793ba4f9b0f3d5090bbfca1a375e1a159656250b6dff1359d24637e6a013b38ab8317674941399cc7f7a13e6f006b
7
+ data.tar.gz: e2c1d1dac6a9bef4c8c99decc1e7aee33633a5dfd1e48440954a255abaf655f3e27c476ec77c6c7a903dc62b2a97a80b19a5310932a0403b5772b8db914b530e
@@ -0,0 +1,41 @@
1
+ ---
2
+ # https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
3
+
4
+ changelog:
5
+ exclude:
6
+ labels:
7
+ - duplicate
8
+ - invalid
9
+ - modulesync
10
+ - question
11
+ - skip-changelog
12
+ - wont-fix
13
+ - wontfix
14
+ - github_actions
15
+
16
+ categories:
17
+ - title: Breaking Changes 🛠
18
+ labels:
19
+ - backwards-incompatible
20
+
21
+ - title: New Features 🎉
22
+ labels:
23
+ - enhancement
24
+
25
+ - title: Bug Fixes 🐛
26
+ labels:
27
+ - bug
28
+ - bugfix
29
+
30
+ - title: Documentation Updates 📚
31
+ labels:
32
+ - documentation
33
+ - docs
34
+
35
+ - title: Dependency Updates ⬆️
36
+ labels:
37
+ - dependencies
38
+
39
+ - title: Other Changes
40
+ labels:
41
+ - "*"
@@ -1,32 +1,106 @@
1
- name: Release
1
+ ---
2
+ name: Gem Release
2
3
 
3
4
  on:
4
5
  push:
5
6
  tags:
6
7
  - '*'
7
8
 
9
+ permissions: {}
10
+
8
11
  jobs:
9
- release:
10
- runs-on: ubuntu-latest
12
+ build-release:
13
+ # Prevent releases from forked repositories
11
14
  if: github.repository_owner == 'voxpupuli'
15
+ name: Build the gem
16
+ runs-on: ubuntu-24.04
12
17
  steps:
13
- - uses: actions/checkout@v4
14
- - name: Install Ruby 3.4
18
+ - uses: actions/checkout@v5
19
+ - name: Install Ruby
15
20
  uses: ruby/setup-ruby@v1
16
21
  with:
17
- ruby-version: '3.4'
18
- env:
19
- BUNDLE_WITHOUT: release
22
+ ruby-version: 'ruby'
20
23
  - name: Build gem
21
- run: gem build --strict --verbose *.gemspec
24
+ shell: bash
25
+ run: gem build --verbose *.gemspec
26
+ - name: Upload gem to GitHub cache
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: gem-artifact
30
+ path: '*.gem'
31
+ retention-days: 1
32
+ compression-level: 0
33
+
34
+ create-github-release:
35
+ needs: build-release
36
+ name: Create GitHub release
37
+ runs-on: ubuntu-24.04
38
+ permissions:
39
+ contents: write # clone repo and create release
40
+ steps:
41
+ - name: Download gem from GitHub cache
42
+ uses: actions/download-artifact@v5
43
+ with:
44
+ name: gem-artifact
45
+ - name: Create Release
46
+ shell: bash
47
+ env:
48
+ GH_TOKEN: ${{ github.token }}
49
+ run: gh release create --repo ${{ github.repository }} ${{ github.ref_name }} --generate-notes *.gem
50
+
51
+ release-to-github:
52
+ needs: build-release
53
+ name: Release to GitHub
54
+ runs-on: ubuntu-24.04
55
+ permissions:
56
+ packages: write # publish to rubygems.pkg.github.com
57
+ steps:
58
+ - name: Download gem from GitHub cache
59
+ uses: actions/download-artifact@v5
60
+ with:
61
+ name: gem-artifact
62
+ - name: Publish gem to GitHub packages
63
+ run: gem push --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
64
+ env:
65
+ GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }}
66
+
67
+ release-to-rubygems:
68
+ needs: build-release
69
+ name: Release gem to rubygems.org
70
+ runs-on: ubuntu-24.04
71
+ environment: release # recommended by rubygems.org
72
+ permissions:
73
+ id-token: write # rubygems.org authentication
74
+ steps:
75
+ - name: Download gem from GitHub cache
76
+ uses: actions/download-artifact@v5
77
+ with:
78
+ name: gem-artifact
79
+ - uses: rubygems/configure-rubygems-credentials@v1.0.0
22
80
  - name: Publish gem to rubygems.org
81
+ shell: bash
23
82
  run: gem push *.gem
24
- env:
25
- GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
26
- - name: Setup GitHub packages access
83
+
84
+ release-verification:
85
+ name: Check that all releases are done
86
+ runs-on: ubuntu-24.04
87
+ permissions:
88
+ contents: read # minimal permissions that we have to grant
89
+ needs:
90
+ - create-github-release
91
+ - release-to-github
92
+ - release-to-rubygems
93
+ steps:
94
+ - name: Download gem from GitHub cache
95
+ uses: actions/download-artifact@v5
96
+ with:
97
+ name: gem-artifact
98
+ - name: Install Ruby
99
+ uses: ruby/setup-ruby@v1
100
+ with:
101
+ ruby-version: 'ruby'
102
+ - name: Wait for release to propagate
103
+ shell: bash
27
104
  run: |
28
- mkdir -p ~/.gem
29
- echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
30
- chmod 0600 ~/.gem/credentials
31
- - name: Publish gem to GitHub packages
32
- run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
105
+ gem install rubygems-await
106
+ gem await *.gem
@@ -1,3 +1,4 @@
1
+ ---
1
2
  name: Test
2
3
 
3
4
  on:
@@ -6,8 +7,8 @@ on:
6
7
  branches:
7
8
  - master
8
9
 
9
- env:
10
- BUNDLE_WITHOUT: release
10
+ permissions:
11
+ contents: read
11
12
 
12
13
  jobs:
13
14
  rubocop_and_matrix:
@@ -15,7 +16,7 @@ jobs:
15
16
  outputs:
16
17
  ruby: ${{ steps.ruby.outputs.versions }}
17
18
  steps:
18
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v5
19
20
  - name: Install Ruby 3.4
20
21
  uses: ruby/setup-ruby@v1
21
22
  with:
@@ -35,7 +36,7 @@ jobs:
35
36
  matrix:
36
37
  ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
37
38
  steps:
38
- - uses: actions/checkout@v4
39
+ - uses: actions/checkout@v5
39
40
  - name: Setup ruby
40
41
  uses: ruby/setup-ruby@v1
41
42
  with:
@@ -47,9 +48,13 @@ jobs:
47
48
  run: gem build --strict --verbose *.gemspec
48
49
 
49
50
  tests:
51
+ if: always()
50
52
  needs:
51
53
  - test
52
- runs-on: ubuntu-latest
54
+ runs-on: ubuntu-24.04
53
55
  name: Test suite
54
56
  steps:
55
- - run: echo Test suite completed
57
+ - name: Decide whether the needed jobs succeeded or failed
58
+ uses: re-actors/alls-green@release/v1
59
+ with:
60
+ jobs: ${{ toJSON(needs) }}
data/.rubocop.yml CHANGED
@@ -3,3 +3,6 @@ inherit_from: .rubocop_todo.yml
3
3
 
4
4
  inherit_gem:
5
5
  voxpupuli-rubocop: rubocop.yml
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 3.2
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2024-06-20 08:26:07 UTC using RuboCop version 1.63.5.
2
+ # `rubocop --auto-gen-config --no-auto-gen-timestamp`
3
+ # using RuboCop version 1.79.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,6 +11,14 @@ Lint/RescueException:
11
11
  Exclude:
12
12
  - 'lib/metadata_json_lint.rb'
13
13
 
14
+ # Offense count: 1
15
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
16
+ # AllowedMethods: call
17
+ # WaywardPredicates: nonzero?
18
+ Naming/PredicateMethod:
19
+ Exclude:
20
+ - 'lib/metadata_json_lint.rb'
21
+
14
22
  # Offense count: 1
15
23
  # Configuration parameters: Prefixes, AllowedPatterns.
16
24
  # Prefixes: when, with, without
@@ -32,10 +40,6 @@ RSpec/DescribedClass:
32
40
  RSpec/MessageSpies:
33
41
  EnforcedStyle: receive
34
42
 
35
- # Offense count: 2
36
- RSpec/MultipleExpectations:
37
- Max: 2
38
-
39
43
  # Offense count: 7
40
44
  # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
41
45
  # SupportedStyles: always, named_only
@@ -51,7 +55,7 @@ Style/Documentation:
51
55
  - 'test/**/*'
52
56
  - 'lib/metadata_json_lint.rb'
53
57
 
54
- # Offense count: 36
58
+ # Offense count: 38
55
59
  # This cop supports unsafe autocorrection (--autocorrect-all).
56
60
  # Configuration parameters: EnforcedStyle.
57
61
  # SupportedStyles: always, always_true, never
@@ -60,7 +64,7 @@ Style/FrozenStringLiteralComment:
60
64
 
61
65
  # Offense count: 6
62
66
  # This cop supports safe autocorrection (--autocorrect).
63
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
67
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
64
68
  # URISchemes: http, https
65
69
  Layout/LineLength:
66
70
  Max: 153
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.0.0](https://github.com/voxpupuli/metadata-json-lint/tree/5.0.0) (2025-08-12)
4
+
5
+ [Full Changelog](https://github.com/voxpupuli/metadata-json-lint/compare/4.3.0...5.0.0)
6
+
7
+ **Breaking changes:**
8
+
9
+ - Require Ruby 3.2 or newer [\#167](https://github.com/voxpupuli/metadata-json-lint/pull/167) ([bastelfreak](https://github.com/bastelfreak))
10
+
11
+ ## [4.3.0](https://github.com/voxpupuli/metadata-json-lint/tree/4.3.0) (2025-08-12)
12
+
13
+ [Full Changelog](https://github.com/voxpupuli/metadata-json-lint/compare/4.2.1...4.3.0)
14
+
15
+ **Implemented enhancements:**
16
+
17
+ - json-schema: Allow 6.x [\#164](https://github.com/voxpupuli/metadata-json-lint/pull/164) ([bastelfreak](https://github.com/bastelfreak))
18
+
3
19
  ## [4.2.1](https://github.com/voxpupuli/metadata-json-lint/tree/4.2.1) (2025-02-23)
4
20
 
5
21
  [Full Changelog](https://github.com/voxpupuli/metadata-json-lint/compare/4.2.0...4.2.1)
@@ -27,7 +43,6 @@
27
43
 
28
44
  - CI: Switch to voxpupuli/ruby-version [\#156](https://github.com/voxpupuli/metadata-json-lint/pull/156) ([bastelfreak](https://github.com/bastelfreak))
29
45
  - Drop code coverage in testing [\#153](https://github.com/voxpupuli/metadata-json-lint/pull/153) ([ekohl](https://github.com/ekohl))
30
- - Update voxpupuli-rubocop requirement from ~\> 2.8.0 to ~\> 3.0.0 [\#147](https://github.com/voxpupuli/metadata-json-lint/pull/147) ([dependabot[bot]](https://github.com/apps/dependabot))
31
46
 
32
47
  ## [4.1.0](https://github.com/voxpupuli/metadata-json-lint/tree/4.1.0) (2024-08-19)
33
48
 
@@ -54,7 +69,6 @@
54
69
 
55
70
  **Merged pull requests:**
56
71
 
57
- - Update voxpupuli-rubocop requirement from ~\> 1.2 to ~\> 2.0 [\#139](https://github.com/voxpupuli/metadata-json-lint/pull/139) ([dependabot[bot]](https://github.com/apps/dependabot))
58
72
  - Make semantic\_puppet a hard dependency [\#136](https://github.com/voxpupuli/metadata-json-lint/pull/136) ([bastelfreak](https://github.com/bastelfreak))
59
73
  - Drop pry development dependency [\#134](https://github.com/voxpupuli/metadata-json-lint/pull/134) ([bastelfreak](https://github.com/bastelfreak))
60
74
  - GCG: Add faraday-retry dep [\#132](https://github.com/voxpupuli/metadata-json-lint/pull/132) ([bastelfreak](https://github.com/bastelfreak))
@@ -76,10 +90,6 @@
76
90
 
77
91
  [Full Changelog](https://github.com/voxpupuli/metadata-json-lint/compare/3.0.1...3.0.2)
78
92
 
79
- **Merged pull requests:**
80
-
81
- - Update json-schema requirement from ~\> 2.8 to \>= 2.8, \< 4.0 [\#121](https://github.com/voxpupuli/metadata-json-lint/pull/121) ([dependabot[bot]](https://github.com/apps/dependabot))
82
-
83
93
  ## [3.0.1](https://github.com/voxpupuli/metadata-json-lint/tree/3.0.1) (2021-08-13)
84
94
 
85
95
  [Full Changelog](https://github.com/voxpupuli/metadata-json-lint/compare/3.0.0...3.0.1)
@@ -92,7 +102,6 @@
92
102
 
93
103
  **Merged pull requests:**
94
104
 
95
- - Update rubocop requirement from ~\> 0.50.0 to ~\> 0.57.2 [\#117](https://github.com/voxpupuli/metadata-json-lint/pull/117) ([dependabot[bot]](https://github.com/apps/dependabot))
96
105
  - Add GitHub actions + badges [\#116](https://github.com/voxpupuli/metadata-json-lint/pull/116) ([bastelfreak](https://github.com/bastelfreak))
97
106
 
98
107
  ## [3.0.0](https://github.com/voxpupuli/metadata-json-lint/tree/3.0.0) (2020-11-24)
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- group :release do
6
- gem 'faraday-retry', require: false
7
- gem 'github_changelog_generator', require: false
5
+ group :release, optional: true do
6
+ gem 'faraday-retry', '~> 2.1', require: false
7
+ gem 'github_changelog_generator', '~> 1.16.4', require: false
8
8
  end
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ rescue LoadError
24
24
  # github_changelog_generator is in the optional `release` group
25
25
  else
26
26
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
27
- config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions]
27
+ config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions dependencies]
28
28
  config.user = 'voxpupuli'
29
29
  config.project = 'metadata-json-lint'
30
30
  gem_version = Gem::Specification.load("#{config.project}.gemspec").version
@@ -10,7 +10,7 @@ module MetadataJsonLint
10
10
  MIN_PUPPET_VER = '4.10.0'.freeze
11
11
  # Regex looks for:
12
12
  # 1. Invalid escape sequences (\x or incomplete \u)
13
- INVALID_ESCAPE_REGEX = %r{\\[^"/bfnrtu]|\\u(?![0-9a-fA-F]{4})}.freeze
13
+ INVALID_ESCAPE_REGEX = %r{\\[^"/bfnrtu]|\\u(?![0-9a-fA-F]{4})}
14
14
 
15
15
  def options
16
16
  @options ||= Struct.new(
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'metadata-json-lint'
3
- s.version = '4.2.1'
3
+ s.version = '5.0.0'
4
4
  s.summary = 'metadata-json-lint /path/to/metadata.json'
5
5
  s.description = 'Utility to verify Puppet metadata.json files'
6
6
  s.authors = ['Vox Pupuli']
@@ -12,12 +12,12 @@ Gem::Specification.new do |s|
12
12
  s.homepage = 'https://github.com/voxpupuli/metadata-json-lint'
13
13
  s.license = 'Apache-2.0'
14
14
 
15
- s.required_ruby_version = '>= 2.7.0'
15
+ s.required_ruby_version = '>= 3.2.0'
16
16
 
17
- s.add_dependency 'json-schema', '>= 2.8', '< 6.0'
17
+ s.add_dependency 'json-schema', '>= 2.8', '< 7.0'
18
18
  s.add_dependency 'semantic_puppet', '~> 1.0'
19
19
  s.add_dependency 'spdx-licenses', '~> 1.0'
20
20
  s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
21
21
  s.add_development_dependency 'rspec', '~> 3.12'
22
- s.add_development_dependency 'voxpupuli-rubocop', '~> 3.0.0'
22
+ s.add_development_dependency 'voxpupuli-rubocop', '~> 4.2.0'
23
23
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata-json-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: json-schema
@@ -18,7 +18,7 @@ dependencies:
18
18
  version: '2.8'
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
- version: '6.0'
21
+ version: '7.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +28,7 @@ dependencies:
28
28
  version: '2.8'
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '6.0'
31
+ version: '7.0'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: semantic_puppet
34
34
  requirement: !ruby/object:Gem::Requirement
@@ -97,14 +97,14 @@ dependencies:
97
97
  requirements:
98
98
  - - "~>"
99
99
  - !ruby/object:Gem::Version
100
- version: 3.0.0
100
+ version: 4.2.0
101
101
  type: :development
102
102
  prerelease: false
103
103
  version_requirements: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - "~>"
106
106
  - !ruby/object:Gem::Version
107
- version: 3.0.0
107
+ version: 4.2.0
108
108
  description: Utility to verify Puppet metadata.json files
109
109
  email: voxpupuli@groups.io
110
110
  executables:
@@ -113,6 +113,7 @@ extensions: []
113
113
  extra_rdoc_files: []
114
114
  files:
115
115
  - ".github/dependabot.yml"
116
+ - ".github/release.yml"
116
117
  - ".github/workflows/release.yml"
117
118
  - ".github/workflows/test.yml"
118
119
  - ".gitignore"
@@ -220,14 +221,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
221
  requirements:
221
222
  - - ">="
222
223
  - !ruby/object:Gem::Version
223
- version: 2.7.0
224
+ version: 3.2.0
224
225
  required_rubygems_version: !ruby/object:Gem::Requirement
225
226
  requirements:
226
227
  - - ">="
227
228
  - !ruby/object:Gem::Version
228
229
  version: '0'
229
230
  requirements: []
230
- rubygems_version: 3.6.2
231
+ rubygems_version: 3.6.9
231
232
  specification_version: 4
232
233
  summary: metadata-json-lint /path/to/metadata.json
233
234
  test_files: []