Skip to content

Commit 0f056ec

Browse files
committed
(CONT-722) Correct Style/TrailingCommaInHashLiteral
1 parent 195dd9d commit 0f056ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+259
-266
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,3 @@ Style/StringConcatenation:
265265
Style/TernaryParentheses:
266266
Exclude:
267267
- 'spec/defines/vhost_spec.rb'
268-
269-
# Offense count: 259
270-
# This cop supports safe autocorrection (--autocorrect).
271-
# Configuration parameters: EnforcedStyleForMultiline.
272-
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
273-
Style/TrailingCommaInHashLiteral:
274-
Enabled: false

spec/classes/apache_spec.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
context 'with use_optional_includes' do
6969
let :params do
7070
{
71-
use_optional_includes: true,
71+
use_optional_includes: true
7272
}
7373
end
7474

@@ -78,7 +78,7 @@
7878
context 'with serveradmin' do
7979
let(:params) do
8080
{
81-
serveradmin: 'admin@example.com',
81+
serveradmin: 'admin@example.com'
8282
}
8383
end
8484

@@ -168,7 +168,7 @@
168168
let :params do
169169
{ log_formats: {
170170
'vhost_common' => '%v %h %l %u %t "%r" %>s %b',
171-
'vhost_combined' => '%v %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"',
171+
'vhost_combined' => '%v %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"'
172172
} }
173173
end
174174

@@ -180,7 +180,7 @@
180180
let :params do
181181
{ log_formats: {
182182
'common' => '%v %h %l %u %t "%r" %>s %b',
183-
'combined' => '%v %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"',
183+
'combined' => '%v %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"'
184184
} }
185185
end
186186

@@ -260,7 +260,7 @@
260260
{
261261
vhost_dir: '/etc/httpd/site.d',
262262
confd_dir: '/etc/httpd/conf.d',
263-
mod_dir: '/etc/httpd/mod.d',
263+
mod_dir: '/etc/httpd/mod.d'
264264
}
265265
end
266266

@@ -311,7 +311,7 @@
311311
vhost_dir: '/etc/httpd/site.d',
312312
confd_dir: '/etc/httpd/conf.d',
313313
mod_dir: '/etc/httpd/mod.d',
314-
use_optional_includes: true,
314+
use_optional_includes: true
315315
}
316316
end
317317

@@ -323,7 +323,7 @@
323323
vhost_dir: '/etc/httpd/site.d',
324324
confd_dir: '/etc/httpd/conf.d',
325325
mod_dir: '/etc/httpd/mod.d',
326-
allow_encoded_slashes: 'nodecode',
326+
allow_encoded_slashes: 'nodecode'
327327
}
328328
end
329329

@@ -336,7 +336,7 @@
336336
vhost_dir: '/etc/httpd/site.d',
337337
confd_dir: '/etc/httpd/conf.d',
338338
mod_dir: '/etc/httpd/mod.d',
339-
default_charset: 'none',
339+
default_charset: 'none'
340340
}
341341
end
342342

@@ -608,7 +608,7 @@
608608
context 'with a custom apache_name parameter' do
609609
let :params do
610610
{
611-
apache_name: 'httpd24-httpd',
611+
apache_name: 'httpd24-httpd'
612612
}
613613
end
614614

@@ -622,7 +622,7 @@
622622
context 'with a custom file_mode parameter' do
623623
let :params do
624624
{
625-
file_mode: '0640',
625+
file_mode: '0640'
626626
}
627627
end
628628

@@ -635,7 +635,7 @@
635635
context 'with a custom root_directory_options parameter' do
636636
let :params do
637637
{
638-
root_directory_options: ['-Indexes', '-FollowSymLinks'],
638+
root_directory_options: ['-Indexes', '-FollowSymLinks']
639639
}
640640
end
641641

