Skip to content

Commit f9892bb

Browse files
committed
(CONT-789) Rubocop Manual Fix 3 - Naming/HeredocDelimiterNaming
1 parent 49eb0a8 commit f9892bb

8 files changed

+16
-29
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ Metrics/MethodLength:
4848
Metrics/PerceivedComplexity:
4949
Max: 18
5050

51-
# Offense count: 8
52-
# Configuration parameters: ForbiddenDelimiters.
53-
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
54-
Naming/HeredocDelimiterNaming:
55-
Exclude:
56-
- 'lib/puppet/type/mysql_login_path.rb'
57-
- 'spec/acceptance/types/mysql_grant_spec.rb'
58-
- 'spec/acceptance/types/mysql_user_spec.rb'
59-
- 'spec/classes/mysql_backup_mysqldump_spec.rb'
60-
- 'spec/classes/mysql_backup_xtrabackup_spec.rb'
61-
- 'spec/classes/mysql_server_account_security_spec.rb'
62-
- 'spec/classes/mysql_server_backup_spec.rb'
63-
6451
# Offense count: 1
6552
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
6653
# SupportedStylesForLeadingUnderscores: disallowed, required, optional

lib/puppet/type/mysql_login_path.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Puppet::ResourceApi.register_type(
66
name: 'mysql_login_path',
77

8-
docs: <<-EOS,
8+
docs: <<-DESCRIPTION,
99
@summary
1010
Manage a MySQL login path.
1111
@see
@@ -31,7 +31,7 @@
3131
3232
This type provides Puppet with the capabilities to store authentication credentials in an obfuscated login path file
3333
named .mylogin.cnf created with the mysql_config_editor utility. Supports only MySQL Community Edition > v5.6.6.
34-
EOS
34+
DESCRIPTION
3535
features: ['simple_get_filter', 'canonicalize'],
3636
title_patterns: [
3737
{

spec/acceptance/types/mysql_grant_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ class { 'mysql::server':
415415

416416
describe 'adding function privileges' do
417417
it 'works without errors' do
418-
pp = <<-EOS
418+
pp = <<-MANIFEST
419419
exec { 'simplefunc-create':
420420
command => '/usr/bin/mysql --user="root" --password="password" --database=mysql -NBe "CREATE FUNCTION simplefunc (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT(\\'Hello, \\', s, \\'!\\')"',
421421
before => Mysql_user['test3@tester'],
@@ -432,7 +432,7 @@ class { 'mysql::server':
432432
privileges => ['EXECUTE'],
433433
require => Mysql_user['test3@tester'],
434434
}
435-
EOS
435+
MANIFEST
436436

437437
apply_manifest(pp, catch_failures: true)
438438
end

spec/acceptance/types/mysql_user_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ class { 'mysql::server': * => $ed25519_opts }
4747

4848
describe 'changing authentication plugin', if: (Gem::Version.new(mysql_version) > Gem::Version.new('5.5.0') && os[:release] !~ %r{^16\.04}) do
4949
it 'works without errors', if: (os[:family] != 'sles' && os[:release].to_i == 15) do
50-
pp = <<-EOS
50+
pp = <<-MANIFEST
5151
mysql_user { 'ashp@localhost':
5252
plugin => 'auth_socket',
5353
}
54-
EOS
54+
MANIFEST
5555

5656
idempotent_apply(pp)
5757
end
@@ -78,12 +78,12 @@ class { 'mysql::server': * => $ed25519_opts }
7878

7979
describe 'using ed25519 authentication plugin', if: Gem::Version.new(mysql_version) > Gem::Version.new('10.1.21') do
8080
it 'works without errors' do
81-
pp = <<-EOS
81+
pp = <<-MANIFEST
8282
mysql_user { 'ashp@localhost':
8383
plugin => 'ed25519',
8484
password_hash => 'z0pjExBYbzbupUByZRrQvC6kRCcE8n/tC7kUdUD11fU',
8585
}
86-
EOS
86+
MANIFEST
8787

8888
idempotent_apply(pp)
8989
end

spec/classes/mysql_backup_mysqldump_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
on_supported_os.each do |os, facts|
77
context "on #{os}" do
88
let(:pre_condition) do
9-
<<-EOF
9+
<<-MANIFEST
1010
class { 'mysql::server': }
11-
EOF
11+
MANIFEST
1212
end
1313
let(:facts) do
1414
facts.merge(root_home: '/root')

spec/classes/mysql_backup_xtrabackup_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
on_supported_os.each do |os, facts|
77
context "on #{os}" do
88
let(:pre_condition) do
9-
<<-EOF
9+
<<-MANIFEST
1010
class { 'mysql::server': }
11-
EOF
11+
MANIFEST
1212
end
1313
let(:facts) do
1414
facts.merge(root_home: '/root',

spec/classes/mysql_server_account_security_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
on_supported_os.each do |os, facts|
77
context "on #{os}" do
88
let(:pre_condition) do
9-
<<-EOF
9+
<<-MANIFEST
1010
anchor {'mysql::server::end': }
11-
EOF
11+
MANIFEST
1212
end
1313

1414
context 'with fqdn==myhost.mydomain' do

spec/classes/mysql_server_backup_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
on_supported_os.each do |os, facts|
77
context "on #{os}" do
88
let(:pre_condition) do
9-
<<-EOF
9+
<<-MANIFEST
1010
class { 'mysql::server': }
11-
EOF
11+
MANIFEST
1212
end
1313
let(:facts) do
1414
facts.merge(root_home: '/root')

0 commit comments

Comments
 (0)