ra10ke 1.2.0 → 3.0.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: c18588b9b0b4eb792bfcc75c573a7d8107840baf321c20ca4d0ba26aabc03912
4
- data.tar.gz: 1503a4fa9911f99ac01e12aebd8cbc7f8e3402aa385c411f0861fe082bcaacfd
3
+ metadata.gz: 831394d4b5c7c271c4677d789f2a5b39972813d06161c34eaa7346db9c79f968
4
+ data.tar.gz: 733635d7e5343acb84fe44722ff2f5e6676df727051c036383c5f23e53b5a9f5
5
5
  SHA512:
6
- metadata.gz: '078235ff75fc9d159333ef7e2eff5424e01e801e91480778fe035cd9aaba19a4073c0f0b48a2792f08afab4d1e9ac597a8ad4262b3afa220749862bdfb5e11ca'
7
- data.tar.gz: 3820689a48c0df80436ab56c3b0e27093f5951753ac6997fbfbb27cbccb3c13d2f8151ac01d65f1b8732aebe0b24b002be8fcc6caf5677b089ebdeb94b83f2d5
6
+ metadata.gz: bb1d2e33ac0dbabc35e2bf3f6c53a8fe21f1dac27a9a89f19d0cff0e418d3803bce05e6d7f6f470572d840edbf8e6d00cdb8bffc30cf46e7fc53a714facbaebc
7
+ data.tar.gz: 83134e8848e15148d27bf34818062e0421c366965e099b3ebe9d0b954db5cd38256b3e64ceabcccb056cb0472340b9faaf8c5518675987c545134c5ade01c848
@@ -1,11 +1,17 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
-
6
1
  version: 2
7
2
  updates:
8
- - package-ecosystem: "bundler" # See documentation for possible values
9
- directory: "/" # Location of package manifests
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: "/"
10
14
  schedule:
11
- interval: "daily"
15
+ interval: daily
16
+ time: "13:00"
17
+ open-pull-requests-limit: 10
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  if: github.repository_owner == 'voxpupuli'
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Install Ruby 3.0
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
@@ -1,35 +1,57 @@
1
1
  name: Test
2
2
 
3
3
  on:
4
- - pull_request
5
- - push
4
+ pull_request: {}
5
+ push:
6
+ branches:
7
+ - master
6
8
 
7
9
  env:
8
10
  BUNDLE_WITHOUT: release
9
11
 
10
12
  jobs:
13
+ rubocop:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Install Ruby ${{ matrix.ruby }}
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: "3.2"
21
+ bundler-cache: true
22
+ - name: Run Rubocop
23
+ run: bundle exec rake rubocop
11
24
  test:
12
25
  runs-on: ubuntu-latest
13
26
  strategy:
14
27
  fail-fast: false
15
28
  matrix:
16
29
  include:
17
- - ruby: "2.4"
18
- - ruby: "2.5"
19
- - ruby: "2.6"
20
30
  - ruby: "2.7"
21
31
  - ruby: "3.0"
32
+ - ruby: "3.1"
22
33
  coverage: "yes"
34
+ - ruby: "3.2"
23
35
  env:
24
36
  COVERAGE: ${{ matrix.coverage }}
37
+ name: Ruby ${{ matrix.ruby }}
25
38
  steps:
26
- - uses: actions/checkout@v2
39
+ - uses: actions/checkout@v3
27
40
  - name: Install Ruby ${{ matrix.ruby }}
28
41
  uses: ruby/setup-ruby@v1
29
42
  with:
30
43
  ruby-version: ${{ matrix.ruby }}
31
44
  bundler-cache: true
32
45
  - name: Run tests
