modulesync 2.5.0 → 2.7.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: dab88d217406b70303f6514b14c56a6ec6652b962d3fa16fd967e36fdb17b0b4
4
- data.tar.gz: 18f7c8f38c273f248f80005b2edd6fe5528138739aad2daf0ffe11f22fad40e6
3
+ metadata.gz: 0b41363f2082735169f5f59ef530b697635f02fe189a217ce2709a2169774909
4
+ data.tar.gz: 68d900d78098bc423e3eab0844263c851bc1bf5771c04f1d9173775b36445f96
5
5
  SHA512:
6
- metadata.gz: 4be95c61128a95c5cb28689f6abe256f7c164a197ef44028a58963139a474568ec82aef11adc6608b3a9681b126014ccb699ea4b82686558563e41740d6608f0
7
- data.tar.gz: 6341644230ec2cd827180917c692cbf6e6abc3c5e8866f5c72ba415d3079517a910ebee988fe9009f693b3d2dcd91b1e50c7403071088ab234b13157b0902c0d
6
+ metadata.gz: 2bf91667d4f67255917c8accd52de69600544d256c1802c67eea94d12ef96b2463e10ed3056045cf2694e54dd788446f8c3432e0a7ea0a6954b8460db31a7864
7
+ data.tar.gz: d0aa6f428d9db4fa5af7046af60ee76cb310c325b09427833184d3d3f0d6f9179b2fd07c41ac472240f5e93ae211201e137791edfcdba1ef3a38dea32452a3b9
@@ -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,14 +14,14 @@ 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:
18
21
  ruby-version: '3.1'
19
22
  bundler-cache: true
20
23
  - name: Run linter
21
- run: bundle exec rubocop --format github
24
+ run: bundle exec rake rubocop
22
25
  test:
23
26
  needs: rubocop
24
27
  runs-on: ubuntu-latest
@@ -26,16 +29,15 @@ jobs:
26
29
  fail-fast: false
27
30
  matrix:
28
31
  include:
29
- - ruby: "2.5"
30
- - ruby: "2.6"
31
32
  - ruby: "2.7"
32
33
  - ruby: "3.0"
33
34
  - ruby: "3.1"
34
35
  codecov: "yes"
36
+ - ruby: "3.2"
35
37
  env:
36
38
  CODECOV: ${{ matrix.codecov }}
37
39
  steps:
38
- - uses: actions/checkout@v2
40
+ - uses: actions/checkout@v3
39
41
  - name: Install Ruby ${{ matrix.ruby }}
40
42
  uses: ruby/setup-ruby@v1
41
43
  with:
@@ -46,4 +48,12 @@ jobs:
46
48
  - name: Run behavior tests
47
49
  run: bundle exec cucumber
48
50
  - name: Build gem
49
- run: gem build *.gemspec
51
+ run: gem build --verbose *.gemspec
52
+ tests:
53
+ needs:
54
+ - rubocop
55
+ - test
56
+ runs-on: ubuntu-latest
57
+ name: Test suite
58
+ steps:
59
+ - run: echo Test suite completed
@@ -8,15 +8,17 @@ 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
- run: gem build *.gemspec
21
+ run: gem build --verbose *.gemspec
20
22
  - name: Publish gem to rubygems.org
21
23
  run: gem push *.gem
22
24
  env:
data/.rubocop.yml CHANGED
@@ -1,49 +1,5 @@
1
+ ---
1
2
  inherit_from: .rubocop_todo.yml
2
3
 
