Skip to content

(CAT-2281) Remove puppet 7 infrastructure #482

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

Merged
merged 2 commits into from
Apr 10, 2025
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
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
- '3.3'
name: "spec (ruby ${{ matrix.ruby_version }})"
Expand All @@ -35,12 +34,9 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
- '3.3'
include:
- ruby_version: '2.7'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_version: '~> 8.0'
- ruby_version: '3.3'
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
secrets: "inherit"
Expand All @@ -24,11 +23,8 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
include:
- ruby_version: '2.7'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_version: '~> 8.0'
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
Expand Down
10 changes: 10 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ inherit_from: .rubocop_todo.yml
inherit_gem:
voxpupuli-rubocop: rubocop.yml

AllCops:
Exclude:
- Gemfile
- Rakefile
- spec/fixtures/**/*
- vendor/bundle/**/*
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: '3.1'

# Disabled
Style/ClassAndModuleChildren:
Enabled: false
Expand Down
4 changes: 2 additions & 2 deletions puppetlabs_spec_helper.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.executables = Dir['bin/**/*'].map { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = Gem::Requirement.new('>= 2.7')
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')

spec.add_runtime_dependency 'mocha', '>= 1.0', '< 3'
spec.add_runtime_dependency 'pathspec', '>= 0.2', '< 3'
Expand All @@ -37,5 +37,5 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'

spec.requirements << 'puppet, >= 7.0.0'
spec.requirements << 'puppet, >= 8.0.0'
end
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
let(:node) { described_class.node }

it 'can have a defined node' do
expect(described_class.compiler(node: node).node).to be node
expect(described_class.compiler(node:).node).to be node
end
end

Expand Down Expand Up @@ -60,12 +60,12 @@
it 'accepts an injected scope' do
expect(Puppet::Parser::Functions).to receive(:function).with('my_func').and_return(true)
expect(scope).to receive(:method).with(:function_my_func).and_return(:fake_method)
expect(described_class.function_method('my_func', scope: scope)).to eq(:fake_method)
expect(described_class.function_method('my_func', scope:)).to eq(:fake_method)
end

it "returns nil if the function doesn't exist" do
expect(Puppet::Parser::Functions).to receive(:function).with('my_func').and_return(false)
expect(described_class.function_method('my_func', scope: scope)).to be_nil
expect(described_class.function_method('my_func', scope:)).to be_nil
end
end
end