Skip to content

Commit ea0b72e

Browse files
committed
(maint) Run pdk update with version 3.4.0
1 parent 461b81d commit ea0b72e

File tree

9 files changed

+65
-106
lines changed

9 files changed

+65
-106
lines changed

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,23 @@
1919
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
2934
.rerun.json
35+
bolt-debug.log
3036
*.tar.gz
3137
.modules/
32-
.plan_cache.json
3338
.resource_types/
34-
bolt-debug.log
3539
spec/docker/**/*.tar.gz
3640
spec/docker/**/*.asc
3741
spec/docker/**/files/puppet-enterprise*

.pdkignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,24 @@
1919
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log
2936
/.fixtures.yml
3037
/Gemfile
3138
/.gitattributes
39+
/.github/
3240
/.gitignore
3341
/.pdkignore
3442
/.puppet-lint.rc

.puppet-lint.rc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
--fail-on-warnings
12
--relative
3+
--no-80chars-check
4+
--no-140chars-check
5+
--no-class_inherits_from_params_class-check
6+
--no-autoloader_layout-check
7+
--no-documentation-check
8+
--no-single_quote_string_with_variables-check
9+
--no-strict_indent-check
10+
--no-manifest_whitespace_missing_newline_end_of_file-check
11+
--ignore-paths=.vendor/**/*.pp,.bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp,tests/**/*.pp,types/**/*.pp,vendor/**/*.pp

.rubocop.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ require:
33
- rubocop-performance
44
- rubocop-rspec
55
AllCops:
6-
Newcops: enable
7-
ExtraDetails: true
8-
DisplayStyleGuide: true
6+
NewCops: enable
97
DisplayCopNames: true
10-
TargetRubyVersion: '2.7'
8+
TargetRubyVersion: '2.6'
119
Include:
1210
- "**/*.rb"
1311
Exclude:
@@ -530,6 +528,8 @@ Lint/DuplicateBranch:
530528
Enabled: false
531529
Lint/DuplicateMagicComment:
532530
Enabled: false
531+
Lint/DuplicateMatchPattern:
532+
Enabled: false
533533
Lint/DuplicateRegexpCharacterClassElement:
534534
Enabled: false
535535
Lint/EmptyBlock:
@@ -646,6 +646,8 @@ Style/ComparableClamp:
646646
Enabled: false
647647
Style/ConcatArrayLiterals:
648648
Enabled: false
649+
Style/DataInheritance:
650+
Enabled: false
649651
Style/DirEmpty:
650652
Enabled: false
651653
Style/DocumentDynamicEvalDefinition:
@@ -714,6 +716,8 @@ Style/RedundantHeredocDelimiterQuotes:
714716
Enabled: false
715717
Style/RedundantInitialize:
716718
Enabled: false
719+
Style/RedundantLineContinuation:
720+
Enabled: false
717721
Style/RedundantSelfAssignmentBranch:
718722
Enabled: false
719723
Style/RedundantStringEscape:

Gemfile

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,35 @@ group :development do
2020
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2121
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
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))
23+
gem "deep_merge", '~> 1.2.2', require: false
2324
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
24-
gem "facterdb", '~> 1.18', require: false
25-
gem "metadata-json-lint", '~> 3.0', require: false
26-
gem "puppetlabs_spec_helper", '~> 6.0', require: false
27-
gem "rspec-puppet-facts", '~> 2.0', require: false
28-
gem "codecov", '~> 0.2', require: false
25+
gem "facterdb", '~> 2.1', require: false
26+
gem "metadata-json-lint", '~> 4.0', require: false
27+
gem "rspec-puppet-facts", '~> 4.0', require: false
2928
gem "dependency_checker", '~> 1.0.0', require: false
3029
gem "parallel_tests", '= 3.12.1', require: false
3130
gem "pry", '~> 0.10', require: false
32-
gem "simplecov-console", '~> 0.5', require: false
31+
gem "simplecov-console", '~> 0.9', require: false
3332
gem "puppet-debugger", '~> 1.0', require: false
34-
gem "rubocop", '= 1.48.1', require: false
33+
gem "rubocop", '~> 1.50.0', require: false
3534
gem "rubocop-performance", '= 1.16.0', require: false
3635
gem "rubocop-rspec", '= 2.19.0', require: false
3736
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
38-
gem "bolt", '>= 3.27.2', require: false
37+
gem "rexml", '>= 3.0.0', '< 3.2.7', require: false
38+
gem "bolt", '>= 3.10.0', require: false
3939
gem "github_changelog_generator", '1.16.4', require: false
4040
gem "octokit", '4.21.0', require: false
4141
gem "orchestrator_client", '< 0.7.1', require: false
4242
end
43-
group :system_tests do
44-
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
45-
gem "serverspec", '~> 2.41', require: false
46-
end
47-
group :release_prep do
43+
group :development, :release_prep do
4844
gem "puppet-strings", '~> 4.0', require: false
49-
gem "puppetlabs_spec_helper", '~> 6.0', require: false
45+
gem "puppetlabs_spec_helper", '~> 8.0', require: false
46+
gem "puppet-blacksmith", '~> 7.0', require: false
47+
end
48+
group :system_tests do
49+
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
50+
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
51+
gem "serverspec", '~> 2.41', require: false
5052
end
5153

5254
puppet_version = ENV['PUPPET_GEM_VERSION']

Rakefile

Lines changed: 8 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,89 +4,18 @@ 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')
10+
PuppetLint.configuration.send('disable_80chars')
11+
PuppetLint.configuration.send('disable_140chars')
12+
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
13+
PuppetLint.configuration.send('disable_autoloader_layout')
14+
PuppetLint.configuration.send('disable_documentation')
15+
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
4416
PuppetLint.configuration.send('disable_strict_indent')
4517
PuppetLint.configuration.send('disable_manifest_whitespace_missing_newline_end_of_file')
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.since_tag = "2.5.0"
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
18+
PuppetLint.configuration.fail_on_warnings = true
19+
PuppetLint.configuration.ignore_paths = [".vendor/**/*.pp", ".bundle/**/*.pp", "pkg/**/*.pp", "spec/**/*.pp", "tests/**/*.pp", "types/**/*.pp", "vendor/**/*.pp"]
9120

9221
PuppetSyntax.exclude_paths = ["plans/**/*.pp", "spec/acceptance/**/plans/**/*.pp", "vendor/**/*"]

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"version_requirement": ">= 7.0.0 < 9.0.0"
8787
}
8888
],
89-
"pdk-version": "3.0.0",
89+
"pdk-version": "3.4.0",
9090
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
91-
"template-ref": "tags/3.0.0-0-g056e50d"
91+
"template-ref": "tags/3.4.0-0-gd3cc13f"
9292
}

spec/default_facts.yml

Lines changed: 4 additions & 3 deletions
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"

spec/spec_helper.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@
2525
next unless File.exist?(f) && File.readable?(f) && File.size?(f)
2626

2727
begin
28-
default_facts.merge!(YAML.safe_load(File.read(f), permitted_classes: [], permitted_symbols: [], aliases: true))
28+
require 'deep_merge'
29+
default_facts.deep_merge!(YAML.safe_load(File.read(f), permitted_classes: [], permitted_symbols: [], aliases: true))
2930
rescue StandardError => e
3031
RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
3132
end
3233
end
3334

3435
# read default_facts and merge them over what is provided by facterdb
3536
default_facts.each do |fact, value|
36-
add_custom_fact fact, value
37+
add_custom_fact fact, value, merge_facts: true
3738
end
3839

3940
RSpec.configure do |c|

0 commit comments

Comments
 (0)