3
- require:
4
- - rubocop-performance
5
- - rubocop-rake
6
- - rubocop-rspec
7
-
8
- AllCops:
9
- TargetRubyVersion: 2.5
10
- NewCops: enable
11
- Exclude:
12
- - 'vendor/**/*'
13
- - 'tmp/**/*'
14
- - 'pkg/**/*'
15
- - 'lib/monkey_patches.rb'
16
- - 'spec/**/*'
17
- - 'Gemfile'
18
- - 'Rakefile'
19
-
20
- Style/FetchEnvVar:
21
- Enabled: false
22
-
23
- Style/HashSyntax:
24
- Enabled: false
25
-
26
- Style/TrailingCommaInArguments:
27
- EnforcedStyleForMultiline: comma
28
-
29
- Style/TrailingCommaInArrayLiteral:
30
- EnforcedStyleForMultiline: comma
31
-
32
- Style/TrailingCommaInHashLiteral:
33
- EnforcedStyleForMultiline: comma
34
-
35
- Layout/LineContinuationLeadingSpace:
36
- Enabled: false
37
-
38
- # sane line length
39
- Layout/LineLength:
40
- Max: 120
41
- Exclude:
42
- - 'features/**/*'
43
-
44
- Style/FrozenStringLiteralComment:
45
- Enabled: false
46
-
47
- # We explicitly prefer $stderr.puts over #warn
48
- Style/StderrPuts:
49
- Enabled: false
4
+ inherit_gem:
5
+ voxpupuli-rubocop: rubocop.yml
data/.rubocop_todo.yml CHANGED
@@ -1,45 +1,114 @@
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-06-16 18:17:35 UTC using RuboCop version 1.50.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
9
  # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: Include.
12
- # Include: **/*.gemspec
13
- Gemspec/RequireMFA:
10
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
11
+ Lint/DuplicateBranch:
14
12
  Exclude:
15
- - 'modulesync.gemspec'
13
+ - 'lib/modulesync/renderer.rb'
16
14
 
17
- # Offense count: 9
18
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
19
- Metrics/AbcSize:
20
- Max: 60
15
+ # Offense count: 1
16
+ # Configuration parameters: AllowComments, AllowNil.
17
+ Lint/SuppressedException:
18
+ Exclude:
19
+ - 'Rakefile'
21
20
 
22
- # Offense count: 2
23
- # Configuration parameters: CountComments, CountAsOne.
24
- Metrics/ClassLength:
25
- Max: 186
21
+ # Offense count: 1
22
+ # This cop supports unsafe autocorrection (--autocorrect-all).
23
+ Performance/StringInclude:
24
+ Exclude:
25
+ - 'Rakefile'
26
26
 
27
27
  # Offense count: 5
28
- # Configuration parameters: IgnoredMethods.
29
- Metrics/CyclomaticComplexity:
30
- Max: 15
28
+ # This cop supports unsafe autocorrection (--autocorrect-all).
29
+ RSpec/BeEq:
30
+ Exclude:
31
+ - 'spec/unit/modulesync/settings_spec.rb'
32
+
33
+ # Offense count: 3
34
+ # Configuration parameters: Prefixes, AllowedPatterns.
35
+ # Prefixes: when, with, without
36
+ RSpec/ContextWording:
37
+ Exclude:
38
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
39
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
40
+ - 'spec/unit/modulesync_spec.rb'
31
41
 
32
42
  # Offense count: 17
33
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
34
- Metrics/MethodLength:
35
- Max: 34
43
+ # This cop supports unsafe autocorrection (--autocorrect-all).
44
+ # Configuration parameters: SkipBlocks, EnforcedStyle.
45
+ # SupportedStyles: described_class, explicit
46
+ RSpec/DescribedClass:
47
+ Exclude:
48
+ - 'spec/unit/modulesync/git_service/factory_spec.rb'
49
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
50
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
51
+ - 'spec/unit/modulesync/git_service_spec.rb'
52
+ - 'spec/unit/modulesync/settings_spec.rb'
53
+ - 'spec/unit/modulesync/source_code_spec.rb'
54
+ - 'spec/unit/modulesync_spec.rb'
36
55
 
37
- # Offense count: 4
38
- # Configuration parameters: IgnoredMethods.
39
- Metrics/PerceivedComplexity:
56
+ # Offense count: 11
57
+ # Configuration parameters: CountAsOne.
58
+ RSpec/ExampleLength:
40
59
  Max: 16
41
60
 
