Skip to content
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
55 changes: 30 additions & 25 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
require:
plugins:
- rubocop-performance
- rubocop-rspec
- rubocop-rspec_rails
- rubocop-factory_bot
- rubocop-capybara
AllCops:
NewCops: enable
DisplayCopNames: true
Expand Down Expand Up @@ -75,6 +78,8 @@ RSpec/NamedSubject:
Enabled: false
RSpec/SubjectStub:
Enabled: false
Style/FileNull:
Enabled: false
RSpec/MessageSpies:
EnforcedStyle: receive
Style/Documentation:
Expand Down Expand Up @@ -123,6 +128,12 @@ Capybara/CurrentPathExpectation:
Enabled: false
Capybara/VisibilityMatcher:
Enabled: false
FactoryBot/AttributeDefinedStatically:
Enabled: false
FactoryBot/CreateList:
Enabled: false
FactoryBot/FactoryClassName:
Enabled: false
Gemspec/DuplicatedAssignment:
Enabled: false
Gemspec/OrderedDependencies:
Expand Down Expand Up @@ -297,8 +308,6 @@ Performance/UriDefaultParser:
Enabled: false
RSpec/Be:
Enabled: false
RSpec/Capybara/FeatureMethods:
Enabled: false
RSpec/ContainExactly:
Enabled: false
RSpec/ContextMethod:
Expand All @@ -307,6 +316,8 @@ RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/Dialect:
Enabled: false
RSpec/EmptyHook:
Enabled: false
RSpec/EmptyLineAfterExample:
Expand All @@ -323,12 +334,6 @@ RSpec/ExpectChange:
Enabled: false
RSpec/ExpectInHook:
Enabled: false
RSpec/FactoryBot/AttributeDefinedStatically:
Enabled: false
RSpec/FactoryBot/CreateList:
Enabled: false
RSpec/FactoryBot/FactoryClassName:
Enabled: false
RSpec/HooksBeforeExamples:
Enabled: false
RSpec/ImplicitBlockExpectation:
Expand Down Expand Up @@ -503,6 +508,12 @@ Capybara/SpecificFinders:
Enabled: false
Capybara/SpecificMatcher:
Enabled: false
FactoryBot/ConsistentParenthesesStyle:
Enabled: false
FactoryBot/FactoryNameStyle:
Enabled: false
FactoryBot/SyntaxMethods:
Enabled: false
Gemspec/DeprecatedAttributeAssignment:
Enabled: false
Gemspec/DevelopmentDependencies:
Expand Down Expand Up @@ -603,28 +614,12 @@ RSpec/DuplicatedMetadata:
Enabled: false
RSpec/ExcessiveDocstringSpacing:
Enabled: false
RSpec/FactoryBot/ConsistentParenthesesStyle:
Enabled: false
RSpec/FactoryBot/FactoryNameStyle:
Enabled: false
RSpec/FactoryBot/SyntaxMethods:
Enabled: false
RSpec/IdenticalEqualityAssertion:
Enabled: false
RSpec/NoExpectationExample:
Enabled: false
RSpec/PendingWithoutReason:
Enabled: false
RSpec/Rails/AvoidSetupHook:
Enabled: false
RSpec/Rails/HaveHttpStatus:
Enabled: false
RSpec/Rails/InferredSpecType:
Enabled: false
RSpec/Rails/MinitestAssertions:
Enabled: false
RSpec/Rails/TravelAround:
Enabled: false
RSpec/RedundantAround:
Enabled: false
RSpec/SkipBlockInsideExample:
Expand All @@ -635,6 +630,16 @@ RSpec/SubjectDeclaration:
Enabled: false
RSpec/VerifiedDoubleReference:
Enabled: false
RSpecRails/AvoidSetupHook:
Enabled: false
RSpecRails/HaveHttpStatus:
Enabled: false
RSpecRails/InferredSpecType:
Enabled: false
RSpecRails/MinitestAssertions:
Enabled: false
RSpecRails/TravelAround:
Enabled: false
Security/CompoundHash:
Enabled: false
Security/IoMethods:
Expand Down
12 changes: 2 additions & 10 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/FileNull:
Enabled: false
Gemfile:
optional:
":development":
Expand All @@ -29,17 +31,9 @@ Gemfile:
- gem: beaker-module_install_helper
- gem: beaker-puppet_install_helper
- gem: nokogiri
- gem: 'bolt'
version: '~> 3.0'
condition: 'ENV["GEM_BOLT"]'
- gem: 'beaker-task_helper'
version: '~> 1.9'
condition: 'ENV["GEM_BOLT"]'
# The Faraday requirements in orchestrator_client 0.7.1 causes Bundler to
# resolve the dependency in unexpected ways and causes issues in CI
- gem: 'orchestrator_client'
version: '< 0.7.1'
condition: 'ENV["GEM_BOLT"]'
":system_tests":
- gem: voxpupuli-acceptance
version: '~> 3'
Expand All @@ -56,8 +50,6 @@ Gemfile:
unmanaged: false
.github/workflows/release_prep.yml:
unmanaged: false
spec/default_facts.yml:
delete: true
spec/spec_helper.rb:
unmanaged: true
# puppet_url_without modules check in puppet-lint assumes any puppet:/// URL is
Expand Down
16 changes: 10 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ group :development do
gem "pry", '~> 0.10', require: false
gem "simplecov-console", '~> 0.9', require: false
gem "puppet-debugger", '~> 1.6', require: false
gem "rubocop", '~> 1.50.0', require: false
gem "rubocop-performance", '= 1.16.0', require: false
gem "rubocop-rspec", '= 2.19.0', require: false
gem "rubocop", '~> 1.73.0', require: false
gem "rubocop-performance", '~> 1.24.0', require: false
gem "rubocop-rspec", '~> 3.5.0', require: false
gem "rubocop-rspec_rails", '~> 2.31.0', require: false
gem "rubocop-factory_bot", '~> 2.27.0', require: false
gem "rubocop-capybara", '~> 2.22.0', require: false
gem "rubocop-ast", '< 1.43.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 6.0')
Expand All @@ -65,9 +69,7 @@ group :development do
gem "beaker-module_install_helper", require: false
gem "beaker-puppet_install_helper", require: false
gem "nokogiri", require: false
gem "bolt", '~> 3.0', require: false if ENV["GEM_BOLT"]
gem "beaker-task_helper", '~> 1.9', require: false if ENV["GEM_BOLT"]
gem "orchestrator_client", '< 0.7.1', require: false if ENV["GEM_BOLT"]
end
group :development, :release_prep do
gem "puppet-strings", '~> 4.0', require: false
Expand All @@ -76,17 +78,19 @@ group :development, :release_prep do
end
group :system_tests do
gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw] if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] if ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
gem "puppet_litmus", '~> 1.0', '!= 1.6.1', require: false, platforms: [:ruby, :x64_mingw] if ENV["PUPPET_FORGE_TOKEN"].to_s.empty?
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "serverspec", '~> 2.41', require: false
gem "voxpupuli-acceptance", '~> 3', require: false
end

