Skip to content

Commit 2485199

Browse files
committed
(maint) Update PDK version to 1.18.0
1 parent a00b9e4 commit 2485199

8 files changed

+44
-14
lines changed

Diff for: .rubocop.yml

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ GetText/DecorateString:
2727
Description: We don't want to decorate test output.
2828
Exclude:
2929
- spec/**/*
30+
Enabled: false
3031
RSpec/BeforeAfterAll:
3132
Description: Beware of using after(:all) as it may cause state to leak between tests.
3233
A necessary evil in acceptance testing.
@@ -39,6 +40,10 @@ Style/BlockDelimiters:
3940
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
4041
be consistent then.
4142
EnforcedStyle: braces_for_chaining
43+
Style/BracesAroundHashParameters:
44+
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
45+
See https://github.com/rubocop-hq/rubocop/pull/7643
46+
Enabled: true
4247
Style/ClassAndModuleChildren:
4348
Description: Compact style reduces the required amount of indentation.
4449
EnforcedStyle: compact
@@ -88,6 +93,12 @@ Style/MethodCalledOnDoEndBlock:
8893
Enabled: true
8994
Style/StringMethods:
9095
Enabled: true
96+
GetText/DecorateFunctionMessage:
97+
Enabled: false
98+
GetText/DecorateStringFormattingUsingInterpolation:
99+
Enabled: false
100+
GetText/DecorateStringFormattingUsingPercent:
101+
Enabled: false
91102
Layout/EndOfLine:
92103
Enabled: false
93104
Layout/IndentHeredoc:

Diff for: .travis.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
---
2+
os: linux
23
dist: xenial
34
language: ruby
45
cache: bundler
56
before_install:
67
- bundle -v
78
- rm -f Gemfile.lock
8-
- gem update --system $RUBYGEMS_VERSION
9+
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
10+
- "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used"
11+
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
12+
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
913
- gem --version
1014
- bundle -v
1115
script:
1216
- 'bundle exec rake $CHECK'
1317
bundler_args: --without system_tests
1418
rvm:
15-
- 2.5.3
19+
- 2.5.7
1620
stages:
1721
- static
1822
- spec
1923
- acceptance
2024
-
2125
if: tag =~ ^v\d
2226
name: deploy
23-
matrix:
27+
jobs:
2428
fast_finish: true
2529
include:
2630
-
@@ -32,7 +36,7 @@ matrix:
3236
stage: spec
3337
-
3438
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
35-
rvm: 2.5.3
39+
rvm: 2.5.7
3640
stage: spec
3741
-
3842
env: DEPLOY_TO_FORGE=yes

Diff for: Gemfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ group :development do
2424
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2525
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2626
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27-
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
28-
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
29-
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
30-
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27+
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
28+
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
29+
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
30+
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
3131
end
3232
group :system_tests do
3333
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]

Diff for: Rakefile

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
24
require 'puppetlabs_spec_helper/rake_tasks'
35
require 'puppet-syntax/tasks/puppet-syntax'
@@ -15,8 +17,17 @@ end
1517

1618
def changelog_project
1719
return unless Rake.application.top_level_tasks.include? "changelog"
18-
returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
19-
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
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+
2031
puts "GitHubChangelogGenerator project:#{returnVal}"
2132
returnVal
2233
end

Diff for: metadata.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
}
8787
],
8888
"description": "Module for installing/configuring PuppetDB",
89-
"pdk-version": "1.12.0",
90-
"template-url": "https://github.com/puppetlabs/pdk-templates#1.12.0",
91-
"template-ref": "1.12.0-0-g55d9ae2"
89+
"pdk-version": "1.18.0",
90+
"template-url": "https://github.com/puppetlabs/pdk-templates#1.18.0",
91+
"template-ref": "tags/1.18.0-0-g095317c"
9292
}

Diff for: spec/default_facts.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
# Facts specified here will override the values provided by rspec-puppet-facts.
44
---
55
ipaddress: "172.16.254.254"
6+
ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
67
is_pe: false
78
macaddress: "AA:AA:AA:AA:AA:AA"

Diff for: spec/spec_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'puppetlabs_spec_helper/module_spec_helper'
24
require 'rspec-puppet-facts'
35

@@ -36,6 +38,7 @@
3638
# set to strictest setting for testing
3739
# by default Puppet runs at warning level
3840
Puppet.settings[:strict] = :warning
41+
Puppet.settings[:strict_variables] = true
3942
end
4043
c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
4144
c.after(:suite) do

Diff for: spec/spec_helper_acceptance.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def build_url(platform)
8383
end
8484
end
8585

86-
opts = {puppet_agent_version: 'latest'}
86+
opts = { puppet_agent_version: 'latest' }
8787
opts[:puppet_collection] = use_puppet5? ? 'puppet5' : 'puppet6'
8888
install_puppet_agent_on(hosts, opts) unless ENV['BEAKER_provision'] == 'no'
8989
install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ %r{pe}i

0 commit comments

Comments
 (0)