Skip to content

Commit

Permalink
fix(rubocop): fix remaining errors manually
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 8, 2019
1 parent 2fe3475 commit 9359bad
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Metrics/LineLength:
Max: 88

# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
Metrics/BlockLength:
Max: 36
7 changes: 5 additions & 2 deletions bin/kitchen
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
abort(
'Your `bin/bundle` was not generated by Bundler, '\
'so this binstub cannot run. Replace `bin/bundle` by running '\
'`bundle binstubs bundler --force`, then run this command again.'
)
end
end

Expand Down
16 changes: 14 additions & 2 deletions test/integration/default/controls/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,27 @@
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') { should include 'This is another example file from SaltStack template-formula.' }
its('content') do
should include(
'This is another example file from SaltStack template-formula.'
)
end
its('content') { should include '"added_in_pillar": "pillar_value"' }
its('content') { should include '"added_in_defaults": "defaults_value"' }
its('content') { should include '"added_in_lookup": "lookup_value"' }
its('content') { should include '"config": "/etc/template-formula.conf"' }
its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' }
its('content') { should include '"pkg": {"name": "' }
its('content') { should include '"service": {"name": "' }
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"]}' }
its('content') do
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"]}'
)
end
its('content') { should include '"arch": "amd64"' }
its('content') { should include '"winner": "pillar"}' }
its('content') { should include 'winner of the merge: pillar' }
Expand Down
15 changes: 13 additions & 2 deletions test/integration/default/controls/subcomponent_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') { should include '# File managed by Salt at <salt://template/subcomponent/config/files/default/subcomponent-example.tmpl.jinja>.' }
its('content') { should include 'This is another subcomponent example file from SaltStack template-formula.' }
its('content') do
should include(
'# File managed by Salt at '\
'<salt://template/subcomponent/config/files/default/'\
'subcomponent-example.tmpl.jinja>.'
)
end
its('content') do
should include(
'This is another subcomponent example file from SaltStack '\
'template-formula.'
)
end
end
end

0 comments on commit 9359bad

Please sign in to comment.