modulesync 3.5.0 → 4.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: 96b3469fe88cd9a94f134b56d7b45f16daa52ebac3a132f5314d09afe6776e8e
4
- data.tar.gz: f8ebae9fe9ca9f71d4cdca4cf9afdb38e24115ea2f23467900eeeb4ac0e0151e
3
+ metadata.gz: 18b8c746ba0cde88e90c644943e3f9ceedd6f9b6b677133223e7706a0b71c568
4
+ data.tar.gz: 644c526cc5b4f004317634f1a6afeeec356e22190a8230f34141ef3fe961e52f
5
5
  SHA512:
6
- metadata.gz: 994a5ad6429d50add848d5879c493411dd98b8856ca6ef8bcd4efd506d82171394f593b78e513083c306b48d7a290630288f6338341c3a7714d14fb67e1a4fa2
7
- data.tar.gz: c1c120709f9347f913e3fae34c0b2fb8c27028df0340910455609e4634b10ea09373c8068bec01e74f1166c88da734197b4dba98d738cdda4593fc2c76102ea8
6
+ metadata.gz: b56f97438c169d9bf061724ec5afc120e81478f514c9faf374a065000dcf4cbf64970d38b079bab0077e95c25d79a2b44088417a85b414dd633534006337a559
7
+ data.tar.gz: 5016b55f147551a5786fafd799fe929a358a8c5aec2e1b4b1c49604e1778a74ccea7faa9aefa7aca3828174c8fb53420912a0add7c4f91321eddc0c06abc3b39
@@ -7,8 +7,8 @@ on:
7
7
  branches:
8
8
  - master
9
9
 
10
- env:
11
- BUNDLE_WITHOUT: release
10
+ permissions:
11
+ contents: read
12
12
 
13
13
  jobs:
14
14
  rubocop_and_matrix:
@@ -16,7 +16,7 @@ jobs:
16
16
  outputs:
17
17
  ruby: ${{ steps.ruby.outputs.versions }}
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v5
20
20
  - name: Setup ruby
21
21
  uses: ruby/setup-ruby@v1
22
22
  with:
@@ -26,6 +26,7 @@ jobs:
26
26
  run: bundle exec rake rubocop
27
27
  - id: ruby
28
28
  uses: voxpupuli/ruby-version@v1
29
+
29
30
  test:
30
31
  name: "Ruby ${{ matrix.ruby }}"
31
32
  needs: rubocop_and_matrix
@@ -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: Install Ruby ${{ matrix.ruby }}
40
41
  uses: ruby/setup-ruby@v1
41
42
  with:
@@ -47,11 +48,16 @@ jobs:
47
48
  run: bundle exec cucumber
48
49
  - name: Build gem
49
50
  run: gem build --strict --verbose *.gemspec
51
+
50
52
  tests:
53
+ if: always()
51
54
  needs:
52
55
  - rubocop_and_matrix
53
56
  - test
54
- runs-on: ubuntu-latest
57
+ runs-on: ubuntu-24.04
55
58
  name: Test suite
56
59
  steps:
57
- - run: echo Test suite completed
60
+ - name: Decide whether the needed jobs succeeded or failed
61
+ uses: re-actors/alls-green@release/v1
62
+ with:
63
+ jobs: ${{ toJSON(needs) }}
@@ -15,7 +15,7 @@ jobs:
15
15
  name: Build the gem
16
16
  runs-on: ubuntu-24.04
17
17
  steps:
18
- - uses: actions/checkout@v4
18
+ - uses: actions/checkout@v5
19
19
  - name: Install Ruby
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
@@ -39,7 +39,7 @@ jobs:
39
39
  contents: write # clone repo and create release
40
40
  steps:
41
41
  - name: Download gem from GitHub cache
42
- uses: actions/download-artifact@v4
42
+ uses: actions/download-artifact@v5
43
43
  with:
44
44
  name: gem-artifact
45
45
  - name: Create Release
