Skip to content

Commit aaf7b13

Browse files
authored
Merge pull request #220 from puppetlabs/CAT-1172-PDK_Update
(CAT-1172) - PDK Update
2 parents 7365809 + 8595976 commit aaf7b13

File tree

11 files changed

+165
-49
lines changed

11 files changed

+165
-49
lines changed

.gitattributes

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

.gitignore

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1+
.git/
2+
.*.sw[op]
3+
.metadata
4+
.yardoc
5+
.yardwarns
6+
*.iml
17
/.bundle/
2-
/.yardoc
3-
/_yardoc/
8+
/.idea/
9+
/.vagrant/
410
/coverage/
11+
/bin/
512
/doc/
13+
/Gemfile.local
14+
/Gemfile.lock
15+
/junit/
16+
/log/
617
/pkg/
7-
/spec/reports/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/*
820
/tmp/
9-
/bin/
1021
/vendor/
11-
12-
# rspec failure tracking
13-
.rspec_status
14-
15-
Gemfile.local
16-
Gemfile.lock
17-
18-
# build output
19-
/ruby-pwsh-*.gem
20-
21-
# Acceptance Testing fixtures
22-
/spec/fixtures/modules/
23-
/spec/fixtures/test.pp
24-
/spec/fixtures/website/
25-
26-
# Acceptance Testing files
27-
*.tar.gz
22+
/convert_report.txt
23+
/update_report.txt
24+
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml

.pdkignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.git/
2+
.*.sw[op]
3+
.metadata
4+
.yardoc
5+
.yardwarns
6+
*.iml
7+
/.bundle/
8+
/.idea/
9+
/.vagrant/
10+
/coverage/
11+
/bin/
12+
/doc/
13+
/Gemfile.local
14+
/Gemfile.lock
15+
/junit/
16+
/log/
17+
/pkg/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/*
20+
/tmp/
21+
/vendor/
22+
/convert_report.txt
23+
/update_report.txt
24+
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml
29+
/.fixtures.yml
30+
/Gemfile
31+
/.gitattributes
32+
/.gitignore
33+
/.pdkignore
34+
/.puppet-lint.rc
35+
/Rakefile
36+
/rakelib/
37+
/.rspec
38+
/..yml
39+
/.yardopts
40+
/spec/
41+
/.vscode/
42+
/.sync.yml
43+
/.devcontainer/

.puppet-lint.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--relative

.rspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
--format documentation
21
--color
3-
--require spec_helper
2+
--format documentation

.sync.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
".gitlab-ci.yml":
3+
delete: true
4+
appveyor.yml:
5+
delete: true
6+
spec/spec_helper.rb:
7+
unmanaged: true
8+
.github/workflows/auto_release.yml:
9+
unmanaged: true
10+
.github/workflows/ci.yml:
11+
unmanaged: true
12+
.github/workflows/nightly.yml:
13+
unmanaged: true
14+
.github/workflows/release.yml:
15+
unmanaged: true
16+
.travis.yml:
17+
delete: true
18+
Rakefile:
19+
unmanaged: true

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"puppet.puppet-vscode",
4+
"rebornix.Ruby"
5+
]
6+
}

.yardopts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--markup markdown

Gemfile

Lines changed: 55 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# frozen_string_literal: true
2-
3-
source 'https://rubygems.org'
4-
5-
# Specify your gem's dependencies in pwsh.gemspec
6-
gemspec
1+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
72

83
def location_for(place_or_version, fake_version = nil)
94
git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
@@ -19,24 +14,61 @@ def location_for(place_or_version, fake_version = nil)
1914
end
2015

2116
group :development do
22-
gem 'faraday-retry'
23-
gem 'fuubar'
24-
gem 'pry'
25-
gem 'pry-stack_explorer'
26-
gem 'yard'
17+
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))
18+
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
19+
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))
20+
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))
21+
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))
23+
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
29+
gem "dependency_checker", '~> 1.0.0', require: false
30+
gem "parallel_tests", '= 3.12.1', require: false
31+
gem "pry", '~> 0.10', require: false
32+
gem "simplecov-console", '~> 0.5', require: false
33+
gem "puppet-debugger", '~> 1.0', require: false
34+
gem "rubocop", '= 1.48.1', require: false
35+
gem "rubocop-performance", '= 1.16.0', require: false
36+
gem "rubocop-rspec", '= 2.19.0', require: false
37+
gem "puppet-strings", '~> 4.0', require: false
38+
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
39+
end
40+
group :system_tests do
41+
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
42+
gem "serverspec", '~> 2.41', require: false
2743
end
2844

29-
group :test do
30-
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
31-
32-
gem 'ffi'
33-
gem 'rake', '~> 13.0'
34-
gem 'rspec', '~> 3.0'
35-
gem 'rspec-collection_matchers', '~> 1.0'
36-
gem 'rspec-its', '~> 1.0'
37-
gem 'rubocop', '~> 1.48', require: false
38-
gem 'rubocop-performance', '~> 1.16', require: false
39-
gem 'rubocop-rspec', '~> 2.19', require: false
40-
gem 'simplecov', require: false
45+
puppet_version = ENV['PUPPET_GEM_VERSION']
46+
facter_version = ENV['FACTER_GEM_VERSION']
47+
hiera_version = ENV['HIERA_GEM_VERSION']
48+
49+
gems = {}
50+
51+
gems['puppet'] = location_for(puppet_version)
52+
53+
# If facter or hiera versions have been specified via the environment
54+
# variables
55+
56+
gems['facter'] = location_for(facter_version) if facter_version
57+
gems['hiera'] = location_for(hiera_version) if hiera_version
58+
59+
gems.each do |gem_name, gem_params|
60+
gem gem_name, *gem_params
4161
end
4262

63+
# Evaluate Gemfile.local and ~/.gemfile if they exist
64+
extra_gemfiles = [
65+
"#{__FILE__}.local",
66+
File.join(Dir.home, '.gemfile'),
67+
]
68+
69+
extra_gemfiles.each do |gemfile|
70+
if File.file?(gemfile) && File.readable?(gemfile)
71+
eval(File.read(gemfile), binding)
72+
end
73+
end
74+
# vim: syntax=ruby

metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"version_requirement": ">= 6.0.0 < 8.0.0"
7777
}
7878
],
79-
"pdk-version": "1.13.0",
80-
"template-url": "pdk-default#1.13.0",
81-
"template-ref": "1.13.0-0-g66e1443"
79+
"pdk-version": "3.0.0",
80+
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
81+
"template-ref": "tags/3.0.0-0-g5bfc1c0"
8282
}

0 commit comments

Comments
 (0)