File tree 7 files changed +11
-33
lines changed
7 files changed +11
-33
lines changed Original file line number Diff line number Diff line change 1
- <% if type( $requires, 'generalized') == String { -%>
1
+ <% if $requires =~ String { -%>
2
2
<%- if !($requires.downcase in ['', 'unmanaged']) { -%>
3
3
Require <%= $requires %>
4
4
<%- } -%>
5
- <% }elsif String(type( $requires, 'generalized')).index('Array') == 0 { -%>
5
+ <% } elsif $requires =~ Array { -%>
6
6
<%- $requires.each |$req| { -%>
7
7
Require <%= $req %>
8
8
<%- } -%>
9
- <% }elsif String(type( $requires, 'generalized')).index('Hash') == 0 { -%>
9
+ <% } elsif $requires =~ Hash { -%>
10
10
<%- if $requires['enforce'] and $requires['enforce'].downcase in ['all', 'none', 'any'] { -%>
11
11
<%- $enforce_str = "Require${requires['enforce'].capitalize}>\n" -%>
12
12
<%- $enforce_open = " <${enforce_str}" -%>
20
20
<%- $enforce_close = '' -%>
21
21
<%- $indentation = '' -%>
22
22
<%- } -%>
23
- <%- if $requires['requires'] and String(type( $requires['requires'], 'generalized')).index('Array') == 0 { -%>
23
+ <%- if $requires['requires'] and $requires['requires'] =~ Array { -%>
24
24
<%# %><%= $enforce_open -%>
25
25
<%- $requires['requires'].each |$req| { -%>
26
26
<%# %> <%= $indentation -%>Require <%= $req %>
Original file line number Diff line number Diff line change 1
1
GeoIPEnable <%= apache::bool2httpd($enable) %>
2
2
3
3
<%- if $db_file and !($db_file in [ false, 'false', '' ]) { -%>
4
- <%- if String(type($db_file, 'generalized')).index('Array') == 0 { -%>
5
- <%- Array($db_file).each |$file| { -%>
4
+ <%- [$db_file].flatten.each |$file| { -%>
6
5
GeoIPDBFile <%= $file %> <%= $flag %>
7
- <%- } -%>
8
- <%- } else { -%>
9
- GeoIPDBFile <%= $db_file %> <%= $flag %>
10
6
<%- } -%>
11
7
<%- } -%>
12
8
GeoIPOutput <%= $output %>
Original file line number Diff line number Diff line change 1
- <% if String(type($language_priority, 'generalized')).index('Array') == 0 { -%>
2
- <%- $language_priority_updated = $language_priority.join(' ') -%>
3
- <% } else { -%>
4
- <%- $language_priority_updated = $language_priority -%>
5
- <% } -%>
6
- <% if String(type($force_language_priority, 'generalized')).index('Array') == 0 { -%>
7
- <%- $force_language_priority_updated = $force_language_priority.join(' ') -%>
8
- <% } else { -%>
9
- <%- $force_language_priority_updated = $force_language_priority -%>
10
- <% } -%>
11
- LanguagePriority <%= $language_priority_updated %>
12
- ForceLanguagePriority <%= $force_language_priority_updated %>
1
+ LanguagePriority <%= [$language_priority].flatten.join(' ') %>
2
+ ForceLanguagePriority <%= [$force_language_priority].flatten.join(' ') %>
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ ModPagespeedMessageBufferSize <%= $message_buffer_size %>
78
78
SetHandler mod_pagespeed_message
79
79
</Location>
80
80
81
- <% if String(type( $additional_configuration, 'generalized')).index('Array') == 0 { -%>
81
+ <% if $additional_configuration =~ Array { -%>
82
82
<%= $additional_configuration.join("\n") %>
83
83
<% } else { -%>
84
84
<% $additional_configuration.each |$key, $value| { -%>
Original file line number Diff line number Diff line change 10
10
11
11
<% if $proxy_requests != 'Off' or ( $allow_from and ! $allow_from.empty ) { -%>
12
12
<Proxy *>
13
- <%- if String(type($allow_from, 'generalized')).index('Array') == 0 { -%>
14
- Require ip <%= $allow_from.join(" ") %>
15
- <%- } else { -%>
16
- Require ip <%= $allow_from %>
17
- <%- } -%>
13
+ Require ip <%= [$allow_from].flatten.join(' ') %>
18
14
</Proxy>
19
15
<% } -%>
20
16
Original file line number Diff line number Diff line change 1
- <% if type($timeouts, 'generalized') == String { -%>
2
- RequestReadTimeout <%= $timeouts -%>
3
- <% } else { -%>
4
- <%- $timeouts.each |$timeout| { -%>
1
+ <%- [$timeouts].flatten.each |$timeout| { -%>
5
2
RequestReadTimeout <%= $timeout %>
6
- <%- } -%>
7
3
<% } -%>
8
4
Original file line number Diff line number Diff line change 33
33
SSLStaplingReturnResponderErrors <%= apache::bool2httpd($ssl_stapling_return_errors) %>
34
34
<%- } -%>
35
35
SSLStaplingCache "shmcb:<%= $_stapling_cache %>"
36
- <%- if String(type( $ssl_cipher, 'generalized')).index('Hash') == 0 { -%>
36
+ <%- if $ssl_cipher =~ Hash { -%>
37
37
<%- $ssl_cipher.map |$protocol, $cipher| { -%>
38
38
SSLCipherSuite <%= $protocol %> <%= $cipher %>
39
39
<%- } -%>
You can’t perform that action at this time.
0 commit comments