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 19
19
fail-fast : false
20
20
matrix :
21
21
ruby_version :
22
- - ' 2.7'
23
22
- ' 3.2'
24
23
- ' 3.3'
25
24
name : " spec (ruby ${{ matrix.ruby_version }})"
35
34
fail-fast : false
36
35
matrix :
37
36
ruby_version :
38
- - ' 2.7'
39
37
- ' 3.2'
40
38
- ' 3.3'
41
39
include :
42
- - ruby_version : ' 2.7'
43
- puppet_version : ' ~> 7.0'
44
40
- ruby_version : ' 3.2'
45
41
puppet_version : ' ~> 8.0'
46
42
- ruby_version : ' 3.3'
Original file line number Diff line number Diff line change 11
11
fail-fast : false
12
12
matrix :
13
13
ruby_version :
14
- - ' 2.7'
15
14
- ' 3.2'
16
15
uses : " puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
17
16
secrets : " inherit"
24
23
fail-fast : false
25
24
matrix :
26
25
ruby_version :
27
- - ' 2.7'
28
26
- ' 3.2'
29
27
include :
30
- - ruby_version : ' 2.7'
31
- puppet_version : ' ~> 7.0'
32
28
- ruby_version : ' 3.2'
33
29
puppet_version : ' ~> 8.0'
34
30
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
4
4
inherit_gem :
5
5
voxpupuli-rubocop : rubocop.yml
6
6
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
+
7
17
# Disabled
8
18
Style/ClassAndModuleChildren :
9
19
Enabled : false
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
spec . executables = Dir [ 'bin/**/*' ] . map { |f | File . basename ( f ) }
27
27
spec . require_paths = [ 'lib' ]
28
28
29
- spec . required_ruby_version = Gem ::Requirement . new ( '>= 2.7 ' )
29
+ spec . required_ruby_version = Gem ::Requirement . new ( '>= 3.1.0 ' )
30
30
31
31
spec . add_runtime_dependency 'mocha' , '>= 1.0' , '< 3'
32
32
spec . add_runtime_dependency 'pathspec' , '>= 0.2' , '< 3'
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
37
37
38
38
spec . add_development_dependency 'voxpupuli-rubocop' , '~> 2.8.0'
39
39
40
- spec . requirements << 'puppet, >= 7 .0.0'
40
+ spec . requirements << 'puppet, >= 8 .0.0'
41
41
end
Original file line number Diff line number Diff line change 32
32
let ( :node ) { described_class . node }
33
33
34
34
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
36
36
end
37
37
end
38
38
60
60
it 'accepts an injected scope' do
61
61
expect ( Puppet ::Parser ::Functions ) . to receive ( :function ) . with ( 'my_func' ) . and_return ( true )
62
62
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 )
64
64
end
65
65
66
66
it "returns nil if the function doesn't exist" do
67
67
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
69
69
end
70
70
end
71
71
end
You can’t perform that action at this time.
0 commit comments