Skip to content

Commit

Permalink
Remove double spacing
Browse files Browse the repository at this point in the history
This double spacing doesn't align to anything so it doesn't make sense.
  • Loading branch information
ekohl committed Oct 1, 2018
1 parent f3abffb commit cae9308
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -433,22 +433,22 @@
title: 'should set error_log',
attr: 'nginx_error_log',
value: '/path/to/error.log',
match: ' error_log /path/to/error.log error;'
match: ' error_log /path/to/error.log error;'
},
{
title: 'should set multiple error_logs',
attr: 'nginx_error_log',
value: ['/path/to/error.log', 'syslog:server=localhost'],
match: [
' error_log /path/to/error.log error;',
' error_log syslog:server=localhost error;'
' error_log /path/to/error.log error;',
' error_log syslog:server=localhost error;'
]
},
{
title: 'should set error_log severity level',
attr: 'nginx_error_log_severity',
value: 'warn',
match: ' error_log /var/log/nginx/error.log warn;'
match: ' error_log /var/log/nginx/error.log warn;'
},
{
title: 'should set pid',
Expand Down Expand Up @@ -544,22 +544,22 @@
title: 'should set access_log',
attr: 'http_access_log',
value: '/path/to/access.log',
match: ' access_log /path/to/access.log;'
match: ' access_log /path/to/access.log;'
},
{
title: 'should set multiple access_logs',
attr: 'http_access_log',
value: ['/path/to/access.log', 'syslog:server=localhost'],
match: [
' access_log /path/to/access.log;',
' access_log syslog:server=localhost;'
' access_log /path/to/access.log;',
' access_log syslog:server=localhost;'
]
},
{
title: 'should set custom log format',
attr: 'http_format_log',
value: 'mycustomformat',
match: ' access_log /var/log/nginx/access.log mycustomformat;'
match: ' access_log /var/log/nginx/access.log mycustomformat;'
},
{
title: 'should set sendfile',
Expand Down Expand Up @@ -1183,12 +1183,12 @@
it { is_expected.to contain_file('/foo/bar').with(ensure: 'directory') }
it do
is_expected.to contain_file('/etc/nginx/nginx.conf').with_content(
%r{access_log /foo/bar/access.log;}
%r{access_log /foo/bar/access.log;}
)
end
it do
is_expected.to contain_file('/etc/nginx/nginx.conf').with_content(
%r{error_log /foo/bar/error.log error;}
%r{error_log /foo/bar/error.log error;}
)
end
end
Expand Down
10 changes: 5 additions & 5 deletions templates/conf.d/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ http {
<% end -%>
<% if @http_access_log.is_a?(Array) -%>
<%- @http_access_log.each do |log_item| -%>
access_log <%= log_item %><% if @http_format_log %> <%= @http_format_log%><% end %>;
access_log <%= log_item %><% if @http_format_log %> <%= @http_format_log%><% end %>;
<%- end -%>
<% else -%>
access_log <%= @http_access_log %><% if @http_format_log %> <%= @http_format_log%><% end %>;
access_log <%= @http_access_log %><% if @http_format_log %> <%= @http_format_log%><% end %>;
<% end -%>
<% if @nginx_error_log.is_a?(Array) -%>
<%- @nginx_error_log.each do |log_item| -%>
error_log <%= log_item %> <%= @nginx_error_log_severity %>;
error_log <%= log_item %> <%= @nginx_error_log_severity %>;
<%- end -%>
<% else -%>
error_log <%= @nginx_error_log %> <%= @nginx_error_log_severity %>;
error_log <%= @nginx_error_log %> <%= @nginx_error_log_severity %>;
<% end -%>

<% if @sendfile == 'on' -%>
sendfile on;
sendfile on;
<%- if @http_tcp_nopush == 'on' -%>
tcp_nopush on;
<%- end -%>
Expand Down

0 comments on commit cae9308

Please sign in to comment.