Skip to content

Commit b47e205

Browse files
Merge pull request #3378 from puppetlabs/rubucop-update
Update rubocop version, this fixes BlockAlignment Error
2 parents e55222a + 8955256 commit b47e205

20 files changed

+77
-79
lines changed

.github/workflows/apply.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: bundle update
4242
- name: Cache modules
4343
id: modules
44-
uses: actions/cache@v1
44+
uses: actions/cache@v4
4545
with:
4646
path: modules
4747
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/bolt_server.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: bundle update
4343
- name: Cache modules
4444
id: modules
45-
uses: actions/cache@v1
45+
uses: actions/cache@v4
4646
with:
4747
path: modules
4848
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/bolt_spec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: bundle update
4343
- name: Cache modules
4444
id: modules
45-
uses: actions/cache@v1
45+
uses: actions/cache@v4
4646
with:
4747
path: modules
4848
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/docker_transport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: bundle update
3434
- name: Cache modules
3535
id: modules
36-
uses: actions/cache@v1
36+
uses: actions/cache@v4
3737
with:
3838
path: modules
3939
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/linux.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: bundle update
3434
- name: Cache modules
3535
id: modules
36-
uses: actions/cache@v1
36+
uses: actions/cache@v4
3737
with:
3838
path: modules
3939
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/local_transport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: bundle update
4242
- name: Cache modules
4343
id: modules
44-
uses: actions/cache@v1
44+
uses: actions/cache@v4
4545
with:
4646
path: modules
4747
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/orch_transport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: bundle update
4242
- name: Cache modules
4343
id: modules
44-
uses: actions/cache@v1
44+
uses: actions/cache@v4
4545
with:
4646
path: modules
4747
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/ssh_transport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: bundle update
3434
- name: Cache modules
3535
id: modules
36-
uses: actions/cache@v1
36+
uses: actions/cache@v4
3737
with:
3838
path: modules
3939
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/unit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: bundle update
3939
- name: Cache modules
4040
id: modules
41-
uses: actions/cache@v1
41+
uses: actions/cache@v4
4242
with:
4343
path: modules
4444
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/windows.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: bundle update
4343
- name: Cache modules
4444
id: modules
45-
uses: actions/cache@v1
45+
uses: actions/cache@v4
4646
with:
4747
path: modules
4848
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}
@@ -73,7 +73,7 @@ jobs:
7373
run: bundle update
7474
- name: Cache modules
7575
id: modules
76-
uses: actions/cache@v1
76+
uses: actions/cache@v4
7777
with:
7878
path: modules
7979
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.github/workflows/winrm_transport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: bundle update
4141
- name: Cache modules
4242
id: modules
43-
uses: actions/cache@v1
43+
uses: actions/cache@v4
4444
with:
4545
path: modules
4646
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}

.rubocop.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
require:
2-
- rubocop-rake
1+
inherit_from: .rubocop_todo.yml
2+
3+
plugins: rubocop-rake
34

45
AllCops:
56
NewCops: enable

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ group(:test) do
2727
gem "beaker-hostgenerator"
2828
gem "mocha", '~> 1.4.0'
2929
gem "rack-test", '~> 1.0'
30-
gem "rubocop", '~> 1.9.0', require: false
30+
gem "rubocop", '~> 1.72.2', require: false
3131
gem "rubocop-rake", require: false
3232
end
3333

spec/integration/cli/cli_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@
429429
['sample::params', 'Task with parameters']
430430
)
431431

432-
expect(@log_output.readlines).to include(/unexpected token/)
432+
expect(@log_output.readlines).to include(/expected object key/) || include(/ WARN Puppet : expected object key/) # rubocop:disable Layout/LineLength
433433
end
434434
end
435435
end

spec/integration/inventory_spec.rb

+23-23
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@
1818