@@ -56,7 +56,7 @@ jobs:
56
56
  packages: write # publish to rubygems.pkg.github.com
57
57
  steps:
58
58
  - name: Download gem from GitHub cache
59
- uses: actions/download-artifact@v4
59
+ uses: actions/download-artifact@v5
60
60
  with:
61
61
  name: gem-artifact
62
62
  - name: Publish gem to GitHub packages
@@ -73,7 +73,7 @@ jobs:
73
73
  id-token: write # rubygems.org authentication
74
74
  steps:
75
75
  - name: Download gem from GitHub cache
76
- uses: actions/download-artifact@v4
76
+ uses: actions/download-artifact@v5
77
77
  with:
78
78
  name: gem-artifact
79
79
  - uses: rubygems/configure-rubygems-credentials@v1.0.0
@@ -92,7 +92,7 @@ jobs:
92
92
  - release-to-rubygems
93
93
  steps:
94
94
  - name: Download gem from GitHub cache
95
- uses: actions/download-artifact@v4
95
+ uses: actions/download-artifact@v5
96
96
  with:
97
97
  name: gem-artifact
98
98
  - name: Install Ruby
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 2025-05-21 12:14:38 UTC using RuboCop version 1.75.6.
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
@@ -17,6 +17,14 @@ Lint/UselessConstantScoping:
17
17
  Exclude:
18
18
  - 'spec/helpers/faker/puppet_module_remote_repo.rb'
19
19
 
20
+ # Offense count: 2
21
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
22
+ # AllowedMethods: call
23
+ # WaywardPredicates: nonzero?
24
+ Naming/PredicateMethod:
25
+ Exclude:
26
+ - 'lib/modulesync/repository.rb'
27
+
20
28
  # Offense count: 3
21
29
  # Configuration parameters: Prefixes, AllowedPatterns.
22
30
  # Prefixes: when, with, without
@@ -44,10 +52,6 @@ RSpec/InstanceVariable:
44
52
  RSpec/MessageSpies:
45
53
  EnforcedStyle: receive
46
54
 
47
- # Offense count: 6
48
- RSpec/MultipleExpectations:
49
- Max: 2
50
-
51
55
  # Offense count: 10
52
56
  # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
53
57
  # SupportedStyles: always, named_only
@@ -92,7 +96,7 @@ Style/Documentation:
92
96
 
93
97
  # Offense count: 4
94
98
  # This cop supports safe autocorrection (--autocorrect).
95
- # Configuration parameters: AllowedVars.
99
+ # Configuration parameters: AllowedVars, DefaultToNil.
96
100
  Style/FetchEnvVar:
97
101
  Exclude:
98
102
  - 'lib/modulesync/git_service.rb'
@@ -106,7 +110,7 @@ Style/OptionalBooleanParameter:
106
110
 
107
111
  # Offense count: 6
108
112
  # This cop supports safe autocorrection (--autocorrect).
109
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
113
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
110
114
  # URISchemes: http, https
111
115
  Layout/LineLength:
