Skip to content

Commit 2ae6519

Browse files
committed
fix(rubocop): fix remaining errors manually
1 parent ca448f8 commit 2ae6519

File tree

4 files changed

+43
-15
lines changed

4 files changed

+43
-15
lines changed

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ Metrics/LineLength:
77
Max: 88
88

99
# Remaining offenses to be fixed, e.g. via. `rubocop --auto-gen-config`
10+
Metrics/BlockLength:
11+
Max: 36

bin/kitchen

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ if File.file?(bundle_binstub)
1818
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
1919
load(bundle_binstub)
2020
else
21-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
abort(
22+
'Your `bin/bundle` was not generated by Bundler, '\
23+
'so this binstub cannot run. Replace `bin/bundle` by running '\
24+
'`bundle binstubs bundler --force`, then run this command again.'
25+
)
2326
end
2427
end
2528

test/integration/default/controls/config_spec.rb

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,29 @@
88
it { should be_owned_by 'root' }
99
it { should be_grouped_into 'root' }
1010
its('mode') { should cmp '0644' }
11-
its('content') { should include 'This is another example file from SaltStack template-formula.' }
12-
its('content') { should include '"added_in_pillar": "pillar_value"' }
13-
its('content') { should include '"added_in_defaults": "defaults_value"' }
14-
its('content') { should include '"added_in_lookup": "lookup_value"' }
15-
its('content') { should include '"config": "/etc/template-formula.conf"' }
11+
its('content') do
12+
should include(
13+
'This is another example file from SaltStack template-formula.'
14+
)
15+
end
16+
its('content') { should include('"added_in_pillar": "pillar_value"') }
17+
its('content') { should include('"added_in_defaults": "defaults_value"') }
18+
its('content') { should include('"added_in_lookup": "lookup_value"') }
19+
its('content') { should include('"config": "/etc/template-formula.conf"') }
1620
its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' }
17-
its('content') { should include '"pkg": {"name": "' }
18-
its('content') { should include '"service": {"name": "' }
19-
its('content') { should include '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", "roles", "osfinger", "os", "os_family"], "source_files": {"template-config-file-file-managed": ["example.tmpl.jinja"], "template-subcomponent-config-file-file-managed": ["subcomponent-example.tmpl.jinja"]}' }
20-
its('content') { should include '"arch": "amd64"' }
21-
its('content') { should include '"winner": "pillar"}' }
22-
its('content') { should include 'winner of the merge: pillar' }
21+
its('content') { should include('"pkg": {"name": "') }
22+
its('content') { should include('"service": {"name": "') }
23+
its('content') do
24+
should include(
25+
'"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\
26+
'"roles", "osfinger", "os", "os_family"], "source_files": '\
27+
'{"template-config-file-file-managed": ["example.tmpl.jinja"], '\
28+
'"template-subcomponent-config-file-file-managed": '\
29+
'["subcomponent-example.tmpl.jinja"]}'
30+
)
31+
end
32+
its('content') { should include('"arch": "amd64"') }
33+
its('content') { should include('"winner": "pillar"}') }
34+
its('content') { should include('winner of the merge: pillar') }
2335
end
2436
end

test/integration/default/controls/subcomponent_config_spec.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@
88
it { should be_owned_by 'root' }
99
it { should be_grouped_into 'root' }
1010
its('mode') { should cmp '0644' }
11-
its('content') { should include '# File managed by Salt at <salt://template/subcomponent/config/files/default/subcomponent-example.tmpl.jinja>.' }
12-
its('content') { should include 'This is another subcomponent example file from SaltStack template-formula.' }
11+
its('content') do
12+
should include(
13+
'# File managed by Salt at '\
14+
'<salt://template/subcomponent/config/files/default/'\
15+
'subcomponent-example.tmpl.jinja>.'
16+
)
17+
end
18+
its('content') do
19+
should include(
20+
'This is another subcomponent example file from SaltStack '\
21+
'template-formula.'
22+
)
23+
end
1324
end
1425
end

0 commit comments

Comments
 (0)