Skip to content

Commit 8915661

Browse files
committed
(MAINT) - PDK update
1 parent b12bf63 commit 8915661

File tree

7 files changed

+20
-86
lines changed

7 files changed

+20
-86
lines changed

.pdkignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
/.fixtures.yml
3030
/Gemfile
3131
/.gitattributes
32+
/.github/
3233
/.gitignore
3334
/.pdkignore
3435
/.puppet-lint.rc

.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,8 @@ Lint/DuplicateBranch:
530530
Enabled: false
531531
Lint/DuplicateMagicComment:
532532
Enabled: false
533+
Lint/DuplicateMatchPattern:
534+
Enabled: false
533535
Lint/DuplicateRegexpCharacterClassElement:
534536
Enabled: false
535537
Lint/EmptyBlock:
@@ -646,6 +648,8 @@ Style/ComparableClamp:
646648
Enabled: false
647649
Style/ConcatArrayLiterals:
648650
Enabled: false
651+
Style/DataInheritance:
652+
Enabled: false
649653
Style/DirEmpty:
650654
Enabled: false
651655
Style/DocumentDynamicEvalDefinition:
@@ -714,6 +718,8 @@ Style/RedundantHeredocDelimiterQuotes:
714718
Enabled: false
715719
Style/RedundantInitialize:
716720
Enabled: false
721+
Style/RedundantLineContinuation:
722+
Enabled: false
717723
Style/RedundantSelfAssignmentBranch:
718724
Enabled: false
719725
Style/RedundantStringEscape:

.rubocop_todo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2023-11-28 17:22:01 UTC using RuboCop version 1.48.1.
3+
# on 2024-01-18 06:45:21 UTC using RuboCop version 1.50.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new

Gemfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,20 @@ group :development do
3131
gem "pry", '~> 0.10', require: false
3232
gem "simplecov-console", '~> 0.5', require: false
3333
gem "puppet-debugger", '~> 1.0', require: false
34-
gem "rubocop", '= 1.48.1', require: false
34+
gem "rubocop", '= 1.50.0', require: false
3535
gem "rubocop-performance", '= 1.16.0', require: false
3636
gem "rubocop-rspec", '= 2.19.0', require: false
37+
gem "puppet-strings", '~> 4.0', require: false
3738
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
3839
end
3940
group :system_tests do
4041
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
4142
gem "serverspec", '~> 2.41', require: false
4243
end
44+
group :release_prep do
45+
gem "puppet-strings", '~> 4.0', require: false
46+
gem "puppetlabs_spec_helper", '~> 6.0', require: false
47+
end
4348

4449
puppet_version = ENV['PUPPET_GEM_VERSION']
4550
facter_version = ENV['FACTER_GEM_VERSION']

Rakefile

-79
Original file line numberDiff line numberDiff line change
@@ -4,85 +4,6 @@ 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 = nil || 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')
44-
45-
46-
if Gem.loaded_specs.key? 'github_changelog_generator'
47-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
48-
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?
49-
config.user = "#{changelog_user}"
50-
config.project = "#{changelog_project}"
51-
config.future_release = "#{changelog_future_release}"
52-
config.exclude_labels = ['maintenance']
53-
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)."
54-
config.add_pr_wo_labels = true
55-
config.issues = false
56-
config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
57-
config.configure_sections = {
58-
"Changed" => {
59-
"prefix" => "### Changed",
60-
"labels" => ["backwards-incompatible"],
61-
},
62-
"Added" => {
63-
"prefix" => "### Added",
64-
"labels" => ["enhancement", "feature"],
65-
},
66-
"Fixed" => {
67-
"prefix" => "### Fixed",
68-
"labels" => ["bug", "documentation", "bugfix"],
69-
},
70-
}
71-
end
72-
else
73-
desc 'Generate a Changelog from GitHub'
74-
task :changelog do
75-
raise <<EOM
76-
The changelog tasks depends on recent features of the github_changelog_generator gem.
77-
Please manually add it to your .sync.yml for now, and run `pdk update`:
78-
---
79-
Gemfile:
80-
optional:
81-
':development':
82-
- gem: 'github_changelog_generator'
83-
version: '~> 1.15'
84-
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
85-
EOM
86-
end
87-
end
88-

metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
}
3535
],
3636
"pdk-version": "3.0.0",
37-
"template-url": "pdk-default#3.0.0",
38-
"template-ref": "tags/3.0.0-0-g056e50d"
37+
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
38+
"template-ref": "heads/main-0-ge864fa6"
3939
}

spec/default_facts.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# Facts specified here will override the values provided by rspec-puppet-facts.
44
---
5-
ipaddress: "172.16.254.254"
6-
ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
5+
networking:
6+
ip: "172.16.254.254"
7+
ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
8+
mac: "AA:AA:AA:AA:AA:AA"
79
is_pe: false
8-
macaddress: "AA:AA:AA:AA:AA:AA"

0 commit comments

Comments
 (0)