modulesync 3.4.2 → 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: 0606b5ae974f3a0206c67892a9d0d905a36683f67b766fca7b90585c98c085c8
4
- data.tar.gz: '087d043ed37b41106b14dc2886f2bf8f350eb859378a0f2c95ac089692375b08'
3
+ metadata.gz: 18b8c746ba0cde88e90c644943e3f9ceedd6f9b6b677133223e7706a0b71c568
4
+ data.tar.gz: 644c526cc5b4f004317634f1a6afeeec356e22190a8230f34141ef3fe961e52f
5
5
  SHA512:
6
- metadata.gz: ddaa1c588e3171a6b7ebad0c6fc3ea9a4e2446a0b5708f85f35446d97191c587676c76363654e1247171a444f8601da8d48ccd10b83ecc5cb75adfa229152068
7
- data.tar.gz: f911e1807549bb26088485835317ccf2fade4a7e0c97c74c2e4792b6061b329d2b9c73f0084ea46745953cedee7afaf3c04e5f9fac351252dda488192579ac66
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,29 @@
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
+
19
+ ## [3.5.0](https://github.com/voxpupuli/modulesync/tree/3.5.0) (2025-07-23)
20
+
21
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.4.2...3.5.0)
22
+
23
+ **Merged pull requests:**
24
+
25
+ - thor: require 1.4 or newer [\#309](https://github.com/voxpupuli/modulesync/pull/309) ([kenyon](https://github.com/kenyon))
26
+ - README: change example config to voxpupuli [\#308](https://github.com/voxpupuli/modulesync/pull/308) ([trefzer](https://github.com/trefzer))
27
+
5
28
  ## [3.4.2](https://github.com/voxpupuli/modulesync/tree/3.4.2) (2025-06-27)
6
29
 
7
30
  [Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.4.1...3.4.2)
data/README.md CHANGED
@@ -64,8 +64,8 @@ How It Works
64
64
  ModuleSync is a gem that uses the GitHub workflow to clone, update, and push module
65
65
  repositories. It expects to be activated from a directory containing
66
66
  configuration for modulesync and the modules, or you can pass it the location
67
- of this configuration directory. [The configuration for the Puppet Labs
68
- modules](https://github.com/puppetlabs/modulesync_configs), can be used as an
67
+ of this configuration directory. [The configuration for the Vox Pupuli
68
+ modules](https://github.com/voxpupuli/modulesync_config), can be used as an
69
69
  example for your own configuration. The configuration directory contains a
70
70
  directory called moduleroot which mirrors the structure of a module. The files
71
71
  in the moduleroot are ERB templates, and MUST be named after the target file,
@@ -442,8 +442,7 @@ workdir: modules/github-org/puppet-test
442
442
  The Templates
443
443
  -------------
444
444
 
445
- See [Puppet's modulesync\_configs](https://github.com/puppetlabs/modulesync_configs) and [Vox Pupuli's modulesync\_config](https://github.com/voxpupuli/modulesync_config)
446
- repositories for different templates currently in use.
445
+ See [Vox Pupuli's modulesync\_config](https://github.com/voxpupuli/modulesync_config) and [Puppet's modulesync\_configs (Archived)](https://github.com/puppetlabs/modulesync_configs) repositories for different templates currently in use.
447
446
 
448
447
  ## Transfer Notice
449
448
 
@@ -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.4.2'
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,13 +22,11 @@ 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'
29
29
  spec.add_dependency 'octokit', '>=4', '<10'
30
30
  spec.add_dependency 'puppet-blacksmith', '>= 3.0', '< 9'
31
- # 1.3.1 has a bug that was fixed in 1.3.2 https://github.com/rails/thor/pull/878
32
- # Allow 1.2 and newer, because Perforce facter 4.10.0 only allows < 1.3....
33
- spec.add_dependency 'thor', '~> 1.2', '!= 1.3.1'
31
+ spec.add_dependency 'thor', '~> 1.4'
34
32
  end
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.4.2
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
@@ -165,20 +165,14 @@ dependencies:
165
165
  requirements:
166
166
  - - "~>"
167
167
  - !ruby/object:Gem::Version
168
- version: '1.2'
169
- - - "!="
170
- - !ruby/object:Gem::Version
171
- version: 1.3.1
168
+ version: '1.4'
172
169
  type: :runtime
173
170
  prerelease: false
174
171
  version_requirements: !ruby/object:Gem::Requirement
175
172
  requirements:
176
173
  - - "~>"
177
174
  - !ruby/object:Gem::Version
178
- version: '1.2'
179
- - - "!="
180
- - !ruby/object:Gem::Version
181
- version: 1.3.1
175
+ version: '1.4'
182
176
  description: Utility to synchronize common files across puppet modules in Github.
183
177
  email:
184
178
  - voxpupuli@groups.io
@@ -255,14 +249,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
249
  requirements:
256
250
  - - ">="
257
251
  - !ruby/object:Gem::Version
258
- version: 2.7.0
252
+ version: 3.2.0
259
253
  required_rubygems_version: !ruby/object:Gem::Requirement
260
254
  requirements:
261
255
  - - ">="
262
256
  - !ruby/object:Gem::Version
263
257
  version: '0'
264
258
  requirements: []
265
- rubygems_version: 3.6.7
259
+ rubygems_version: 3.6.9
266
260
  specification_version: 4
267
261
  summary: Puppet Module Synchronizer
268
262
  test_files: []