42
- # Offense count: 8
61
+ # Offense count: 7
62
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
63
+ # Include: **/*_spec*rb*, **/spec/**/*
64
+ RSpec/FilePath:
65
+ Exclude:
66
+ - 'spec/unit/modulesync/git_service/factory_spec.rb'
67
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
68
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
69
+ - 'spec/unit/modulesync/git_service_spec.rb'
70
+ - 'spec/unit/modulesync/settings_spec.rb'
71
+ - 'spec/unit/modulesync/source_code_spec.rb'
72
+ - 'spec/unit/modulesync_spec.rb'
73
+
74
+ # Offense count: 19
75
+ # Configuration parameters: AssignmentOnly.
76
+ RSpec/InstanceVariable:
77
+ Exclude:
78
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
79
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
80
+
81
+ # Offense count: 7
82
+ # Configuration parameters: .
83
+ # SupportedStyles: have_received, receive
84
+ RSpec/MessageSpies:
85
+ EnforcedStyle: receive
86
+
87
+ # Offense count: 6
88
+ RSpec/MultipleExpectations:
89
+ Max: 2
90
+
91
+ # Offense count: 10
92
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
93
+ # SupportedStyles: always, named_only
94
+ RSpec/NamedSubject:
95
+ Exclude:
96
+ - 'spec/unit/modulesync/settings_spec.rb'
97
+ - 'spec/unit/modulesync/source_code_spec.rb'
98
+
99
+ # Offense count: 9
100
+ # Configuration parameters: AllowedGroups.
101
+ RSpec/NestedGroups:
102
+ Max: 5
103
+
104
+ # Offense count: 6
105
+ RSpec/StubbedMock:
106
+ Exclude:
107
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
108
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
109
+ - 'spec/unit/modulesync_spec.rb'
110
+
111
+ # Offense count: 9
43
112
  # Configuration parameters: AllowedConstants.
44
113
  Style/Documentation:
45
114
  Exclude:
@@ -50,6 +119,27 @@ Style/Documentation:
50
119
  - 'lib/modulesync/hook.rb'
51
120
  - 'lib/modulesync/renderer.rb'
52
121
  - 'lib/modulesync/util.rb'
122
+ - 'lib/monkey_patches.rb'
123
+
124
+ # Offense count: 4
125
+ # This cop supports safe autocorrection (--autocorrect).
126
+ # Configuration parameters: AllowedVars.
127
+ Style/FetchEnvVar:
128
+ Exclude:
129
+ - 'lib/modulesync/git_service.rb'
130
+
131
+ # Offense count: 34
132
+ # This cop supports unsafe autocorrection (--autocorrect-all).
133
+ # Configuration parameters: EnforcedStyle.
134
+ # SupportedStyles: always, always_true, never
135
+ Style/FrozenStringLiteralComment:
136
+ Enabled: false
137
+
138
+ # Offense count: 2
139
+ # This cop supports unsafe autocorrection (--autocorrect-all).
140
+ Style/IdenticalConditionalBranches:
141
+ Exclude:
142
+ - 'lib/modulesync/renderer.rb'
53
143
 
54
144
  # Offense count: 1
55
145
  # Configuration parameters: AllowedMethods.
@@ -57,3 +147,10 @@ Style/Documentation:
57
147
  Style/OptionalBooleanParameter:
58
148
  Exclude:
59
149
  - 'lib/modulesync/puppet_module.rb'
