[Rt-commit] rt branch, 4.2/static-handler, updated. rt-4.1.5-98-g9a656a3
Alex Vandiver
alexmv at bestpractical.com
Mon Dec 24 15:09:09 EST 2012
The branch, 4.2/static-handler has been updated
via 9a656a3ca12930f596f552f20487566493d7fbab (commit)
via 2c845c10e61056a81610fc361a35ac9fa7b9a055 (commit)
from 749529a7bea5568eb5476a66ac334011e739735c (commit)
Summary of changes:
devel/tools/mime.types | 2 ++
devel/tools/rt-apache | 5 ++++-
docs/web_deployment.pod | 3 +++
lib/RT.pm | 4 ++--
lib/RT/Test/Apache.pm | 1 +
t/data/configs/apache2.2+fastcgi.conf.in | 2 +-
t/data/configs/apache2.2+mod_perl.conf.in | 5 +++++
7 files changed, 18 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 2c845c10e61056a81610fc361a35ac9fa7b9a055
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Dec 24 13:57:58 2012 -0500
Add StaticPath and LocalStaticPath to the set which is made absolute
diff --git a/lib/RT.pm b/lib/RT.pm
index 0db0bee..d2a70c1 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -728,9 +728,9 @@ sub CanonicalizeGeneratedPaths {
$BasePath = Cwd::realpath($BasePath);
for my $path (
- qw/EtcPath BinPath SbinPath VarPath LocalPath LocalEtcPath
+ qw/EtcPath BinPath SbinPath VarPath LocalPath StaticPath LocalEtcPath
LocalLibPath LexiconPath LocalLexiconPath PluginPath
- LocalPluginPath MasonComponentRoot MasonLocalComponentRoot
+ LocalPluginPath LocalStaticPath MasonComponentRoot MasonLocalComponentRoot
MasonDataDir MasonSessionDir/
)
{
commit 9a656a3ca12930f596f552f20487566493d7fbab
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Dec 24 13:58:35 2012 -0500
Update deployment and testing
diff --git a/devel/tools/mime.types b/devel/tools/mime.types
index 83ef24d..5c78a78 100644
--- a/devel/tools/mime.types
+++ b/devel/tools/mime.types
@@ -2,3 +2,5 @@
# statically (those that Apache might care about).
image/gif gif
image/png png
+text/css css
+application/x-javascript js
diff --git a/devel/tools/rt-apache b/devel/tools/rt-apache
index 64f13f6..92a95de 100755
--- a/devel/tools/rt-apache
+++ b/devel/tools/rt-apache
@@ -330,7 +330,7 @@ DocumentRoot $RTHOME/share/html
Allow from all
</Directory>
-Alias $PATH/static/ /opt/rt4/share/static/
+Alias $PATH/static/ $RTHOME/share/static/
<Directory $RTHOME/share/static>
Order allow,deny
Allow from all
@@ -347,6 +347,9 @@ Alias $PATH/static/ /opt/rt4/share/static/
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app $RTHOME/sbin/rt-server
</Location>
+ <Location $PATH/static/>
+ SetHandler default
+ </Location>
<Perl>
use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload("$RTHOME/sbin/rt-server");
diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod
index d1baaad..cb43507 100644
--- a/docs/web_deployment.pod
+++ b/docs/web_deployment.pod
@@ -131,6 +131,9 @@ one the server is configured for.
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server
</Location>
+ <Location /static/>
+ SetHandler default
+ </Location>
<Perl>
use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
diff --git a/lib/RT/Test/Apache.pm b/lib/RT/Test/Apache.pm
index cf9865f..84b02d8 100644
--- a/lib/RT/Test/Apache.pm
+++ b/lib/RT/Test/Apache.pm
@@ -120,6 +120,7 @@ sub start_server {
server_root => $info{'HTTPD_ROOT'} || $ENV{'HTTPD_ROOT'}
|| Test::More::BAIL_OUT("Couldn't figure out server root"),
document_root => $RT::MasonComponentRoot,
+ static_root => $RT::StaticPath,
tmp_dir => "$tmp{'directory'}",
rt_bin_path => $RT::BinPath,
rt_sbin_path => $RT::SbinPath,
diff --git a/t/data/configs/apache2.2+fastcgi.conf.in b/t/data/configs/apache2.2+fastcgi.conf.in
index 31f1dd7..b55e416 100644
--- a/t/data/configs/apache2.2+fastcgi.conf.in
+++ b/t/data/configs/apache2.2+fastcgi.conf.in
@@ -34,7 +34,7 @@ FastCgiServer %%RT_SBIN_PATH%%/rt-server.fcgi \
-initial-env RT_SITE_CONFIG=%%RT_SITE_CONFIG%% \
-initial-env RT_TESTING=1
-Alias /static/images/ %%DOCUMENT_ROOT%%/static/images/
+Alias /static/ %%STATIC_ROOT%%/
ScriptAlias / %%RT_SBIN_PATH%%/rt-server.fcgi/
DocumentRoot "%%DOCUMENT_ROOT%%"
diff --git a/t/data/configs/apache2.2+mod_perl.conf.in b/t/data/configs/apache2.2+mod_perl.conf.in
index 20d2f44..a2dba74 100644
--- a/t/data/configs/apache2.2+mod_perl.conf.in
+++ b/t/data/configs/apache2.2+mod_perl.conf.in
@@ -46,6 +46,8 @@ LogLevel debug
AddDefaultCharset UTF-8
PerlSetEnv RT_SITE_CONFIG %%RT_SITE_CONFIG%%
+Alias /static/ %%STATIC_ROOT%%/
+
DocumentRoot "%%DOCUMENT_ROOT%%"
<Location />
Order allow,deny
@@ -58,6 +60,9 @@ DocumentRoot "%%DOCUMENT_ROOT%%"
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app %%RT_SBIN_PATH%%/rt-server
</Location>
+<Location /static/>
+ SetHandler default
+</Location>
<Perl>
$ENV{RT_TESTING}=1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list