modulesync 2.5.0 → 2.6.0

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: dab88d217406b70303f6514b14c56a6ec6652b962d3fa16fd967e36fdb17b0b4
4
- data.tar.gz: 18f7c8f38c273f248f80005b2edd6fe5528138739aad2daf0ffe11f22fad40e6
3
+ metadata.gz: 16c0c39c9e9c25f2f153464a9b0eaaa32d84d2d0586620e479676d4900503ae9
4
+ data.tar.gz: 328deb34bae7f84f47969b289b121a0f241dbde49756d881963f21dac0842595
5
5
  SHA512:
6
- metadata.gz: 4be95c61128a95c5cb28689f6abe256f7c164a197ef44028a58963139a474568ec82aef11adc6608b3a9681b126014ccb699ea4b82686558563e41740d6608f0
7
- data.tar.gz: 6341644230ec2cd827180917c692cbf6e6abc3c5e8866f5c72ba415d3079517a910ebee988fe9009f693b3d2dcd91b1e50c7403071088ab234b13157b0902c0d
6
+ metadata.gz: 42ca23a6203c31ceab58cb653070763e309606255107fec64239ce4808744073975dee48d8a397a3eb5cdc458882e29c126413aae6fc36eafd64024cb4441243
7
+ data.tar.gz: 33543edf6757f1988c5fca4a382a3b939a53647764bf0fc4291f6076c188749f72f5036438cc93b91999b7268c65400b34059b050ba0b6857eb89e9758de11ad
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ # raise PRs for gem updates
4
+ - package-ecosystem: bundler
5
+ directory: "/"
6
+ schedule:
7
+ interval: daily
8
+ time: "13:00"
9
+ open-pull-requests-limit: 10
10
+
11
+ # Maintain dependencies for GitHub Actions
12
+ - package-ecosystem: github-actions
13
+ directory: "/"
14
+ schedule:
15
+ interval: daily
16
+ time: "13:00"
17
+ open-pull-requests-limit: 10
@@ -1,8 +1,11 @@
1
1
  ---
2
- name: CI
2
+ name: ⚒️ CI
3
+
3
4
  on:
4
- - pull_request
5
- - push
5
+ pull_request: {}
6
+ push:
7
+ branches:
8
+ - master
6
9
 
7
10
  env:
8
11
  BUNDLE_WITHOUT: release
@@ -11,7 +14,7 @@ jobs:
11
14
  rubocop:
12
15
  runs-on: ubuntu-latest
13
16
  steps:
14
- - uses: actions/checkout@v2
17
+ - uses: actions/checkout@v3
15
18
  - name: Setup ruby
16
19
  uses: ruby/setup-ruby@v1
17
20
  with:
@@ -32,10 +35,11 @@ jobs:
32
35
  - ruby: "3.0"
33
36
  - ruby: "3.1"
34
37
  codecov: "yes"
38
+ - ruby: "3.2"
35
39
  env:
36
40
  CODECOV: ${{ matrix.codecov }}
37
41
  steps:
38
- - uses: actions/checkout@v2
42
+ - uses: actions/checkout@v3
39
43
  - name: Install Ruby ${{ matrix.ruby }}
40
44
  uses: ruby/setup-ruby@v1
41
45
  with:
@@ -47,3 +51,11 @@ jobs:
47
51
  run: bundle exec cucumber
48
52
  - name: Build gem
49
53
  run: gem build *.gemspec
54
+ tests:
55
+ needs:
56
+ - rubocop
57
+ - test
58
+ runs-on: ubuntu-latest
59
+ name: Test suite
60
+ steps:
61
+ - run: echo Test suite completed
@@ -8,13 +8,15 @@ on:
8
8
  jobs:
9
9
  release:
10
10
  runs-on: ubuntu-latest
11
- if: github.repository == 'voxpupuli/modulesync'
11
+ if: github.repository_owner == 'voxpupuli'
12
12
  steps:
13
- - uses: actions/checkout@v2
14
- - name: Install Ruby 3.1
13
+ - uses: actions/checkout@v3
14
+ - name: Install Ruby 3.2
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
17
- ruby-version: '3.1'
17
+ ruby-version: '3.2'
18
+ env:
19
+ BUNDLE_WITHOUT: release
18
20
  - name: Build gem
19
21
  run: gem build *.gemspec
20
22
  - name: Publish gem to rubygems.org
data/.rubocop.yml CHANGED
@@ -32,9 +32,6 @@ Style/TrailingCommaInArrayLiteral:
32
32
  Style/TrailingCommaInHashLiteral:
33
33
  EnforcedStyleForMultiline: comma
34
34
 
35
- Layout/LineContinuationLeadingSpace:
36
- Enabled: false
37
-
38
35
  # sane line length
39
36
  Layout/LineLength:
40
37
  Max: 120
@@ -47,3 +44,7 @@ Style/FrozenStringLiteralComment:
47
44
  # We explicitly prefer $stderr.puts over #warn
48
45
  Style/StderrPuts:
49
46
  Enabled: false
47
+
48
+ Gemspec/RequireMFA:
49
+ Exclude:
50
+ - 'modulesync.gemspec'
data/.rubocop_todo.yml CHANGED
@@ -1,20 +1,12 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2022-02-14 21:55:21 UTC using RuboCop version 1.24.1.
3
+ # on 2023-04-14 18:50:10 UTC using RuboCop version 1.28.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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: Include.
12
- # Include: **/*.gemspec
13
- Gemspec/RequireMFA:
14
- Exclude:
15
- - 'modulesync.gemspec'
16
-
17
- # Offense count: 9
9
+ # Offense count: 10
18
10
  # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
19
11
  Metrics/AbcSize:
20
12
  Max: 60
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
+ ## [2.6.0](https://github.com/voxpupuli/modulesync/tree/2.6.0) (2023-04-14)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.5.0...2.6.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Add Ruby 3.2 support [\#266](https://github.com/voxpupuli/modulesync/pull/266) ([bastelfreak](https://github.com/bastelfreak))
12
+ - Update to latest RuboCop 1.28.2 [\#265](https://github.com/voxpupuli/modulesync/pull/265) ([bastelfreak](https://github.com/bastelfreak))
13
+
14
+ **Fixed bugs:**
15
+
16
+ - Fix compatibility with latest `ruby-git` [\#260](https://github.com/voxpupuli/modulesync/pull/260) ([alexjfisher](https://github.com/alexjfisher))
17
+
18
+ **Closed issues:**
19
+
20
+ - msync update --noop is broken with git 1.17.x [\#259](https://github.com/voxpupuli/modulesync/issues/259)
21
+
22
+ **Merged pull requests:**
23
+
24
+ - Add CI best practices [\#264](https://github.com/voxpupuli/modulesync/pull/264) ([bastelfreak](https://github.com/bastelfreak))
25
+ - Bump actions/checkout from 2 to 3 [\#262](https://github.com/voxpupuli/modulesync/pull/262) ([dependabot[bot]](https://github.com/apps/dependabot))
26
+ - dependabot: check for github actions and gems [\#261](https://github.com/voxpupuli/modulesync/pull/261) ([bastelfreak](https://github.com/bastelfreak))
27
+
5
28
  ## [2.5.0](https://github.com/voxpupuli/modulesync/tree/2.5.0) (2022-10-14)
6
29
 
7
30
  [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.4.0...2.5.0)
data/Rakefile CHANGED
@@ -9,7 +9,18 @@ rescue LoadError
9
9
  puts 'rspec not installed - skipping unit test task setup'
10
10
  end
11
11
 
12
- RuboCop::RakeTask.new
12
+ begin
13
+ require 'rubocop/rake_task'
14
+ rescue LoadError
15
+ # RuboCop is an optional group
16
+ else
17
+ RuboCop::RakeTask.new(:rubocop) do |task|
18
+ # These make the rubocop experience maybe slightly less terrible
19
+ task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
20
+ # Use Rubocop's Github Actions formatter if possible
21
+ task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
22
+ end
23
+ end
13
24
 
14
25
  CLEAN.include('pkg/', 'tmp/')
15
26
 
@@ -32,9 +32,8 @@ Feature: Create a pull-request/merge-request after update
32
32
  """
33
33
  ---
34
34
  puppet-test:
35
- gitlab: {
35
+ gitlab:
36
36
  base_url: 'https://gitlab.example.com'
37
- }
38
37
  """
39
38
  And I set the environment variables to:
40
39
  | variable | value |
@@ -60,9 +59,8 @@ Feature: Create a pull-request/merge-request after update
60
59
  """
61
60
  ---
62
61
  puppet-test:
63
- gitlab: {
62
+ gitlab:
64
63
  base_url: 'https://gitlab.example.com'
65
- }
66
64
  """
67
65
  And I set the environment variables to:
68
66
  | variable | value |
@@ -77,9 +75,8 @@ Feature: Create a pull-request/merge-request after update
77
75
  """
78
76
  ---
79
77
  puppet-test:
80
- gitlab: {
78
+ gitlab:
81
79
  base_url: https://gitlab.example.com
82
- }
83
80
  """
84
81
  And a file named "config_defaults.yml" with:
85
82
  """
@@ -22,9 +22,8 @@ module ModuleSync
22
22
  head = "#{namespace}:#{source_branch}"
23
23
 
24
24
  if noop
25
- $stdout.puts \
26
- "Using no-op. Would submit PR '#{title}' to '#{repo_path}' " \
27
- "- merges '#{source_branch}' into '#{target_branch}'"
25
+ $stdout.puts "Using no-op. Would submit PR '#{title}' to '#{repo_path}' " \
26
+ "- merges '#{source_branch}' into '#{target_branch}'"
28
27
  return
29
28
  end
30
29
 
@@ -28,9 +28,8 @@ module ModuleSync
28
28
 
29
29
  def _open_pull_request(repo_path:, namespace:, title:, message:, source_branch:, target_branch:, labels:, noop:) # rubocop:disable Metrics/ParameterLists, Lint/UnusedMethodArgument
30
30
  if noop
31
- $stdout.puts \
32
- "Using no-op. Would submit MR '#{title}' to '#{repo_path}' " \
33
- "- merges #{source_branch} into #{target_branch}"
31
+ $stdout.puts "Using no-op. Would submit MR '#{title}' to '#{repo_path}' " \
32
+ "- merges #{source_branch} into #{target_branch}"
34
33
  return
35
34
  end
36
35
 
@@ -15,10 +15,10 @@ module ModuleSync
15
15
  <<~CONTENT
16
16
  #!/usr/bin/env bash
17
17
 
18
- current_branch=\`git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,'\`
19
- git_dir=\`git rev-parse --show-toplevel\`
20
- message=\`git log -1 --format=%B\`
21
- msync -m "\$message" #{arguments}
18
+ current_branch=`git symbolic-ref HEAD | sed -e 's,.*/(.*),\1,'`
19
+ git_dir=`git rev-parse --show-toplevel`
20
+ message=`git log -1 --format=%B`
21
+ msync -m "$message" #{arguments}
22
22
  CONTENT
23
23
  end
24
24
 
@@ -31,6 +31,9 @@ module ModuleSync
31
31
  end
32
32
 
33
33
  def default_branch
34
+ # `Git.default_branch` requires ruby-git >= 1.17.0
35
+ return Git.default_branch(repo.dir) if Git.respond_to? :default_branch
36
+
34
37
  symbolic_ref = repo.branches.find { |b| b.full.include?('remotes/origin/HEAD') }
35
38
  return unless symbolic_ref
36
39
 
data/modulesync.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'modulesync'
6
- spec.version = '2.5.0'
6
+ spec.version = '2.6.0'
7
7
  spec.authors = ['Vox Pupuli']
8
8
  spec.email = ['voxpupuli@groups.io']
9
9
  spec.summary = 'Puppet Module Synchronizer'
@@ -16,12 +16,12 @@ Gem::Specification.new do |spec|
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_development_dependency 'aruba', '>= 0.14', '< 2'
19
+ spec.add_development_dependency 'aruba', '~>2.0'
20
20
  spec.add_development_dependency 'bundler'
21
21
  spec.add_development_dependency 'cucumber'
22
22
  spec.add_development_dependency 'rake'
23
23
  spec.add_development_dependency 'rspec'
24
- spec.add_development_dependency 'rubocop', '~> 1.2'
24
+ spec.add_development_dependency 'rubocop', '~> 1.28.2'
25
25
  spec.add_development_dependency 'rubocop-performance'
26
26
  spec.add_development_dependency 'rubocop-rake'
27
27
  spec.add_development_dependency 'rubocop-rspec'
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulesync
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-14 00:00:00.000000000 Z
11
+ date: 2023-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0.14'
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '2'
19
+ version: '2.0'
23
20
  type: :development
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '0.14'
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '2'
26
+ version: '2.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: bundler
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +86,14 @@ dependencies:
92
86
  requirements:
93
87
  - - "~>"
94
88
  - !ruby/object:Gem::Version
95
- version: '1.2'
89
+ version: 1.28.2
96
90
  type: :development
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
94
  - - "~>"
101
95
  - !ruby/object:Gem::Version
102
- version: '1.2'
96
+ version: 1.28.2
103
97
  - !ruby/object:Gem::Dependency
104
98
  name: rubocop-performance
105
99
  requirement: !ruby/object:Gem::Requirement
@@ -241,6 +235,7 @@ extensions: []
241
235
  extra_rdoc_files: []
242
236
  files:
243
237
  - ".config/cucumber.yml"
238
+ - ".github/dependabot.yml"
244
239
  - ".github/workflows/ci.yml"
245
240
  - ".github/workflows/release.yml"
246
241
  - ".gitignore"
@@ -315,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
310
  - !ruby/object:Gem::Version
316
311
  version: '0'
317
312
  requirements: []
318
- rubygems_version: 3.3.7
313
+ rubygems_version: 3.4.10
319
314
  signing_key:
320
315
  specification_version: 4
321
316
  summary: Puppet Module Synchronizer