Skip to content

Commit d69144a

Browse files
committed
(MAINT) - PDK Update
1 parent 411e7bc commit d69144a

File tree

6 files changed

+18
-90
lines changed

6 files changed

+18
-90
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Publish module"
22

33
on:
44
workflow_dispatch:
5-
5+
66
jobs:
77
release:
88
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main"

.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ Lint/DuplicateBranch:
529529
Enabled: false
530530
Lint/DuplicateMagicComment:
531531
Enabled: false
532+
Lint/DuplicateMatchPattern:
533+
Enabled: false
532534
Lint/DuplicateRegexpCharacterClassElement:
533535
Enabled: false
534536
Lint/EmptyBlock:
@@ -645,6 +647,8 @@ Style/ComparableClamp:
645647
Enabled: false
646648
Style/ConcatArrayLiterals:
647649
Enabled: false
650+
Style/DataInheritance:
651+
Enabled: false
648652
Style/DirEmpty:
649653
Enabled: false
650654
Style/DocumentDynamicEvalDefinition:
@@ -713,6 +717,8 @@ Style/RedundantHeredocDelimiterQuotes:
713717
Enabled: false
714718
Style/RedundantInitialize:
715719
Enabled: false
720+
Style/RedundantLineContinuation:
721+
Enabled: false
716722
Style/RedundantSelfAssignmentBranch:
717723
Enabled: false
718724
Style/RedundantStringEscape:

.vscode/extensions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"recommendations": [
33
"puppet.puppet-vscode",
4-
"rebornix.Ruby"
4+
"Shopify.ruby-lsp"
55
]
66
}

Gemfile

+9-7
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,29 @@ group :development do
2222
gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2323
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
2424
gem "facterdb", '~> 1.18', require: false
25-
gem "metadata-json-lint", '~> 3.0', require: false
25+
gem "metadata-json-lint", '~> 4.0', require: false
26+
gem "puppetlabs_spec_helper", '~> 6.0', require: false
2627
gem "rspec-puppet-facts", '~> 2.0', require: false
27-
gem "codecov", '~> 0.2', require: false
2828
gem "dependency_checker", '~> 1.0.0', require: false
2929
gem "parallel_tests", '= 3.12.1', require: false
3030
gem "pry", '~> 0.10', require: false
31-
gem "simplecov-console", '~> 0.5', require: false
31+
gem "simplecov-console", '~> 0.9', require: false
3232
gem "puppet-debugger", '~> 1.0', require: false
33-
gem "rubocop", '= 1.48.1', require: false
33+
gem "rubocop", '~> 1.50.0', require: false
3434
gem "rubocop-performance", '= 1.16.0', require: false
3535
gem "rubocop-rspec", '= 2.19.0', require: false
36+
gem "puppet-strings", '~> 4.0', require: false
3637
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
3738
gem "github_changelog_generator", '= 1.15.2', require: false
3839
end
3940
group :system_tests do
40-
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
41-
gem "serverspec", '~> 2.41', require: false
41+
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
42+
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
43+
gem "serverspec", '~> 2.41', require: false
4244
end
4345
group :release_prep do
4446
gem "puppet-strings", '~> 4.0', require: false
45-
gem "puppetlabs_spec_helper", '~> 7.0', require: false
47+
gem "puppetlabs_spec_helper", '~> 6.0', require: false
4648
end
4749

4850
puppet_version = ENV['PUPPET_GEM_VERSION']

Rakefile

-80
Original file line numberDiff line numberDiff line change
@@ -4,88 +4,8 @@ require 'bundler'
44
require 'puppet_litmus/rake_tasks' if Gem.loaded_specs.key? 'puppet_litmus'
55
require 'puppetlabs_spec_helper/rake_tasks'
66
require 'puppet-syntax/tasks/puppet-syntax'
7-
require 'github_changelog_generator/task' if Gem.loaded_specs.key? 'github_changelog_generator'
87
require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'
98

10-
def changelog_user
11-
return unless Rake.application.top_level_tasks.include? "changelog"
12-
returnVal = "puppetlabs" || JSON.load(File.read('metadata.json'))['author']
13-
raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
14-
puts "GitHubChangelogGenerator user:#{returnVal}"
15-
returnVal
16-
end
17-
18-
def changelog_project
19-
return unless Rake.application.top_level_tasks.include? "changelog"
20-
21-
returnVal = nil
22-
returnVal ||= begin
23-
metadata_source = JSON.load(File.read('metadata.json'))['source']
24-
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
25-
26-
metadata_source_match && metadata_source_match[1]
27-
end
28-
29-
raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
30-
31-
puts "GitHubChangelogGenerator project:#{returnVal}"
32-
returnVal
33-
end
34-
35-
def changelog_future_release
36-
return unless Rake.application.top_level_tasks.include? "changelog"
37-
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
38-
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
39-
puts "GitHubChangelogGenerator future_release:#{returnVal}"
40-
returnVal
41-
end
42-
439
PuppetLint.configuration.send('disable_relative')
4410
PuppetLint.configuration.send('disable_anchor_resource')
4511
PuppetLint.configuration.send('disable_params_empty_string_assignment')
46-
47-
48-
if Gem.loaded_specs.key? 'github_changelog_generator'
49-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
50-
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
51-
config.user = "#{changelog_user}"
52-
config.project = "#{changelog_project}"
53-
config.max_issues = 500
54-
config.future_release = "#{changelog_future_release}"
55-
config.exclude_labels = ['maintenance']
56-
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
57-
config.add_pr_wo_labels = true
58-
config.issues = false
59-
config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
60-
config.configure_sections = {
61-
"Changed" => {
62-
"prefix" => "### Changed",
63-
"labels" => ["backwards-incompatible"],
64-
},
65-
"Added" => {
66-
"prefix" => "### Added",
67-
"labels" => ["enhancement", "feature"],
68-
},
69-
"Fixed" => {
70-
"prefix" => "### Fixed",
71-
"labels" => ["bug", "documentation", "bugfix"],
72-
},
73-
}
74-
end
75-
else
76-
desc 'Generate a Changelog from GitHub'
77-
task :changelog do
78-
raise <<EOM
79-
The changelog tasks depends on recent features of the github_changelog_generator gem.
80-
Please manually add it to your .sync.yml for now, and run `pdk update`:
81-
---
82-
Gemfile:
83-
optional:
84-
':development':
85-
- gem: 'github_changelog_generator'
86-
version: '~> 1.15'
87-
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
88-
EOM
89-
end
90-
end
91-

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,5 @@
9696
],
9797
"pdk-version": "3.0.0",
9898
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
99-
"template-ref": "heads/main-0-g01c6a19"
99+
"template-ref": "heads/main-0-g4fb29e7"
100100
}

0 commit comments

Comments
 (0)