File tree Expand file tree Collapse file tree 5 files changed +15
-13
lines changed
spec/unit/puppetlabs_spec_helper/puppetlabs_spec Expand file tree Collapse file tree 5 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1919 fail-fast : false
2020 matrix :
2121 ruby_version :
22- - ' 2.7'
2322 - ' 3.2'
2423 - ' 3.3'
2524 name : " spec (ruby ${{ matrix.ruby_version }})"
3534 fail-fast : false
3635 matrix :
3736 ruby_version :
38- - ' 2.7'
3937 - ' 3.2'
4038 - ' 3.3'
4139 include :
42- - ruby_version : ' 2.7'
43- puppet_version : ' ~> 7.0'
4440 - ruby_version : ' 3.2'
4541 puppet_version : ' ~> 8.0'
4642 - ruby_version : ' 3.3'
Original file line number Diff line number Diff line change 1111 fail-fast : false
1212 matrix :
1313 ruby_version :
14- - ' 2.7'
1514 - ' 3.2'
1615 uses : " puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
1716 secrets : " inherit"
2423 fail-fast : false
2524 matrix :
2625 ruby_version :
27- - ' 2.7'
2826 - ' 3.2'
2927 include :
30- - ruby_version : ' 2.7'
31- puppet_version : ' ~> 7.0'
3228 - ruby_version : ' 3.2'
3329 puppet_version : ' ~> 8.0'
3430 uses : " puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ inherit_from: .rubocop_todo.yml
44inherit_gem :
55 voxpupuli-rubocop : rubocop.yml
66
7+ AllCops :
8+ Exclude :
9+ - Gemfile
10+ - Rakefile
11+ - spec/fixtures/**/*
12+ - vendor/bundle/**/*
13+ NewCops : enable
14+ SuggestExtensions : false
15+ TargetRubyVersion : ' 3.1'
16+
717# Disabled
818Style/ClassAndModuleChildren :
919 Enabled : false
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
2626 spec . executables = Dir [ 'bin/**/*' ] . map { |f | File . basename ( f ) }
2727 spec . require_paths = [ 'lib' ]
2828
29- spec . required_ruby_version = Gem ::Requirement . new ( '>= 2.7 ' )
29+ spec . required_ruby_version = Gem ::Requirement . new ( '>= 3.1.0 ' )
3030
3131 spec . add_runtime_dependency 'mocha' , '>= 1.0' , '< 3'
3232 spec . add_runtime_dependency 'pathspec' , '>= 0.2' , '< 3'
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
3737
3838 spec . add_development_dependency 'voxpupuli-rubocop' , '~> 2.8.0'
3939
40- spec . requirements << 'puppet, >= 7 .0.0'
40+ spec . requirements << 'puppet, >= 8 .0.0'
4141end
Original file line number Diff line number Diff line change 3232 let ( :node ) { described_class . node }
3333
3434 it 'can have a defined node' do
35- expect ( described_class . compiler ( node : node ) . node ) . to be node
35+ expect ( described_class . compiler ( node :) . node ) . to be node
3636 end
3737 end
3838
6060 it 'accepts an injected scope' do
6161 expect ( Puppet ::Parser ::Functions ) . to receive ( :function ) . with ( 'my_func' ) . and_return ( true )
6262 expect ( scope ) . to receive ( :method ) . with ( :function_my_func ) . and_return ( :fake_method )
63- expect ( described_class . function_method ( 'my_func' , scope : scope ) ) . to eq ( :fake_method )
63+ expect ( described_class . function_method ( 'my_func' , scope :) ) . to eq ( :fake_method )
6464 end
6565
6666 it "returns nil if the function doesn't exist" do
6767 expect ( Puppet ::Parser ::Functions ) . to receive ( :function ) . with ( 'my_func' ) . and_return ( false )
68- expect ( described_class . function_method ( 'my_func' , scope : scope ) ) . to be_nil
68+ expect ( described_class . function_method ( 'my_func' , scope :) ) . to be_nil
6969 end
7070 end
7171end
You can’t perform that action at this time.
0 commit comments