Skip to content

Commit 1f04a1d

Browse files
Merge pull request #133 from puppetlabs/CAT-2281-Remove_puppet_7_test_infrastructure
(CAT-2281) Remove puppet 7 infrastructure
2 parents ff78142 + 616bdc0 commit 1f04a1d

File tree

9 files changed

+17
-20
lines changed

9 files changed

+17
-20
lines changed

.github/workflows/ci.yml

-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
ruby_version:
21-
- "2.7"
2221
- "3.2"
2322
include:
24-
- ruby-version: '2.7'
25-
puppet_gem_version: '~> 7.0'
2623
- ruby_version: '3.2'
2724
puppet_gem_version: '~> 8.0'
2825
runs_on:

.github/workflows/nightly.yml

-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
ruby_version:
14-
- "2.7"
1514
- "3.2"
1615
include:
17-
- ruby-version: '2.7'
18-
puppet_gem_version: '~> 7.0'
1916
- ruby_version: '3.2'
2017
puppet_gem_version: '~> 8.0'
2118
runs_on:

.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inherit_from: .rubocop_todo.yml
44
inherit_gem:
55
voxpupuli-rubocop: rubocop.yml
66

7+
AllCops:
8+
TargetRubyVersion: '3.1'
9+
710
# Disabled
811
Style/ClassAndModuleChildren:
912
Enabled: false

lib/rspec-puppet/matchers/create_generic.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ def with(*args)
3030
self
3131
end
3232

33-
def only_with(*args, &block)
33+
def only_with(*args, &)
3434
params = args.shift
3535
@expected_params_count = (@expected_params_count || 0) + params.compact.size
36-
with(params, &block)
36+
with(params, &)
3737
end
3838

3939
def without(*args)
@@ -62,7 +62,7 @@ def that_comes_before(resource)
6262
self
6363
end
6464

65-
def method_missing(method, *args, &block)
65+
def method_missing(method, *args, &)
6666
case method.to_s
6767
when /^with_/
6868
param = method.to_s.gsub(/^with_/, '')
@@ -320,7 +320,7 @@ def precedes?(first, second)
320320
before_refs = relationship_refs(u, :before) + relationship_refs(u, :notify)
321321
require_refs = relationship_refs(v, :require) + relationship_refs(u, :subscribe)
322322

323-
return true if before_refs.include?(v.to_ref) || require_refs.include?(u.to_ref) || (before_refs & require_refs).any?
323+
return true if before_refs.include?(v.to_ref) || require_refs.include?(u.to_ref) || before_refs.intersect?(require_refs)
324324
end
325325
end
326326

lib/rspec-puppet/matchers/dynamic_matchers.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
module RSpec::Puppet
44
module ManifestMatchers
5-
def method_missing(method, *args, &block)
5+
def method_missing(method, *args, &)
66
if /^(create|contain)_/.match?(method.to_s)
77
return RSpec::Puppet::ManifestMatchers::CreateGeneric.new(method, *args,
8-
&block)
8+
&)
99
end
1010
if /^have_.+_count$/.match?(method.to_s)
1111
return RSpec::Puppet::ManifestMatchers::CountGeneric.new(nil, args[0],
@@ -18,16 +18,16 @@ def method_missing(method, *args, &block)
1818
end
1919

2020
module FunctionMatchers
21-
def method_missing(method, *args, &block)
21+
def method_missing(method, *args, &)
2222
return RSpec::Puppet::FunctionMatchers::Run.new if method == :run
2323

2424
super
2525
end
2626
end
2727

2828
module TypeMatchers
29-
def method_missing(method, *args, &block)
30-
return RSpec::Puppet::TypeMatchers::CreateGeneric.new(method, *args, &block) if method == :be_valid_type
29+
def method_missing(method, ...)
30+
return RSpec::Puppet::TypeMatchers::CreateGeneric.new(method, ...) if method == :be_valid_type
3131

3232
super
3333
end

lib/rspec-puppet/matchers/raise_error.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def supports_value_expectations?
1919
end
2020

2121
def raise_error(
22-
error = defined?(RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue) ? RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue : nil, message = nil, &block
22+
error = defined?(RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue) ? RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue : nil, message = nil, &
2323
)
24-
RaiseError.new(error, message, &block)
24+
RaiseError.new(error, message, &)
2525
end
2626
end
2727
end

lib/rspec-puppet/matchers/run.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def failure_message_actual(type)
143143

144144
def failure_message_generic(type, _func_obj)
145145
# message is mutable
146-
message = +"expected #{func_name}(#{func_params}) to "
146+
message = "expected #{func_name}(#{func_params}) to "
147147
message << 'not ' if type == :should_not
148148

149149
if @has_expected_return

lib/rspec-puppet/support.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def site_pp_str
128128
File.read(path)
129129
elsif File.directory?(path)
130130
# Read and concatenate all .pp files.
131-
Dir[File.join(path, '*.pp')].sort.map do |f|
131+
Dir[File.join(path, '*.pp')].map do |f|
132132
File.read(f)
133133
end.join("\n")
134134
else

rspec-puppet.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ Gem::Specification.new do |s|
2424
s.authors = ['Tim Sharpe', 'Puppet, Inc.', 'Community Contributors']
2525
2626

27-
s.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
27+
s.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
2828
end

0 commit comments

Comments
 (0)