Skip to content

Commit 06c0c88

Browse files
committed
(PA-7897) pdk update --template-ref 3.6.1.1
Notable pdk template changes: * bumps rubocop to 1.73.x and updates rubocop.yml based on ruby 3.1 target version. * If PUPPET_FORGE_TOKEN env variable is defined, install bolt dependency from puppetcore rubygem source. BOLT_GEM_VERSION can also be used to constrain the gem, like PUPPET_GEM_VERSION. * puppet_litmus 1.6.1 added a minimum bolt 4 requirement. Exclude 1.6.1 until we're ready for bolt 4 in a separate ticket. * drops orchestrator_client pin
1 parent 0f6d7a5 commit 06c0c88

8 files changed

Lines changed: 44 additions & 45 deletions

File tree

.rubocop.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
2-
require:
2+
plugins:
33
- rubocop-performance
44
- rubocop-rspec
5+
- rubocop-rspec_rails
6+
- rubocop-factory_bot
7+
- rubocop-capybara
58
AllCops:
69
NewCops: enable
710
DisplayCopNames: true
@@ -123,6 +126,12 @@ Capybara/CurrentPathExpectation:
123126
Enabled: false
124127
Capybara/VisibilityMatcher:
125128
Enabled: false
129+
FactoryBot/AttributeDefinedStatically:
130+
Enabled: false
131+
FactoryBot/CreateList:
132+
Enabled: false
133+
FactoryBot/FactoryClassName:
134+
Enabled: false
126135
Gemspec/DuplicatedAssignment:
127136
Enabled: false
128137
Gemspec/OrderedDependencies:
@@ -297,8 +306,6 @@ Performance/UriDefaultParser:
297306
Enabled: false
298307
RSpec/Be:
299308
Enabled: false
300-
RSpec/Capybara/FeatureMethods:
301-
Enabled: false
302309
RSpec/ContainExactly:
303310
Enabled: false
304311
RSpec/ContextMethod:
@@ -307,6 +314,8 @@ RSpec/ContextWording:
307314
Enabled: false
308315
RSpec/DescribeClass:
309316
Enabled: false
317+
RSpec/Dialect:
318+
Enabled: false
310319
RSpec/EmptyHook:
311320
Enabled: false
312321
RSpec/EmptyLineAfterExample:
@@ -323,12 +332,6 @@ RSpec/ExpectChange:
323332
Enabled: false
324333
RSpec/ExpectInHook:
325334
Enabled: false
326-
RSpec/FactoryBot/AttributeDefinedStatically:
327-
Enabled: false
328-
RSpec/FactoryBot/CreateList:
329-
Enabled: false
330-
RSpec/FactoryBot/FactoryClassName:
331-
Enabled: false
332335
RSpec/HooksBeforeExamples:
333336
Enabled: false
334337
RSpec/ImplicitBlockExpectation:
@@ -503,6 +506,12 @@ Capybara/SpecificFinders:
503506
Enabled: false
504507
Capybara/SpecificMatcher:
505508
Enabled: false
509+
FactoryBot/ConsistentParenthesesStyle:
510+
Enabled: false
511+
FactoryBot/FactoryNameStyle:
512+
Enabled: false
513+
FactoryBot/SyntaxMethods:
514+
Enabled: false
506515
Gemspec/DeprecatedAttributeAssignment:
507516
Enabled: false
508517
Gemspec/DevelopmentDependencies:
@@ -603,28 +612,12 @@ RSpec/DuplicatedMetadata:
603612
Enabled: false
604613
RSpec/ExcessiveDocstringSpacing:
605614
Enabled: false
606-
RSpec/FactoryBot/ConsistentParenthesesStyle:
607-
Enabled: false
608-
RSpec/FactoryBot/FactoryNameStyle:
609-
Enabled: false
610-
RSpec/FactoryBot/SyntaxMethods:
611-
Enabled: false
612615
RSpec/IdenticalEqualityAssertion:
613616
Enabled: false
614617
RSpec/NoExpectationExample:
615618
Enabled: false
616619
RSpec/PendingWithoutReason:
617620
Enabled: false
618-
RSpec/Rails/AvoidSetupHook:
619-
Enabled: false
620-
RSpec/Rails/HaveHttpStatus:
621-
Enabled: false
622-
RSpec/Rails/InferredSpecType:
623-
Enabled: false
624-
RSpec/Rails/MinitestAssertions:
625-
Enabled: false
626-
RSpec/Rails/TravelAround:
627-
Enabled: false
628621
RSpec/RedundantAround:
629622
Enabled: false
630623
RSpec/SkipBlockInsideExample:
@@ -635,6 +628,16 @@ RSpec/SubjectDeclaration:
635628
Enabled: false
636629
RSpec/VerifiedDoubleReference:
637630
Enabled: false
631+
RSpecRails/AvoidSetupHook:
632+
Enabled: false
633+
RSpecRails/HaveHttpStatus:
634+
Enabled: false
635+
RSpecRails/InferredSpecType:
636+
Enabled: false
637+
RSpecRails/MinitestAssertions:
638+
Enabled: false
639+
RSpecRails/TravelAround:
640+
Enabled: false
638641
Security/CompoundHash:
639642
Enabled: false
640643
Security/IoMethods:

.sync.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,9 @@ Gemfile:
2929
- gem: beaker-module_install_helper
3030
- gem: beaker-puppet_install_helper
3131
- gem: nokogiri
32-
- gem: 'bolt'
33-
version: '~> 3.0'
34-
condition: 'ENV["GEM_BOLT"]'
3532
- gem: 'beaker-task_helper'
3633
version: '~> 1.9'
3734
condition: 'ENV["GEM_BOLT"]'
38-
# The Faraday requirements in orchestrator_client 0.7.1 causes Bundler to
39-
# resolve the dependency in unexpected ways and causes issues in CI
40-
- gem: 'orchestrator_client'
41-
version: '< 0.7.1'
42-
condition: 'ENV["GEM_BOLT"]'
4335
":system_tests":
4436
- gem: voxpupuli-acceptance
4537
version: '~> 3'

Gemfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ group :development do
5252
gem "pry", '~> 0.10', require: false
5353
gem "simplecov-console", '~> 0.9', require: false
5454
gem "puppet-debugger", '~> 1.6', require: false
55-
gem "rubocop", '~> 1.50.0', require: false
56-
gem "rubocop-performance", '= 1.16.0', require: false
57-
gem "rubocop-rspec", '= 2.19.0', require: false
55+
gem "rubocop", '~> 1.73.0', require: false
56+
gem "rubocop-performance", '~> 1.24.0', require: false
57+
gem "rubocop-rspec", '~> 3.5.0', require: false
58+
gem "rubocop-rspec_rails", '~> 2.31.0', require: false
59+
gem "rubocop-factory_bot", '~> 2.27.0', require: false
60+
gem "rubocop-capybara", '~> 2.22.0', require: false
61+
gem "rubocop-ast", '< 1.43.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
5862
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
5963
gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw]
6064
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 6.0')
@@ -65,9 +69,7 @@ group :development do
6569
gem "beaker-module_install_helper", require: false
6670
gem "beaker-puppet_install_helper", require: false
6771
gem "nokogiri", require: false
68-
gem "bolt", '~> 3.0', require: false if ENV["GEM_BOLT"]
6972
gem "beaker-task_helper", '~> 1.9', require: false if ENV["GEM_BOLT"]
70-
gem "orchestrator_client", '< 0.7.1', require: false if ENV["GEM_BOLT"]
7173
end
7274
group :development, :release_prep do
7375
gem "puppet-strings", '~> 4.0', require: false
@@ -76,17 +78,19 @@ group :development, :release_prep do
7678
end
7779
group :system_tests do
7880
gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw] if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
79-
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] if ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
81+
gem "puppet_litmus", '~> 1.0', '!= 1.6.1', require: false, platforms: [:ruby, :x64_mingw] if ENV["PUPPET_FORGE_TOKEN"].to_s.empty?
8082
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
8183
gem "serverspec", '~> 2.41', require: false
8284
gem "voxpupuli-acceptance", '~> 3', require: false
8385
end
8486

8587
gems = {}
88+
bolt_version = ENV.fetch('BOLT_GEM_VERSION', nil)
8689
puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil)
8790
facter_version = ENV.fetch('FACTER_GEM_VERSION', nil)
8891
hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil)
8992

93+
gems['bolt'] = location_for(bolt_version, nil, { source: gemsource_puppetcore })
9094
gems['puppet'] = location_for(puppet_version, nil, { source: gemsource_puppetcore })
9195
gems['facter'] = location_for(facter_version, nil, { source: gemsource_puppetcore })
9296
gems['hiera'] = location_for(hiera_version, nil, {}) if hiera_version

lib/facter/env_temp_variable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
Facter.add(:env_temp_variable) do
44
setcode do
5-
(ENV['TEMP'] || Dir.tmpdir)
5+
ENV['TEMP'] || Dir.tmpdir
66
end
77
end

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@
8383
}
8484
],
8585
"pdk-version": "3.6.1",
86-
"template-url": "https://github.com/puppetlabs/pdk-templates#3.5.1",
87-
"template-ref": "tags/3.5.1-0-g9d5b193"
86+
"template-url": "https://github.com/puppetlabs/pdk-templates#3.6.1.1",
87+
"template-ref": "tags/3.6.1.1-0-g5fe78cc"
8888
}

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
begin
2929
require 'deep_merge'
30-
default_facts.deep_merge!(YAML.safe_load(File.read(f), permitted_classes: [], permitted_symbols: [], aliases: true))
30+
default_facts.deep_merge!(YAML.safe_load_file(f, permitted_classes: [], permitted_symbols: [], aliases: true))
3131
rescue StandardError => e
3232
RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
3333
end

spec/spec_helper_local.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
location = File.expand_path('/dev/null')
1+
location = File::NULL
22

33
@default_module_facts = {
44
aio_agent_version: '5.5.10',

spec/unit/facter/settings_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'spec_helper'
22

33
describe 'settings' do
4-
let(:location) { File.expand_path('/dev/null') }
4+
let(:location) { File::NULL }
55

66
describe 'puppet_digest_algorithm fact' do
77
subject { Facter.fact(:puppet_digest_algorithm).value }

0 commit comments

Comments
 (0)