Skip to content

Commit 0dab5fa

Browse files
committed
(maint) update PDK to 1.8.0; update all templates
1 parent d544f2c commit 0dab5fa

File tree

11 files changed

+64
-41
lines changed

11 files changed

+64
-41
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.erb eol=lf
33
*.pp eol=lf
44
*.sh eol=lf
5+
*.epp eol=lf

.pdkignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,16 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
/appveyor.yml
26+
/.fixtures.yml
27+
/Gemfile
28+
/.gitattributes
29+
/.gitignore
30+
/.gitlab-ci.yml
31+
/.pdkignore
32+
/Rakefile
33+
/.rspec
34+
/.rubocop.yml
35+
/.travis.yml
36+
/.yardopts
37+
/spec/

.puppet-lint.rc

Whitespace-only changes.

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ AllCops:
1919
Metrics/LineLength:
2020
Description: People have wide screens, use them.
2121
Max: 200
22+
GetText/DecorateString:
23+
Description: We don't want to decorate test output.
24+
Exclude:
25+
- spec/*
2226
RSpec/BeforeAfterAll:
2327
Description: Beware of using after(:all) as it may cause state to leak between tests.
2428
A necessary evil in acceptance testing.

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
---
2-
sudo: false
32
dist: trusty
43
language: ruby
54
cache: bundler
65
before_install:
6+
- if [ $BUNDLER_VERSION ]; then
7+
gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri;
8+
fi
79
- bundle -v
810
- rm -f Gemfile.lock
9-
- gem update --system
11+
- gem update --system $RUBYGEMS_VERSION
1012
- gem --version
1113
- bundle -v
1214
script:
1315
- 'bundle exec rake $CHECK'
1416
bundler_args: --without system_tests
1517
rvm:
16-
- 2.5.3
18+
- 2.5.1
1719
env:
1820
global:
19-
- PUPPET_GEM_VERSION="~> 6.0"
21+
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
2022
matrix:
2123
fast_finish: true
2224
include:
@@ -26,9 +28,9 @@ matrix:
2628
env: CHECK=parallel_spec
2729
-
2830
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
29-
rvm: 2.4.5
31+
rvm: 2.4.4
3032
-
31-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
33+
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec RUBYGEMS_VERSION=2.7.8 BUNDLER_VERSION=1.17.3
3234
rvm: 2.1.9
3335
branches:
3436
only:

Gemfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
22

33
def location_for(place_or_version, fake_version = nil)
4-
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
5-
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
6-
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
7-
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
8-
else
9-
[place_or_version, { require: false }]
10-
end
11-
end
4+
git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
5+
file_url_regex = %r{\Afile:\/\/(?<path>.*)}
126

13-
def gem_type(place_or_version)
14-
if place_or_version =~ %r{\Agit[:@]}
15-
:git
16-
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
17-
:file
7+
if place_or_version && (git_url = place_or_version.match(git_url_regex))
8+
[fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
9+
elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
10+
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
1811
else
19-
:gem
12+
[place_or_version, { require: false }]
2013
end
2114
end
2215

@@ -28,7 +21,8 @@ group :development do
2821
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
2922
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
3023
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
31-
gem "json", '<= 2.0.4', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
24+
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
25+
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))
3226
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
3327
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
3428
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
@@ -46,7 +40,6 @@ group :system_tests do
4640
end
4741

4842
puppet_version = ENV['PUPPET_GEM_VERSION']
49-
puppet_type = gem_type(puppet_version)
5043
facter_version = ENV['FACTER_GEM_VERSION']
5144
hiera_version = ENV['HIERA_GEM_VERSION']
5245

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ require 'puppetlabs_spec_helper/rake_tasks'
22
require 'puppet-syntax/tasks/puppet-syntax'
33
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
44
require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
5+
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
56
require 'puppet-lint/tasks/puppet-lint'
67

78
def changelog_user

appveyor.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
version: 1.1.x.{build}
3+
branches:
4+
only:
5+
- master
36
skip_commits:
47
message: /^\(?doc\)?.*/
58
clone_depth: 10
@@ -30,6 +33,14 @@ environment:
3033
PUPPET_GEM_VERSION: ~> 5.0
3134
RUBY_VERSION: 24-x64
3235
CHECK: parallel_spec
36+
-
37+
PUPPET_GEM_VERSION: ~> 6.0
38+
RUBY_VERSION: 25
39+
CHECK: parallel_spec
40+
-
41+
PUPPET_GEM_VERSION: ~> 6.0
42+
RUBY_VERSION: 25-x64
43+
CHECK: parallel_spec
3344
matrix:
3445
fast_finish: true
3546
install:

metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"version_requirement": ">= 6.0.0 < 7.0.0"
8787
}
8888
],
89-
"pdk-version": "1.5.0",
89+
"pdk-version": "1.8.0",
9090
"template-url": "https://github.com/puppetlabs/pdk-templates.git",
91-
"template-ref": "heads/master-0-gc87eee3"
92-
}
91+
"template-ref": "heads/master-0-gd61c0a4"
92+
}

spec/default_facts.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# Facts specified here will override the values provided by rspec-puppet-facts.
44
---
5-
concat_basedir: "/tmp"
65
ipaddress: "172.16.254.254"
76
is_pe: false
87
macaddress: "AA:AA:AA:AA:AA:AA"

0 commit comments

Comments
 (0)