33
- run: bundle exec rake
34
- - name: Build gem
35
- run: gem build *.gemspec
46
+ run: bundle exec rake spec
47
+ - name: Verify gem builds
48
+ run: gem build --strict --verbose *.gemspec
49
+
50
+ tests:
51
+ needs:
52
+ - rubocop
53
+ - test
54
+ runs-on: ubuntu-latest
55
+ name: Test suite
56
+ steps:
57
+ - run: echo Test suite completed
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ inherit_gem:
5
+ voxpupuli-rubocop: rubocop.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,262 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-08-23 12:05:42 UTC using RuboCop version 1.54.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: AllowedParentClasses.
11
+ Lint/MissingSuper:
12
+ Exclude:
13
+ - 'lib/ra10ke.rb'
14
+
15
+ # Offense count: 1
16
+ Lint/NoReturnInBeginEndBlocks:
17
+ Exclude:
18
+ - 'lib/ra10ke/puppetfile_parser.rb'
19
+
20
+ # Offense count: 1
21
+ # Configuration parameters: AllowComments, AllowNil.
22
+ Lint/SuppressedException:
23
+ Exclude:
24
+ - 'Rakefile'
25
+
26
+ # Offense count: 5
27
+ # This cop supports unsafe autocorrection (--autocorrect-all).
28
+ Lint/UselessAssignment:
29
+ Exclude:
30
+ - 'lib/ra10ke/dependencies.rb'
31
+ - 'lib/ra10ke/solve.rb'
32
+
33
+ # Offense count: 1
34
+ Naming/AccessorMethodName:
35
+ Exclude:
36
+ - 'lib/ra10ke.rb'
37
+
38
+ # Offense count: 1
39
+ # Configuration parameters: ForbiddenDelimiters.
40
+ # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
41
+ Naming/HeredocDelimiterNaming:
42
+ Exclude:
43
+ - 'lib/ra10ke/dependencies.rb'
44
+
45
+ # Offense count: 1
46
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
47
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
48
+ Naming/MethodParameterName:
49
+ Exclude:
50
+ - 'lib/ra10ke/solve.rb'
51
+
52
+ # Offense count: 2
53
+ # This cop supports unsafe autocorrection (--autocorrect-all).
54
+ Performance/Count:
55
+ Exclude:
56
+ - 'lib/ra10ke/validate.rb'
57
+ - 'spec/ra10ke/validate_spec.rb'
58
+
59
+ # Offense count: 2
60
+ # This cop supports unsafe autocorrection (--autocorrect-all).
61
+ Performance/MapCompact:
62
+ Exclude:
63
+ - 'lib/ra10ke/dependencies.rb'
64
+ - 'lib/ra10ke/puppetfile_parser.rb'
65
+
66
+ # Offense count: 4
67
+ RSpec/AnyInstance:
68
+ Exclude:
69
+ - 'spec/ra10ke/validate_spec.rb'
70
+ - 'spec/ra10ke_spec.rb'
71
+
72
+ # Offense count: 3
73
+ # This cop supports unsafe autocorrection (--autocorrect-all).
74
+ RSpec/BeEq:
75
+ Exclude:
76
+ - 'spec/ra10ke/deprecation_spec.rb'
77
+
78
+ # Offense count: 6
79
+ # Configuration parameters: Prefixes, AllowedPatterns.
80
+ # Prefixes: when, with, without
81
+ RSpec/ContextWording:
82
+ Exclude:
83
+ - 'spec/ra10ke/dependencies_spec.rb'
84
+
85
+ # Offense count: 5
86
+ # Configuration parameters: CountAsOne.
87
+ RSpec/ExampleLength:
88
+ Max: 31
89
+
90
+ # Offense count: 10
91
+ RSpec/ExpectInHook:
92
+ Exclude:
93
+ - 'spec/ra10ke/validate_spec.rb'
94
+
95
+ # Offense count: 15
96
+ # Configuration parameters: .
97
+ # SupportedStyles: have_received, receive
98
+ RSpec/MessageSpies:
99
+ EnforcedStyle: receive
100
+
101
+ # Offense count: 7
102
+ RSpec/MultipleExpectations:
103
+ Max: 3
104
+
105
+ # Offense count: 1
106
+ # Configuration parameters: AllowedPatterns.
107
+ # AllowedPatterns: ^expect_, ^assert_
108
+ RSpec/NoExpectationExample:
109
+ Exclude:
110
+ - 'spec/ra10ke/dependencies_spec.rb'
111
+
112
+ # Offense count: 12
113
+ RSpec/StubbedMock:
114
+ Exclude:
115
+ - 'spec/ra10ke/deprecation_spec.rb'
116
+ - 'spec/ra10ke/validate_spec.rb'
117
+
118
+ # Offense count: 7
119
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
120
+ RSpec/VerifiedDoubles:
121
+ Exclude:
122
+ - 'spec/ra10ke/deprecation_spec.rb'
123
+ - 'spec/ra10ke/validate_spec.rb'
124
+
125
+ # Offense count: 1
126
+ RSpec/VoidExpect:
127
+ Exclude:
128
+ - 'spec/ra10ke/git_repo_spec.rb'
129
+
130
+ # Offense count: 6
131
+ # This cop supports unsafe autocorrection (--autocorrect-all).
132
+ # Configuration parameters: EnforcedStyle.
133
+ # SupportedStyles: nested, compact
134
+ Style/ClassAndModuleChildren:
135
+ Exclude:
136
+ - 'lib/ra10ke/dependencies.rb'
137
+ - 'lib/ra10ke/deprecation.rb'
138
+ - 'lib/ra10ke/duplicates.rb'
139
+ - 'lib/ra10ke/install.rb'
140
+ - 'lib/ra10ke/solve.rb'
141
+ - 'lib/ra10ke/syntax.rb'
142
+
143
+ # Offense count: 1
144
+ # This cop supports unsafe autocorrection (--autocorrect-all).
145
+ # Configuration parameters: AllowedReceivers.
146
+ Style/CollectionCompact:
147
+ Exclude:
148
+ - 'lib/ra10ke/dependencies.rb'
149
+
150
+ # Offense count: 15
151
+ # Configuration parameters: AllowedConstants.
152
+ Style/Documentation:
153
+ Exclude:
154
+ - 'spec/**/*'
155
+ - 'test/**/*'
156
+ - 'lib/ra10ke.rb'
157
+ - 'lib/ra10ke/dependencies.rb'
158
+ - 'lib/ra10ke/deprecation.rb'
159
+ - 'lib/ra10ke/duplicates.rb'
160
+ - 'lib/ra10ke/git_repo.rb'
161
+ - 'lib/ra10ke/install.rb'
162
+ - 'lib/ra10ke/monkey_patches.rb'
163
+ - 'lib/ra10ke/puppetfile_parser.rb'
164
+ - 'lib/ra10ke/solve.rb'
165
+ - 'lib/ra10ke/syntax.rb'
166
+ - 'lib/ra10ke/validate.rb'
167
+
168
+ # Offense count: 5
169
+ # This cop supports safe autocorrection (--autocorrect).
170
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
171
+ # SupportedStyles: annotated, template, unannotated
172
+ Style/FormatStringToken:
173
+ EnforcedStyle: unannotated
174
+
175
+ # Offense count: 11
176
+ # This cop supports unsafe autocorrection (--autocorrect-all).
177
+ # Configuration parameters: EnforcedStyle.
178
+ # SupportedStyles: always, always_true, never
179
+ Style/FrozenStringLiteralComment:
180
+ Exclude:
181
+ - 'Gemfile'
182
+ - 'Rakefile'
183
+ - 'lib/ra10ke.rb'
184
+ - 'lib/ra10ke/dependencies.rb'
185
+ - 'lib/ra10ke/install.rb'
186
+ - 'lib/ra10ke/puppetfile_parser.rb'
187
+ - 'lib/ra10ke/solve.rb'
188
+ - 'lib/ra10ke/syntax.rb'
189
+ - 'lib/ra10ke/version.rb'
190
+ - 'ra10ke.gemspec'
191
+ - 'spec/ra10ke/puppetfile_parser_spec.rb'
192
+
193
+ # Offense count: 1
194
+ # This cop supports unsafe autocorrection (--autocorrect-all).
195
+ # Configuration parameters: InverseMethods, InverseBlocks.
196
+ Style/InverseMethods:
197
+ Exclude:
198
+ - 'lib/ra10ke/dependencies.rb'
199
+
200
+ # Offense count: 1
201
+ Style/MultilineBlockChain:
202
+ Exclude:
203
+ - 'lib/ra10ke/dependencies.rb'
204
+
205
+ # Offense count: 1
206
+ # This cop supports unsafe autocorrection (--autocorrect-all).
207
+ # Configuration parameters: EnforcedStyle.
208
+ # SupportedStyles: literals, strict
209
+ Style/MutableConstant:
210
+ Exclude:
211
+ - 'lib/ra10ke/version.rb'
212
+
213
+ # Offense count: 1
214
+ # This cop supports unsafe autocorrection (--autocorrect-all).
215
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
216
+ # SupportedStyles: predicate, comparison
217
+ Style/NumericPredicate:
218
+ Exclude:
219
+ - 'spec/**/*'
220
+ - 'lib/ra10ke/validate.rb'
221
+
222
+ # Offense count: 1
223
+ # This cop supports unsafe autocorrection (--autocorrect-all).
224
+ Style/RedundantInterpolation:
225
+ Exclude:
226
+ - 'lib/ra10ke/duplicates.rb'
227
+
228
+ # Offense count: 1
229
+ # This cop supports unsafe autocorrection (--autocorrect-all).
230
+ Style/RedundantSort:
231
+ Exclude:
232
+ - 'lib/ra10ke/dependencies.rb'
233
+
234
+ # Offense count: 1
235
+ # This cop supports unsafe autocorrection (--autocorrect-all).
236
+ # Configuration parameters: RequireEnglish, EnforcedStyle.
237
+ # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
238
+ Style/SpecialGlobalVars:
239
+ Exclude:
240
+ - 'ra10ke.gemspec'
241
+
242
+ # Offense count: 1
243
+ # This cop supports unsafe autocorrection (--autocorrect-all).
244
+ # Configuration parameters: Mode.
245
+ Style/StringConcatenation:
246
+ Exclude:
247
+ - 'lib/ra10ke/solve.rb'
248
+
249
+ # Offense count: 2
250
+ # This cop supports unsafe autocorrection (--autocorrect-all).
251
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
252
+ # AllowedMethods: define_method
253
+ Style/SymbolProc:
254
+ Exclude:
255
+ - 'lib/ra10ke/dependencies.rb'
256
+
257
+ # Offense count: 6
258
+ # This cop supports safe autocorrection (--autocorrect).
259
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
260
+ # URISchemes: http, https
261
+ Layout/LineLength:
262
+ Max: 137
data/CHANGELOG.md CHANGED
@@ -2,6 +2,55 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [v3.0.0](https://github.com/voxpupuli/ra10ke/tree/v3.0.0) (2023-08-23)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/ra10ke/compare/v2.0.0...v3.0.0)
8
+
9
+ **Breaking changes:**
10
+
11
+ - Add exit codes to dependency check [\#86](https://github.com/voxpupuli/ra10ke/pull/86) ([sebastianrakel](https://github.com/sebastianrakel))
12
+ - Drop Ruby 2.6 support & Implement voxpupuli-rubocop [\#85](https://github.com/voxpupuli/ra10ke/pull/85) ([bastelfreak](https://github.com/bastelfreak))
13
+
14
+ **Implemented enhancements:**
15
+
16
+ - Add Ruby 3.2 support / apply Vox Pupuli CI best practices [\#89](https://github.com/voxpupuli/ra10ke/pull/89) ([bastelfreak](https://github.com/bastelfreak))
17
+
18
+ **Fixed bugs:**
19
+
20
+ - module with https + token is failing [\#84](https://github.com/voxpupuli/ra10ke/issues/84)
21
+
22
+ **Merged pull requests:**
23
+
24
+ - dependencies: Add strict version boundaries [\#91](https://github.com/voxpupuli/ra10ke/pull/91) ([bastelfreak](https://github.com/bastelfreak))
25
+ - Bump actions/checkout from 2 to 3 [\#90](https://github.com/voxpupuli/ra10ke/pull/90) ([dependabot[bot]](https://github.com/apps/dependabot))
26
+ - dependabot: check for github actions and gems [\#88](https://github.com/voxpupuli/ra10ke/pull/88) ([bastelfreak](https://github.com/bastelfreak))
27
+ - Fix fixture for deprecation test [\#87](https://github.com/voxpupuli/ra10ke/pull/87) ([sebastianrakel](https://github.com/sebastianrakel))
28
+
29
+ ## [v2.0.0](https://github.com/voxpupuli/ra10ke/tree/v2.0.0) (2022-05-18)
30
+
31
+ [Full Changelog](https://github.com/voxpupuli/ra10ke/compare/v1.2.0...v2.0.0)
32
+
33
+ **Breaking changes:**
34
+
35
+ - Bump minimal Ruby Version 2.4.0-\>2.7.0 [\#77](https://github.com/voxpupuli/ra10ke/pull/77) ([bastelfreak](https://github.com/bastelfreak))
36
+ - Dependencies Table output [\#72](https://github.com/voxpupuli/ra10ke/pull/72) ([logicminds](https://github.com/logicminds))
37
+
38
+ **Implemented enhancements:**
39
+
40
+ - Add Ruby 3.1 support [\#78](https://github.com/voxpupuli/ra10ke/pull/78) ([bastelfreak](https://github.com/bastelfreak))
41
+ - Converts puppet forge module entries into puppetfile git entries [\#76](https://github.com/voxpupuli/ra10ke/pull/76) ([logicminds](https://github.com/logicminds))
42
+
43
+ **Fixed bugs:**
44
+
45
+ - incompatible with r10k gem \> 3.8 [\#57](https://github.com/voxpupuli/ra10ke/issues/57)
46
+ - CI: Do not run twice [\#79](https://github.com/voxpupuli/ra10ke/pull/79) ([bastelfreak](https://github.com/bastelfreak))
47
+ - Fix \#74 - server responded with 400 [\#75](https://github.com/voxpupuli/ra10ke/pull/75) ([logicminds](https://github.com/logicminds))
48
+ - Fix \#70 - cache dir does not exist [\#71](https://github.com/voxpupuli/ra10ke/pull/71) ([logicminds](https://github.com/logicminds))
49
+
50
+ **Closed issues:**
51
+
52
+ - cache dir does not exist [\#70](https://github.com/voxpupuli/ra10ke/issues/70)
53
+
5
54
  ## [v1.2.0](https://github.com/voxpupuli/ra10ke/tree/v1.2.0) (2022-04-21)
6
55
 
7
56
  [Full Changelog](https://github.com/voxpupuli/ra10ke/compare/v1.1.0...v1.2.0)
data/Gemfile CHANGED
@@ -4,10 +4,10 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :release do
7
- gem 'github_changelog_generator', :require => false
7
+ gem 'github_changelog_generator', require: false
8
8
  end
9
9
 
10
- group :coverage, optional: ENV['COVERAGE']!='yes' do
11
- gem 'simplecov-console', :require => false
12
- gem 'codecov', :require => false
10
+ group :coverage, optional: ENV['COVERAGE'] != 'yes' do
11
+ gem 'codecov', require: false
12
+ gem 'simplecov-console', require: false
13
13
  end
data/README.md CHANGED
@@ -68,6 +68,15 @@ Ignoring specific modules:
68
68
  Under specific conditions you may not wish to report on specific modules being out of date,
69
69
  to ignore a module create `.r10kignore` file in the same directory as your Puppetfile.
70
70
 
71
+ ### r10k::print_git_conversion
72
+ This rake task will go through the puppetfile and convert forge based modules into git based modules using
73
+ the modules't source repository and version tag.
74
+
75
+ This feature is useful when you want to bring all the forge modules into git source control. This assumes every module
76
+ tags the release or provides a valid repo url. We recommend to manually review
77
+ the output provided by this task before replacing the forge based content in your puppetfile as not every module author
78
+ tagged a release or provided a working url.
79
+
71
80
  ### r10k:solve_dependencies
72
81
 
73
82
  Reads the Puppetfile in the current directory and uses the ruby 'solve' library to find
data/Rakefile CHANGED
@@ -6,24 +6,30 @@ require 'fileutils'
6
6
  require 'rspec/core'
7
7
  require 'rspec/core/rake_task'
8
8
 
9
- CLEAN.include("pkg/", "tmp/")
10
- CLOBBER.include("Gemfile.lock")
9
+ CLEAN.include('pkg/', 'tmp/')
10
+ CLOBBER.include('Gemfile.lock')
11
11
 
12
- task :default => [:spec]
12
+ task default: [:spec]
13
13
 
14
14
  RSpec::Core::RakeTask.new(:spec) do |spec|
15
- spec.pattern = FileList['spec/**/*_spec.rb']
15
+ spec.pattern = FileList['spec/**/*_spec.rb']
16
16
  end
17
17
 
18
18
  begin
19
19
  require 'github_changelog_generator/task'
20
20
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
21
21
  version = Ra10ke::VERSION
22
- config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/
22
+ config.future_release = "v#{version}" if /^\d+\.\d+.\d+$/.match?(version)
23
23
  config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
24
- config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
24
+ config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog]
25
25
  config.user = 'voxpupuli'
26
26
  config.project = 'ra10ke'
27
27
  end
28
28
  rescue LoadError
29
29
  end
30
+
31
+ begin
32
+ require 'voxpupuli/rubocop/rake'
33
+ rescue LoadError
34
+ # the voxpupuli-rubocop gem is optional
35
+ end