Skip to content

Commit b4e15c8

Browse files
committed
Cookstyle auto-corrections
This change is automatically generated by the GitHub Cookstyle Runner.
1 parent e5c51c4 commit b4e15c8

File tree

4 files changed

+55
-59
lines changed

4 files changed

+55
-59
lines changed

libraries/helpers.rb

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ def default_modules
244244

245245
case node['platform_family']
246246
when 'rhel', 'fedora', 'amazon'
247-
default_modules.concat %w(log_config logio unixd systemd)
247+
default_modules.push('log_config', 'logio', 'unixd', 'systemd')
248248
when 'arch', 'freebsd'
249-
default_modules.concat %w(log_config logio unixd)
249+
default_modules.push('log_config', 'logio', 'unixd')
250250
when 'suse'
251-
default_modules.concat %w(log_config logio)
251+
default_modules.push('log_config', 'logio')
252252
else
253253
default_modules
254254
end
@@ -337,41 +337,37 @@ def default_session_cache
337337
end
338338

339339
def config_file?(mod_name)
340-
if %w(ldap
341-
actions
342-
alias
343-
auth_cas
344-
autoindex
345-
cache_disk
346-
cgid
347-
dav_fs
348-
deflate
349-
dir
350-
fastcgi
351-
fcgid
352-
include
353-
info
354-
ldap
355-
mime_magic
356-
mime
357-
negotiation
358-
pagespeed
359-
proxy_balancer
360-
proxy_ftp
361-
proxy
362-
reqtimeout
363-
setenvif
364-
ssl
365-
status
366-
userdir
367-
mpm_event
368-
mpm_prefork
369-
mpm_worker
370-
).include?(mod_name)
371-
true
372-
else
373-
false
374-
end
340+
%w(ldap
341+
actions
342+
alias
343+
auth_cas
344+
autoindex
345+
cache_disk
346+
cgid
347+
dav_fs
348+
deflate
349+
dir
350+
fastcgi
351+
fcgid
352+
include
353+
info
354+
ldap
355+
mime_magic
356+
mime
357+
negotiation
358+
pagespeed
359+
proxy_balancer
360+
proxy_ftp
361+
proxy
362+
reqtimeout
363+
setenvif
364+
ssl
365+
status
366+
userdir
367+
mpm_event
368+
mpm_prefork
369+
mpm_worker
370+
).include?(mod_name) || false
375371
end
376372

377373
def pagespeed_url

resources/config.rb

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

4444
property :docroot_dir, String,
4545
default: lazy { default_docroot_dir },
46-
description: 'Apache document root.'\
46+
description: 'Apache document root.' \
4747
'Defaults to platform specific locations, see libraries/helpers.rb'
4848

4949
property :timeout, [Integer, String],
@@ -57,7 +57,7 @@
5757

5858
property :run_dir, String,
5959
default: lazy { default_run_dir },
60-
description: ' Sets the DefaultRuntimeDir directive.'\
60+
description: ' Sets the DefaultRuntimeDir directive.' \
6161
'Defaults to platform specific locations, see libraries/helpers.rb'
6262

6363
property :template_cookbook, String,

resources/default_site.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
property :docroot_dir, String,
3434
default: lazy { default_docroot_dir },
35-
description: 'Apache document root.'\
35+
description: 'Apache document root.' \
3636
'Defaults to platform specific locations, see libraries/helpers.rb'
3737

3838
property :apache_root_group, String,
3939
default: lazy { node['root_group'] },
40-
description: 'Group that the root user on the box runs as.'\
40+
description: 'Group that the root user on the box runs as.' \
4141
'Defaults to platform specific locations, see libraries/helpers.rb'
4242

4343
property :template_source, String,
@@ -57,16 +57,16 @@
5757
mode '0644'
5858
cookbook new_resource.template_cookbook
5959
variables new_resource.variables.merge({
60-
access_log: default_access_log,
61-
cgibin_dir: default_cgibin_dir,
62-
docroot_dir: new_resource.docroot_dir,
63-
error_log: default_error_log,
64-
log_dir: default_log_dir,
65-
log_level: new_resource.log_level,
66-
port: new_resource.port,
67-
server_admin: new_resource.server_admin,
68-
site_name: new_resource.default_site_name,
69-
})
60+
access_log: default_access_log,
61+
cgibin_dir: default_cgibin_dir,
62+
docroot_dir: new_resource.docroot_dir,
63+
error_log: default_error_log,
64+
log_dir: default_log_dir,
65+
log_level: new_resource.log_level,
66+
port: new_resource.port,
67+
server_admin: new_resource.server_admin,
68+
site_name: new_resource.default_site_name,
69+
})
7070
end
7171

7272
apache2_site new_resource.default_site_name do

resources/install.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717

1818
property :apache_user, String,
1919
default: lazy { default_apache_user },
20-
description: 'Set to override the default apache2 user.'\
20+
description: 'Set to override the default apache2 user.' \
2121
'Defaults to platform specific locations, see libraries/helpers.rb'
2222

2323
property :apache_group, String,
2424
default: lazy { default_apache_group },
25-
description: 'Set to override the default apache2 user.'\
25+
description: 'Set to override the default apache2 user.' \
2626
'Defaults to platform specific locations, see libraries/helpers.rb'
2727

2828
property :log_dir, String,
2929
default: lazy { default_log_dir },
30-
description: 'Log directory location.'\
30+
description: 'Log directory location.' \
3131
'Defaults to platform specific locations, see libraries/helpers.rb'
3232

3333
property :error_log, String,
3434
default: lazy { default_error_log },
35-
description: 'Error log location.'\
35+
description: 'Error log location.' \
3636
'Defaults to platform specific locations, see libraries/helpers.rb'
3737

3838
property :log_level, String,
@@ -76,7 +76,7 @@
7676

7777
property :mpm, String,
7878
default: lazy { default_mpm },
79-
description: 'Multi-processing Module.'\
79+
description: 'Multi-processing Module.' \
8080
'Defaults to platform specific locations, see libraries/helpers.rb'
8181

8282
property :mpm_conf, Hash,
@@ -111,12 +111,12 @@
111111

112112
property :docroot_dir, String,
113113
default: lazy { default_docroot_dir },
114-
description: 'Apache document root.'\
114+
description: 'Apache document root.' \
115115
'Defaults to platform specific locations, see libraries/helpers.rb'
116116

117117
property :run_dir, String,
118118
default: lazy { default_run_dir },
119-
description: 'Location for APACHE_RUN_DIR.'\
119+
description: 'Location for APACHE_RUN_DIR.' \
120120
'Defaults to platform specific locations, see libraries/helpers.rb'
121121

122122
property :access_file_name, String,

0 commit comments

Comments
 (0)