Skip to content

Commit f622bdb

Browse files
committed
rubocop: autofix
1 parent 5197db6 commit f622bdb

File tree

7 files changed

+58
-61
lines changed

7 files changed

+58
-61
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
os: [ubuntu-24.04, windows-latest]
37-
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
37+
# don't generate the matrix dynamically until we switch from puppet to openvox, puppet fails on Ruby 3.4
38+
#ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
39+
ruby: ['3.2', '3.3']
3840
runs-on: ${{ matrix.os }}
3941
steps:
4042
- name: Checkout repository

spec/integration/inventory_spec.rb

Lines changed: 23 additions & 23 deletions
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

Lines changed: 2 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126

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

spec/integration/remote_spec.rb

Lines changed: 22 additions & 22 deletions
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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,20 @@ def make_command(command:, version:, payload:, wait: nil)
3131
end
3232

3333
def replace_facts(certname, facts, wait: nil)
34-
make_command(command: 'replace facts', version: 5, payload: {
34+
make_command(command: 'replace facts', version: 5, payload:
35+
{
3536
certname: certname,
3637
environment: 'production',
3738
producer_timestamp: Time.now.iso8601(3),
3839
producer: 'bolt',
39-
values: facts
40+
values: facts
4041
},
4142
wait: wait)
4243
end
4344

4445
def deactivate_node(certname, wait: nil)
45-
make_command(command: 'deactivate node', version: 3, payload: {
46-
certname: certname,
47-
producer_timestamp: Time.now.iso8601(3)
48-
},
49-
wait: wait)
46+
make_command(command: 'deactivate node', version: 3,
47+
payload: { certname: certname, producer_timestamp: Time.now.iso8601(3) }, wait: wait)
5048
end
5149

5250
def push_facts(facts_hash)

spec/unit/logger_spec.rb

Lines changed: 1 addition & 2 deletions
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)