summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-06-08 12:09:39 -0300
committermh <mh@immerda.ch>2012-06-08 12:09:39 -0300
commit9cbf2fafee3f4623b75d1a6b70458ab097e64924 (patch)
tree82a619d81198ddd49cb5df5f1116281904e08023 /templates
parentedc2afe65136d49501b6aaeb805269b3f7bb141f (diff)
fix dynamic scope variables, function access
Diffstat (limited to 'templates')
-rw-r--r--templates/vhosts/default.erb10
-rw-r--r--templates/vhosts/gitweb/partial.erb2
-rw-r--r--templates/vhosts/itk_plus.erb6
-rw-r--r--templates/vhosts/itk_plus/partial.erb2
-rw-r--r--templates/vhosts/partials/header_default.erb12
-rw-r--r--templates/vhosts/passenger/partial.erb2
-rw-r--r--templates/vhosts/perl/partial.erb6
-rw-r--r--templates/vhosts/php/partial.erb8
-rw-r--r--templates/vhosts/php_drupal/partial.erb6
-rw-r--r--templates/vhosts/php_gallery2/partial.erb8
-rw-r--r--templates/vhosts/php_joomla/partial.erb8
-rw-r--r--templates/vhosts/php_mediawiki/partial.erb4
-rw-r--r--templates/vhosts/php_silverstripe/partial.erb8
-rw-r--r--templates/vhosts/php_typo3/partial.erb4
-rw-r--r--templates/vhosts/proxy/partial.erb4
-rw-r--r--templates/vhosts/redirect/partial.erb2
-rw-r--r--templates/vhosts/static/partial.erb6
-rw-r--r--templates/vhosts/webdav/partial.erb2
18 files changed, 50 insertions, 50 deletions
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb
index 9342d06..62edf69 100644
--- a/templates/vhosts/default.erb
+++ b/templates/vhosts/default.erb
@@ -10,9 +10,9 @@ vhost_parts.each do |vhost_part|
-%>
<VirtualHost *:<%= vhost_part == :ssl ? '443' : '80' %> >
-<%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/header_default.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/logs.erb']) %>
<% if run_mode.to_s =~ /(proxy\-|static\-)?itk/ -%>
<IfModule mpm_itk_module>
@@ -33,13 +33,13 @@ vhost_parts.each do |vhost_part|
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L]
<% else -%>
-<%= scope.function_template(template_partial) %>
+<%= scope.function_template([template_partial]) %>
<% end -%>
<%- unless template_partial == 'apache/vhosts/itk_plus/partial.erb' -%>
-<%= scope.function_template('apache/vhosts/partials/mod_security.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/mod_security.erb']) %>
<% end -%>
<% unless additional_options.to_s == 'absent' -%>
<%= additional_options %>
<% end -%>
</VirtualHost>
-<% end -%> \ No newline at end of file
+<% end -%>
diff --git a/templates/vhosts/gitweb/partial.erb b/templates/vhosts/gitweb/partial.erb
index 8bfe6ce..7238ebe 100644
--- a/templates/vhosts/gitweb/partial.erb
+++ b/templates/vhosts/gitweb/partial.erb
@@ -14,6 +14,6 @@
RewriteEngine on
RewriteRule ^[a-zA-Z0-9_-]+.git/?(\?.)?$ /gitweb.cgi%{REQUESTURI} [L,PT]
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
</Directory>
<% end -%>
diff --git a/templates/vhosts/itk_plus.erb b/templates/vhosts/itk_plus.erb
index 2890ecf..b7cb180 100644
--- a/templates/vhosts/itk_plus.erb
+++ b/templates/vhosts/itk_plus.erb
@@ -1,10 +1,10 @@
<IfDefine HttpdLocal>
-<%= scope.function_template('apache/vhost/default.erb') %>
+<%= scope.function_template(['apache/vhost/default.erb']) %>
</IfDefine>
<IfDefine !HttpdLocal>
<%
scope.unsetvar('template_partial')
scope.setvar('template_partial','apache/vhosts/itk_plus/partial.erb')
-%>
-<%= scope.function_template('apache/vhost/default.erb') %>
-</IfDefine> \ No newline at end of file
+<%= scope.function_template(['apache/vhost/default.erb']) %>
+</IfDefine>
diff --git a/templates/vhosts/itk_plus/partial.erb b/templates/vhosts/itk_plus/partial.erb
index e37e418..5b05dd8 100644
--- a/templates/vhosts/itk_plus/partial.erb
+++ b/templates/vhosts/itk_plus/partial.erb
@@ -25,7 +25,7 @@
Options <% unless options.to_s == 'absent' then -%><%= options %><% end -%><% if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<% end -%>
<% end -%>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
</Directory>
<% end -%>
diff --git a/templates/vhosts/partials/header_default.erb b/templates/vhosts/partials/header_default.erb
index a9a87bc..d6d8c86 100644
--- a/templates/vhosts/partials/header_default.erb
+++ b/templates/vhosts/partials/header_default.erb
@@ -3,18 +3,18 @@
Include include.d/ssl_defaults.inc
<% end -%>
ServerName <%= servername %>
-<% unless serveralias.to_s.empty? || (serveralias.to_s == 'absent') -%>
+<% unless serveralias.empty? || (serveralias == 'absent') -%>
ServerAlias <%= serveralias %>
<% end -%>
-<% unless server_admin.to_s.empty? || (server_admin.to_s == 'absent') -%>
+<% unless server_admin.empty? || (server_admin == 'absent') -%>
ServerAdmin <%= server_admin %>
<% end -%>
-<% unless documentroot.to_s == 'really_absent' -%>
+<% unless documentroot == 'really_absent' -%>
DocumentRoot <%= documentroot %>/
<% end -%>
-<% if default_charset.to_s != 'absent' then -%>
+<% if default_charset != 'absent' then -%>
AddDefaultCharset <%= default_charset %>
<% end -%>
-<% if has_variable?('passing_extension') && !passing_extension.to_s.empty? -%>
+<% if passing_extension != 'absent' -%>
DirectoryIndex index.htm index.html index.<%= passing_extension %>
-<% end -%> \ No newline at end of file
+<% end -%>
diff --git a/templates/vhosts/passenger/partial.erb b/templates/vhosts/passenger/partial.erb
index abbec79..490649e 100644
--- a/templates/vhosts/passenger/partial.erb
+++ b/templates/vhosts/passenger/partial.erb
@@ -3,5 +3,5 @@
AllowOverride <%= allow_override %>
Options <%- unless options.to_s == 'absent' -%><%= options %><%- end -%><%- unless !options.to_s.include?('MultiViews') -%>-MultiViews<%- end -%>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
</Directory>
diff --git a/templates/vhosts/perl/partial.erb b/templates/vhosts/perl/partial.erb
index f75bf3f..a8c30c3 100644
--- a/templates/vhosts/perl/partial.erb
+++ b/templates/vhosts/perl/partial.erb
@@ -1,7 +1,7 @@
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
</Directory>
<% unless htpasswd_file.to_s == 'absent' -%>
@@ -12,4 +12,4 @@
require valid-user
</Directory>
<% end -%>
- ScriptAlias /cgi-bin/ <%= cgi_binpath %>/ \ No newline at end of file
+ ScriptAlias /cgi-bin/ <%= cgi_binpath %>/
diff --git a/templates/vhosts/php/partial.erb b/templates/vhosts/php/partial.erb
index dae201a..f8e5c53 100644
--- a/templates/vhosts/php/partial.erb
+++ b/templates/vhosts/php/partial.erb
@@ -1,7 +1,7 @@
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/php_settings.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
- </Directory> \ No newline at end of file
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
+ </Directory>
diff --git a/templates/vhosts/php_drupal/partial.erb b/templates/vhosts/php_drupal/partial.erb
index 07e0d94..3c420b1 100644
--- a/templates/vhosts/php_drupal/partial.erb
+++ b/templates/vhosts/php_drupal/partial.erb
@@ -1,10 +1,10 @@
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/php_settings.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
diff --git a/templates/vhosts/php_gallery2/partial.erb b/templates/vhosts/php_gallery2/partial.erb
index 05cc9f4..448f720 100644
--- a/templates/vhosts/php_gallery2/partial.erb
+++ b/templates/vhosts/php_gallery2/partial.erb
@@ -1,9 +1,9 @@
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/php_settings.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
<% if vhost_part != :ssl -%>
# Always rewrite login's
@@ -13,4 +13,4 @@
RewriteCond %{QUERY_STRING} subView=core\.UserLogin
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
<% end -%>
- </Directory> \ No newline at end of file
+ </Directory>
diff --git a/templates/vhosts/php_joomla/partial.erb b/templates/vhosts/php_joomla/partial.erb
index fa095ff..526352a 100644
--- a/templates/vhosts/php_joomla/partial.erb
+++ b/templates/vhosts/php_joomla/partial.erb
@@ -1,9 +1,9 @@
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/php_settings.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
Include include.d/joomla.inc
</Directory>
@@ -16,4 +16,4 @@
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} (.*/administrator/.*)
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
- </Directory> \ No newline at end of file
+ </Directory>
diff --git a/templates/vhosts/php_mediawiki/partial.erb b/templates/vhosts/php_mediawiki/partial.erb
index 38f9663..cf30f5f 100644
--- a/templates/vhosts/php_mediawiki/partial.erb
+++ b/templates/vhosts/php_mediawiki/partial.erb
@@ -4,7 +4,7 @@
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
RewriteRule ^/?index.php/(.*)$ /index.php?title=$1 [PT,L,QSA]
<% end -%>
-<%= scope.function_template('apache/vhosts/php/partial.erb') %>
+<%= scope.function_template(['apache/vhosts/php/partial.erb']) %>
<Directory "<%= documentroot %>/typo3/">
RewriteEngine on
@@ -13,4 +13,4 @@
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} (.*/typo3/.*)
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
- </Directory> \ No newline at end of file
+ </Directory>
diff --git a/templates/vhosts/php_silverstripe/partial.erb b/templates/vhosts/php_silverstripe/partial.erb
index a398829..89a6052 100644
--- a/templates/vhosts/php_silverstripe/partial.erb
+++ b/templates/vhosts/php_silverstripe/partial.erb
@@ -6,11 +6,11 @@
<% end -%>
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/php_settings.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
Include include.d/silverstripe.inc
- </Directory> \ No newline at end of file
+ </Directory>
diff --git a/templates/vhosts/php_typo3/partial.erb b/templates/vhosts/php_typo3/partial.erb
index 776fff2..5c06570 100644
--- a/templates/vhosts/php_typo3/partial.erb
+++ b/templates/vhosts/php_typo3/partial.erb
@@ -1,4 +1,4 @@
-<%= scope.function_template('apache/vhosts/php/partial.erb') %>
+<%= scope.function_template(['apache/vhosts/php/partial.erb']) %>
<Directory "<%= documentroot %>/typo3/">
RewriteEngine on
@@ -7,4 +7,4 @@
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} (.*/typo3/.*)
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
- </Directory> \ No newline at end of file
+ </Directory>
diff --git a/templates/vhosts/proxy/partial.erb b/templates/vhosts/proxy/partial.erb
index f0d4c9d..bbf3c64 100644
--- a/templates/vhosts/proxy/partial.erb
+++ b/templates/vhosts/proxy/partial.erb
@@ -1,8 +1,8 @@
<Proxy *>
Order deny,allow
Allow from all
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
</Proxy>
ProxyRequests Off
ProxyPass / <%= options %>/
- ProxyPassReverse / <%= options %>/ \ No newline at end of file
+ ProxyPassReverse / <%= options %>/
diff --git a/templates/vhosts/redirect/partial.erb b/templates/vhosts/redirect/partial.erb
index bd012c8..3b7af7a 100644
--- a/templates/vhosts/redirect/partial.erb
+++ b/templates/vhosts/redirect/partial.erb
@@ -1 +1 @@
- Redirect permanent / https://<%= options %> \ No newline at end of file
+ Redirect permanent / https://<%= options %>
diff --git a/templates/vhosts/static/partial.erb b/templates/vhosts/static/partial.erb
index 78dc925..f2cc46b 100644
--- a/templates/vhosts/static/partial.erb
+++ b/templates/vhosts/static/partial.erb
@@ -1,5 +1,5 @@
<Directory "<%= documentroot %>/">
-<%= scope.function_template('apache/vhosts/partials/std_override_options.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
- </Directory> \ No newline at end of file
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
+ </Directory>
diff --git a/templates/vhosts/webdav/partial.erb b/templates/vhosts/webdav/partial.erb
index 2f78d7b..d89da50 100644
--- a/templates/vhosts/webdav/partial.erb
+++ b/templates/vhosts/webdav/partial.erb
@@ -9,7 +9,7 @@
Options Indexes
<%- end -%>
-<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
+<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
<%- if ldap_auth.to_s == 'true' then -%>
Include include.d/ldap_auth.inc
<%- unless ldap_user.to_s == 'any' -%>