112
116
  Max: 169
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [4.0.0](https://github.com/voxpupuli/modulesync/tree/4.0.0) (2025-08-28)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.5.0...4.0.0)
8
+
9
+ **Breaking changes:**
10
+
11
+ - Require Ruby 3.2+ [\#317](https://github.com/voxpupuli/modulesync/pull/317) ([bastelfreak](https://github.com/bastelfreak))
12
+ - Drop ruby older than 3.2.0 [\#312](https://github.com/voxpupuli/modulesync/pull/312) ([traylenator](https://github.com/traylenator))
13
+
14
+ **Implemented enhancements:**
15
+
16
+ - Allow YAML aliases in configuration [\#311](https://github.com/voxpupuli/modulesync/pull/311) ([traylenator](https://github.com/traylenator))
17
+
18
+
5
19
  ## [3.5.0](https://github.com/voxpupuli/modulesync/tree/3.5.0) (2025-07-23)
6
20
 
7
21
  [Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.4.2...3.5.0)
@@ -13,7 +13,7 @@ module ModuleSync
13
13
  # - show subcommands help using `msync subcommand --help`
14
14
  class Thor < ::Thor
15
15
  def self.start(*args)
16
- if (Thor::HELP_MAPPINGS & ARGV).any? && subcommands.none? { |command| command.start_with?(ARGV[0]) }
16
+ if Thor::HELP_MAPPINGS.intersect?(ARGV) && subcommands.none? { |command| command.start_with?(ARGV[0]) }
17
17
  Thor::HELP_MAPPINGS.each do |cmd|
18
18
  if (match = ARGV.delete(cmd))
19
19
  ARGV.unshift match
@@ -145,7 +145,7 @@ module ModuleSync
145
145
  opts_commit = { amend: true } if options[:amend]
146
146
  opts_push = { force: true } if options[:force]
147
147
  if options[:pre_commit_script]
148
- script = "#{File.dirname(File.dirname(__FILE__))}/../contrib/#{options[:pre_commit_script]}"
148
+ script = "#{File.dirname(__FILE__, 2)}/../contrib/#{options[:pre_commit_script]}"
149
149
  `#{script} #{@directory}`
150
150
  end
151
151
  repo.commit(message, opts_commit)
@@ -206,8 +206,8 @@ module ModuleSync
206
206
  git.diff('HEAD', '--').any? || untracked_unignored_files.any?
207
207
  end
208
208
 
209
- def puts(*args)
210
- $stdout.puts(*args) if ModuleSync.options[:verbose]
209
+ def puts(*)
210
+ $stdout.puts(*) if ModuleSync.options[:verbose]
211
211
  end
212
212
  end
213
213
  end
@@ -12,7 +12,7 @@ module ModuleSync
12
12
 
13
13
  def self.parse_config(config_file)
14
14
  if File.exist?(config_file)
15
- YAML.load_file(config_file) || {}
15
+ YAML.load_file(config_file, aliases: true) || {}
16
16
  else
17
17
  puts "No config file under #{config_file} found, using default values"
18
18
  {}
data/modulesync.gemspec CHANGED
@@ -5,14 +5,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'modulesync'
8
- spec.version = '3.5.0'
8
+ spec.version = '4.0.0'
9
9
  spec.authors = ['Vox Pupuli']
10
10
  spec.email = ['voxpupuli@groups.io']
11
11
  spec.summary = 'Puppet Module Synchronizer'
12
12
  spec.description = 'Utility to synchronize common files across puppet modules in Github.'
13
13
  spec.homepage = 'https://github.com/voxpupuli/modulesync'
14
14
  spec.license = 'Apache-2.0'
15
- spec.required_ruby_version = '>= 2.7.0'
15
+ spec.required_ruby_version = '>= 3.2.0'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0")
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency 'cucumber', '~> 9.2'
23
23
  spec.add_development_dependency 'rake', '~> 13.2', '>= 13.2.1'
24
24
  spec.add_development_dependency 'rspec', '~> 3.13'
25
- spec.add_development_dependency 'voxpupuli-rubocop', '~> 3.1.0'
25
+ spec.add_development_dependency 'voxpupuli-rubocop', '~> 4.2.0'
26
26
 
27
27
  spec.add_dependency 'git', '~>1.7'
28
28
  spec.add_dependency 'gitlab', '>=4', '<6'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulesync
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
@@ -77,14 +77,14 @@ dependencies:
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: 3.1.0
80
+ version: 4.2.0
81
81
  type: :development
82
82
  prerelease: false
83
83
  version_requirements: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: 3.1.0
87
+ version: 4.2.0
88
88
  - !ruby/object:Gem::Dependency
89
89
  name: git
90
90
  requirement: !ruby/object:Gem::Requirement
@@ -249,7 +249,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
249
  requirements:
250
250
  - - ">="
251
251
  - !ruby/object:Gem::Version
252
- version: 2.7.0
252
+ version: 3.2.0
253
253
  required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - ">="