1919
let(:inventory) do
2020
{ targets: [
21-
{ uri: conn[:host],
22-
config: {
23-
transport: conn[:protocol],
24-
conn[:protocol] => {
25-
user: conn[:user],
26-
port: conn[:port],
27-
'connect-timeout': conn[:'connect-timeout'] || 120
28-
}
29-
} },
30-
{ name: 'uriless',
31-
config: {
32-
transport: conn[:protocol],
33-
conn[:protocol] => {
34-
host: conn[:host],
35-
user: conn[:user],
36-
port: conn[:port]
37-
}
38-
} },
39-
{ name: 'hostless',
40-
config: {
41-
transport: conn[:protocol]
42-
} }
43-
],
21+
{ uri: conn[:host],
22+
config: {
23+
transport: conn[:protocol],
24+
conn[:protocol] => {
25+
user: conn[:user],
26+
port: conn[:port],
27+
'connect-timeout': conn[:'connect-timeout'] || 120
28+
}
29+
} },
30+
{ name: 'uriless',
31+
config: {
32+
transport: conn[:protocol],
33+
conn[:protocol] => {
34+
host: conn[:host],
35+
user: conn[:user],
36+
port: conn[:port]
37+
}
38+
} },
39+
{ name: 'hostless',
40+
config: {
41+
transport: conn[:protocol]
42+
} }
43+
],
4444
groups: [{
4545
name: "group1",
4646
targets: [

spec/integration/jail_spec.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
let(:default_inv) do
8686
{
8787
'config' => {
88-
'jail' => {
89-
}
88+
'jail' => {}
9089
}
9190
}
9291
end
@@ -102,8 +101,7 @@
102101
let(:run_as_conf) do
103102
{
104103
'config' => {
105-
'jail' => {
106-
}
104+
'jail' => {}
107105
}
108106
}
109107
end

spec/integration/puppetdb/client_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126

127127
def facts_hash
128128
{ 'node1' => {
129-
'foo' => 'bar',
130-
'name' => 'node1'
131-
},
129+
'foo' => 'bar',
130+
'name' => 'node1'
131+
},
132132
'node2' => {
133133
'foo' => 'bar',
134134
'1' => 'the loneliest number',

spec/integration/remote_spec.rb

+22-22
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,28 @@
1414
let(:conn) { conn_info('ssh') }
1515
let(:inventory) do
1616
{ 'targets' => [
17-
{ 'uri' => conn[:host],
18-
'config' => {
19-
'transport' => conn[:protocol],
20-
conn[:protocol] => {
21-
'user' => conn[:user],
22-
'port' => conn[:port],
23-
'password' => conn[:password]
24-
}
25-
} },
26-
{ 'uri' => 'remote://simple.example.com',
27-
'config' => {
28-
'remote' => {
29-
'run-on' => conn[:host],
30-
'token' => 'token_val'
31-
}
32-
} },
33-
{ 'uri' => 'https://www.example.com',
34-
'config' => {
35-
'transport' => 'remote',
36-
'remote' => { 'run-on': conn[:host] }
37-
} }
38-
],
17+
{ 'uri' => conn[:host],
18+
'config' => {
19+
'transport' => conn[:protocol],
20+
conn[:protocol] => {
21+
'user' => conn[:user],
22+
'port' => conn[:port],
23+
'password' => conn[:password]
24+
}
25+
} },
26+
{ 'uri' => 'remote://simple.example.com',
27+
'config' => {
28+
'remote' => {
29+
'run-on' => conn[:host],
30+
'token' => 'token_val'
31+
}
32+
} },
33+
{ 'uri' => 'https://www.example.com',
34+
'config' => {
35+
'transport' => 'remote',
36+
'remote' => { 'run-on': conn[:host] }
37+
} }
38+
],
3939
'config' => {
4040
'ssh' => { 'host-key-check' => false },
4141
'winrm' => { 'ssl' => false, 'ssl-verify' => false }

spec/lib/bolt_spec/puppetdb.rb

+9-9
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ def make_command(command:, version:, payload:, wait: nil)
3232

3333
def replace_facts(certname, facts, wait: nil)
3434
make_command(command: 'replace facts', version: 5, payload: {
35-
certname: certname,
36-
environment: 'production',
37-
producer_timestamp: Time.now.iso8601(3),
38-
producer: 'bolt',
39-
values: facts
40-
},
35+
certname: certname,
36+
environment: 'production',
37+
producer_timestamp: Time.now.iso8601(3),
38+
producer: 'bolt',
39+
values: facts
40+
},
4141
wait: wait)
4242
end
4343

4444
def deactivate_node(certname, wait: nil)
4545
make_command(command: 'deactivate node', version: 3, payload: {
46-
certname: certname,
47-
producer_timestamp: Time.now.iso8601(3)
48-
},
46+
certname: certname,
47+
producer_timestamp: Time.now.iso8601(3)
48+
},
4949
wait: wait)
5050
end
5151

spec/unit/logger_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def initialize(*args)
5353
describe '::configure' do
5454
let(:appenders) {
5555
{
56-
'file:/bolt.log' => {
57-
},
56+
'file:/bolt.log' => {},
5857
'file:/debug.log' => {
5958
level: :debug,
6059
append: false

0 commit comments

Comments
 (0)