gems = {}
bolt_version = ENV.fetch('BOLT_GEM_VERSION', nil)
puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil)
facter_version = ENV.fetch('FACTER_GEM_VERSION', nil)
hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil)

gems['bolt'] = location_for(bolt_version, nil, { source: gemsource_puppetcore })
gems['puppet'] = location_for(puppet_version, nil, { source: gemsource_puppetcore })
gems['facter'] = location_for(facter_version, nil, { source: gemsource_puppetcore })
gems['hiera'] = location_for(hiera_version, nil, {}) if hiera_version
Expand Down
2 changes: 1 addition & 1 deletion lib/facter/env_temp_variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Facter.add(:env_temp_variable) do
setcode do
(ENV['TEMP'] || Dir.tmpdir)
ENV['TEMP'] || Dir.tmpdir
end
end
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@
}
],
"pdk-version": "3.6.1",
"template-url": "https://github.com/puppetlabs/pdk-templates#3.5.1",
"template-ref": "tags/3.5.1-0-g9d5b193"
"template-url": "https://github.com/puppetlabs/pdk-templates#3.6.1.1",
"template-ref": "tags/3.6.1.1-0-g5fe78cc"
}
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
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

begin
require 'deep_merge'
default_facts.deep_merge!(YAML.safe_load(File.read(f), permitted_classes: [], permitted_symbols: [], aliases: true))
default_facts.deep_merge!(YAML.safe_load_file(f, permitted_classes: [], permitted_symbols: [], aliases: true))
rescue StandardError => e
RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
end
Expand Down
Loading