mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-16 01:30:23 +00:00
fix(rubocop): fix remaining errors manually
This commit is contained in:
parent
484ce2459d
commit
9566b6fb63
4 changed files with 34 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -8,7 +8,11 @@ control 'template configuration' do
|
|||
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"' }
|
||||
|
@ -16,7 +20,15 @@ control 'template configuration' do
|
|||
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' }
|
||||
|
|
|
@ -8,7 +8,18 @@ control 'template subcomponent configuration' do
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue