Skip to content

Commit 2f11217

Browse files
committed
(CAT-1608) - PDK update
1 parent 626679f commit 2f11217

8 files changed

+22
-18
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
2222
/convert_report.txt

.pdkignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
2222
/convert_report.txt
@@ -42,4 +42,3 @@
4242
/.vscode/
4343
/.sync.yml
4444
/.devcontainer/
45-
/.rubocop.yml

.rubocop.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ require:
77
AllCops:
88
NewCops: enable
99
DisplayCopNames: true
10-
TargetRubyVersion: '2.6'
10+
ExtraDetails: true
1111
DisplayStyleGuide: true
12+
TargetRubyVersion: '2.7'
1213
Include:
1314
- "**/*.rb"
1415
Exclude:

.rubocop_todo.yml

+4-4
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-05-10 14:57:32 UTC using RuboCop version 1.48.1.
3+
# on 2023-11-28 05:25:03 UTC using RuboCop version 1.48.1.
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
@@ -15,12 +15,12 @@ Metrics/AbcSize:
1515
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
1616
# AllowedMethods: refine
1717
Metrics/BlockLength:
18-
Max: 312
18+
Max: 308
1919

2020
# Offense count: 4
2121
# Configuration parameters: AllowedMethods, AllowedPatterns.
2222
Metrics/CyclomaticComplexity:
23-
Max: 20
23+
Max: 16
2424

2525
# Offense count: 14
2626
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
@@ -30,7 +30,7 @@ Metrics/MethodLength:
3030
# Offense count: 3
3131
# Configuration parameters: AllowedMethods, AllowedPatterns.
3232
Metrics/PerceivedComplexity:
33-
Max: 23
33+
Max: 19
3434

3535
# Offense count: 9
3636
# Configuration parameters: IgnoredMetadata.

Gemfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ group :development do
1919
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
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))
22+
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))
2223
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
2324
gem "facterdb", '~> 1.18', require: false
2425
gem "metadata-json-lint", '~> 3.0', require: false
25-
gem "puppetlabs_spec_helper", '~> 6.0', require: false
2626
gem "rspec-puppet-facts", '~> 2.0', require: false
2727
gem "codecov", '~> 0.2', require: false
2828
gem "dependency_checker", '~> 1.0.0', require: false
@@ -41,6 +41,10 @@ group :system_tests do
4141
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
4242
gem "serverspec", '~> 2.41', require: false
4343
end
44+
group :release_prep do
45+
gem "puppet-strings", '~> 4.0', require: false
46+
gem "puppetlabs_spec_helper", '~> 7.0', require: false
47+
end
4448

4549
puppet_version = ENV['PUPPET_GEM_VERSION']
4650
facter_version = ENV['FACTER_GEM_VERSION']

Rakefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# frozen_string_literal: true
22

33
require 'bundler'
4-
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
4+
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 Bundler.rubygems.find_name('github_changelog_generator').any?
8-
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
7+
require 'github_changelog_generator/task' if Gem.loaded_specs.key? 'github_changelog_generator'
8+
require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'
99

1010
def changelog_user
1111
return unless Rake.application.top_level_tasks.include? "changelog"
@@ -43,7 +43,7 @@ end
4343
PuppetLint.configuration.send('disable_relative')
4444

4545

46-
if Bundler.rubygems.find_name('github_changelog_generator').any?
46+
if Gem.loaded_specs.key? 'github_changelog_generator'
4747
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
4848
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?
4949
config.user = "#{changelog_user}"

metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@
104104
],
105105
"description": "Uses a combination of keytool and Ruby openssl library to manage entries in a Java keystore.",
106106
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
107-
"template-ref": "heads/main-0-gab2bd48",
108-
"pdk-version": "2.7.1"
107+
"template-ref": "heads/main-0-g01c6a19",
108+
"pdk-version": "3.0.0"
109109
}

spec/default_facts.yml

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

0 commit comments

Comments
 (0)