@@ -644,7 +644,7 @@
644644
context 'with a custom root_directory_secured parameter' do
645645
let :params do
646646
{
647-
root_directory_secured: true,
647+
root_directory_secured: true
648648
}
649649
end
650650

@@ -658,7 +658,7 @@
658658
context 'without default non-ssl vhost' do
659659
let :params do
660660
{
661-
default_vhost: false,
661+
default_vhost: false
662662
}
663663
end
664664

@@ -668,7 +668,7 @@
668668
context 'with default ssl vhost' do
669669
let :params do
670670
{
671-
default_ssl_vhost: true,
671+
default_ssl_vhost: true
672672
}
673673
end
674674

spec/classes/mod/alias_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
end
3131
let :params do
3232
{
33-
'icons_options' => 'foo',
33+
'icons_options' => 'foo'
3434
}
3535
end
3636

@@ -45,7 +45,7 @@
4545
end
4646
let :params do
4747
{
48-
'icons_prefix' => 'apache-icons',
48+
'icons_prefix' => 'apache-icons'
4949
}
5050
end
5151

@@ -60,7 +60,7 @@
6060
end
6161
let :params do
6262
{
63-
'icons_path' => false,
63+
'icons_path' => false
6464
}
6565
end
6666

spec/classes/mod/auth_cas_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
cas_login_url: 'https://cas.example.com/login',
1010
cas_validate_url: 'https://cas.example.com/validate',
11-
cas_cookie_path: '/var/cache/apache2/mod_auth_cas/',
11+
cas_cookie_path: '/var/cache/apache2/mod_auth_cas/'
1212
}
1313
end
1414

@@ -21,7 +21,7 @@
2121
cas_login_url: 'https://cas.example.com/login',
2222
cas_validate_url: 'https://cas.example.com/validate',
2323
cas_timeout: 1234,
24-
cas_idle_timeout: 4321,
24+
cas_idle_timeout: 4321
2525
}
2626
end
2727

spec/classes/mod/authn_dbd_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
context 'default params' do
77
let :params do
88
{
9-
authn_dbd_params: 'host=db_host port=3306 user=apache password=###### dbname=apache_auth',
9+
authn_dbd_params: 'host=db_host port=3306 user=apache password=###### dbname=apache_auth'
1010
}
1111
end
1212

@@ -18,7 +18,7 @@
1818
{
1919
authn_dbd_params: 'host=db_host port=3306 user=apache password=###### dbname=apache_auth',
2020
authn_dbd_alias: 'db_authn',
21-
authn_dbd_query: 'SELECT password FROM authn WHERE username = %s',
21+
authn_dbd_query: 'SELECT password FROM authn WHERE username = %s'
2222
}
2323
end
2424

spec/classes/mod/cluster_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
allowed_network: '172.17.0',
1212
balancer_name: 'mycluster',
1313
ip: '172.17.0.1',
14-
version: '1.3.0',
14+
version: '1.3.0'
1515
}
1616
end
1717

@@ -34,7 +34,7 @@
3434
allowed_network: '172.17.0',
3535
balancer_name: 'mycluster',
3636
ip: '172.17.0.1',
37-
version: '1.3.1',
37+
version: '1.3.1'
3838
}
3939
end
4040

spec/classes/mod/dav_svn_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
describe 'with parameters' do
1717
let :params do
1818
{
19-
'authz_svn_enabled' => true,
19+
'authz_svn_enabled' => true
2020
}
2121
end
2222

@@ -37,7 +37,7 @@
3737
describe 'with parameters' do
3838
let :params do
3939
{
40-
'authz_svn_enabled' => true,
40+
'authz_svn_enabled' => true
4141
}
4242
end
4343

@@ -59,7 +59,7 @@
5959
describe 'with parameters' do
6060
let :params do
6161
{
62-
'authz_svn_enabled' => true,
62+
'authz_svn_enabled' => true
6363
}
6464
end
6565