150
+
151
+ # Offense count: 6
152
+ # This cop supports safe autocorrection (--autocorrect).
153
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
154
+ # URISchemes: http, https
155
+ Layout/LineLength:
156
+ Max: 169
data/CHANGELOG.md CHANGED
@@ -2,6 +2,42 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.7.0](https://github.com/voxpupuli/modulesync/tree/2.7.0) (2023-06-16)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.6.0...2.7.0)
8
+
9
+ **Breaking changes:**
10
+
11
+ - Drop EoL Ruby 2.5/2.6 support [\#270](https://github.com/voxpupuli/modulesync/pull/270) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Update puppet-blacksmith requirement from \>= 3.0, \< 7 to \>= 3.0, \< 8 [\#268](https://github.com/voxpupuli/modulesync/pull/268) ([dependabot[bot]](https://github.com/apps/dependabot))
16
+ - Update octokit requirement from ~\> 4.0 to \>= 4, \< 7 [\#263](https://github.com/voxpupuli/modulesync/pull/263) ([dependabot[bot]](https://github.com/apps/dependabot))
17
+
18
+ ## [2.6.0](https://github.com/voxpupuli/modulesync/tree/2.6.0) (2023-04-14)
19
+
20
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.5.0...2.6.0)
21
+
22
+ **Implemented enhancements:**
23
+
24
+ - Add Ruby 3.2 support [\#266](https://github.com/voxpupuli/modulesync/pull/266) ([bastelfreak](https://github.com/bastelfreak))
25
+ - Update to latest RuboCop 1.28.2 [\#265](https://github.com/voxpupuli/modulesync/pull/265) ([bastelfreak](https://github.com/bastelfreak))
26
+
27
+ **Fixed bugs:**
28
+
29
+ - Fix compatibility with latest `ruby-git` [\#260](https://github.com/voxpupuli/modulesync/pull/260) ([alexjfisher](https://github.com/alexjfisher))
30
+
31
+ **Closed issues:**
32
+
33
+ - msync update --noop is broken with git 1.17.x [\#259](https://github.com/voxpupuli/modulesync/issues/259)
34
+
35
+ **Merged pull requests:**
36
+
37
+ - Add CI best practices [\#264](https://github.com/voxpupuli/modulesync/pull/264) ([bastelfreak](https://github.com/bastelfreak))
38
+ - Bump actions/checkout from 2 to 3 [\#262](https://github.com/voxpupuli/modulesync/pull/262) ([dependabot[bot]](https://github.com/apps/dependabot))
39
+ - dependabot: check for github actions and gems [\#261](https://github.com/voxpupuli/modulesync/pull/261) ([bastelfreak](https://github.com/bastelfreak))
40
+
5
41
  ## [2.5.0](https://github.com/voxpupuli/modulesync/tree/2.5.0) (2022-10-14)
6
42
 
7
43
  [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.4.0...2.5.0)
data/Gemfile CHANGED
@@ -2,11 +2,12 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- group :release do
6
- 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', require: false
7
8
  end
8
9
 
9
- group :coverage, optional: ENV['CODECOV']!='yes' do
10
- gem 'simplecov-console', :require => false
11
- gem 'codecov', :require => false
10
+ group :coverage, optional: ENV['CODECOV'] != 'yes' do
11
+ gem 'codecov', require: false
12
+ gem 'simplecov-console', require: false
12
13
  end
data/Rakefile CHANGED
@@ -9,7 +9,11 @@ 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 'voxpupuli/rubocop/rake'
14
+ rescue LoadError
15
+ # RuboCop is an optional group
16
+ end
13
17
 
14
18
  CLEAN.include('pkg/', 'tmp/')
15
19
 
@@ -18,8 +22,8 @@ Cucumber::Rake::Task.new do |t|
18
22
  t.cucumber_opts << '--format pretty'
19
23
  end
20
24
 
21
- task :test => %i[clean spec cucumber rubocop]
22
- task :default => %i[test]
25
+ task test: %i[clean spec cucumber rubocop]
26
+ task default: %i[test]
23
27
 
24
28
  begin
25
29
  require 'github_changelog_generator/task'
@@ -33,7 +37,7 @@ begin
33
37
 
34
38
  # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
35
39
  require 'rbconfig'
36
- if RbConfig::CONFIG['host_os'] =~ /linux/
40
+ if /linux/.match?(RbConfig::CONFIG['host_os'])
37
41
  task :changelog do
38
42
  puts 'Fixing line endings...'
39
43
  changelog_file = File.join(__dir__, 'CHANGELOG.md')
@@ -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
  """