Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-1172) - PDK Update #220

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.epp eol=lf
43 changes: 22 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.yardoc
/_yardoc/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/reports/
/spec/fixtures/manifests/
/spec/fixtures/modules/*
/tmp/
/bin/
/vendor/

# rspec failure tracking
.rspec_status

Gemfile.local
Gemfile.lock

# build output
/ruby-pwsh-*.gem

# Acceptance Testing fixtures
/spec/fixtures/modules/
/spec/fixtures/test.pp
/spec/fixtures/website/

# Acceptance Testing files
*.tar.gz
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
43 changes: 43 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/..yml
/.yardopts
/spec/
/.vscode/
/.sync.yml
/.devcontainer/
1 change: 1 addition & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--relative
3 changes: 1 addition & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--format documentation
--color
--require spec_helper
--format documentation
19 changes: 19 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
".gitlab-ci.yml":
delete: true
appveyor.yml:
delete: true
spec/spec_helper.rb:
unmanaged: true
.github/workflows/auto_release.yml:
unmanaged: true
.github/workflows/ci.yml:
unmanaged: true
.github/workflows/nightly.yml:
unmanaged: true
.github/workflows/release.yml:
unmanaged: true
.travis.yml:
delete: true
Rakefile:
unmanaged: true
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]
}
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--markup markdown
78 changes: 55 additions & 23 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in pwsh.gemspec
gemspec
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

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

group :development do
gem 'faraday-retry'
gem 'fuubar'
gem 'pry'
gem 'pry-stack_explorer'
gem 'yard'
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))
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))
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))
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))
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))
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))
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
gem "facterdb", '~> 1.18', require: false
gem "metadata-json-lint", '~> 3.0', require: false
gem "puppetlabs_spec_helper", '~> 6.0', require: false
gem "rspec-puppet-facts", '~> 2.0', require: false
gem "codecov", '~> 0.2', require: false
gem "dependency_checker", '~> 1.0.0', require: false
gem "parallel_tests", '= 3.12.1', require: false
gem "pry", '~> 0.10', require: false
gem "simplecov-console", '~> 0.5', require: false
gem "puppet-debugger", '~> 1.0', require: false
gem "rubocop", '= 1.48.1', require: false
gem "rubocop-performance", '= 1.16.0', require: false
gem "rubocop-rspec", '= 2.19.0', require: false
gem "puppet-strings", '~> 4.0', require: false
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
end
group :system_tests do
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
gem "serverspec", '~> 2.41', require: false
end

group :test do
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])

gem 'ffi'
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.0'
gem 'rspec-collection_matchers', '~> 1.0'
gem 'rspec-its', '~> 1.0'
gem 'rubocop', '~> 1.48', require: false
gem 'rubocop-performance', '~> 1.16', require: false
gem 'rubocop-rspec', '~> 2.19', require: false
gem 'simplecov', require: false
puppet_version = ENV['PUPPET_GEM_VERSION']
facter_version = ENV['FACTER_GEM_VERSION']
hiera_version = ENV['HIERA_GEM_VERSION']

gems = {}

gems['puppet'] = location_for(puppet_version)

# If facter or hiera versions have been specified via the environment
# variables

gems['facter'] = location_for(facter_version) if facter_version
gems['hiera'] = location_for(hiera_version) if hiera_version

gems.each do |gem_name, gem_params|
gem gem_name, *gem_params
end

# Evaluate Gemfile.local and ~/.gemfile if they exist
extra_gemfiles = [
"#{__FILE__}.local",
File.join(Dir.home, '.gemfile'),
]

extra_gemfiles.each do |gemfile|
if File.file?(gemfile) && File.readable?(gemfile)
eval(File.read(gemfile), binding)
end
end
# vim: syntax=ruby
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"version_requirement": ">= 6.0.0 < 8.0.0"
}
],
"pdk-version": "1.13.0",
"template-url": "pdk-default#1.13.0",
"template-ref": "1.13.0-0-g66e1443"
"pdk-version": "3.0.0",
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
"template-ref": "tags/3.0.0-0-g5bfc1c0"
}
9 changes: 9 additions & 0 deletions spec/default_facts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Use default_module_facts.yml for module specific facts.
#
# Facts specified here will override the values provided by rspec-puppet-facts.
---
networking:
ip: "172.16.254.254"
ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
mac: "AA:AA:AA:AA:AA:AA"
is_pe: false