@@ -81,7 +81,7 @@
8181
describe 'with parameters' do
8282
let :params do
8383
{
84-
'authz_svn_enabled' => true,
84+
'authz_svn_enabled' => true
8585
}
8686
end
8787

spec/classes/mod/disk_cache_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
let(:params) do
1010
{
11-
cache_ignore_headers: 'Set-Cookie',
11+
cache_ignore_headers: 'Set-Cookie'
1212
}
1313
end
1414

@@ -63,7 +63,7 @@
6363

6464
let(:params) do
6565
{
66-
cache_ignore_headers: 'Set-Cookie',
66+
cache_ignore_headers: 'Set-Cookie'
6767
}
6868
end
6969

@@ -115,7 +115,7 @@
115115

116116
let(:params) do
117117
{
118-
cache_ignore_headers: 'Set-Cookie',
118+
cache_ignore_headers: 'Set-Cookie'
119119
}
120120
end
121121

spec/classes/mod/dumpio_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
context 'with dumpio_input set to On' do
2424
let :params do
2525
{
26-
dump_io_input: 'On',
26+
dump_io_input: 'On'
2727
}
2828
end
2929

@@ -33,7 +33,7 @@
3333
context 'with dumpio_ouput set to On' do
3434
let :params do
3535
{
36-
dump_io_output: 'On',
36+
dump_io_output: 'On'
3737
}
3838
end
3939

spec/classes/mod/event_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
threadlimit: 7,
4141
listenbacklog: 8,
4242
maxrequestworkers: 9,
43-
maxconnectionsperchild: 10,
43+
maxconnectionsperchild: 10
4444
}
4545
end
4646

@@ -66,7 +66,7 @@
6666
threadlimit: 7,
6767
listenbacklog: 8,
6868
maxrequestworkers: :undef,
69-
maxconnectionsperchild: :undef,
69+
maxconnectionsperchild: :undef
7070
}
7171
end
7272

@@ -92,7 +92,7 @@
9292
threadlimit: false,
9393
listenbacklog: false,
9494
maxrequestworkers: false,
95-
maxconnectionsperchild: false,
95+
maxconnectionsperchild: false
9696
}
9797
end
9898

spec/classes/mod/expires_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
end
1818
let :params do
1919
{
20-
'expires_default' => 'access plus 1 month',
20+
'expires_default' => 'access plus 1 month'
2121
}
2222
end
2323

@@ -40,7 +40,7 @@
4040
'expires_by_type' => [
4141
{ 'text/json' => 'mod plus 1 day' },
4242
{ 'text/html' => 'access plus 1 year' },
43-
],
43+
]
4444
}
4545
end
4646

spec/classes/mod/http2_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
h2_tls_cool_down_secs: 0,
4949
h2_tls_warm_up_size: 0,
5050
h2_upgrade: false,
51-
h2_window_size: 128_000,
51+
h2_window_size: 128_000
5252
}
5353
end
5454

spec/classes/mod/info_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def general_info_specs_apache24
1515
context 'passing restrict_access => false' do
1616
let :params do
1717
{
18-
restrict_access: false,
18+
restrict_access: false
1919
}
2020
end
2121

@@ -44,7 +44,7 @@ def general_info_specs_apache24
4444
let :params do
4545
{
4646
restrict_access: false,
47-
allow_from: ['10.10.1.2', '192.168.1.2', '127.0.0.1'],
47+
allow_from: ['10.10.1.2', '192.168.1.2', '127.0.0.1']
4848
}
4949
end
5050

spec/classes/mod/itk_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
let :params do
6262
{
63-
enablecapabilities: false,
63+
enablecapabilities: false
6464
}
6565
end
6666

@@ -83,7 +83,7 @@
8383
context 'with enablecapabilities set' do
8484
let :params do
8585
{
86-
enablecapabilities: true,
86+
enablecapabilities: true
8787
}
8888
end
8989

0 commit comments

Comments
 (0)