[Rt-commit] rt branch, 4.0/external-jsmin, created. rt-4.0.1rc1-12-gd80b1e4
Alex Vandiver
alexmv at bestpractical.com
Thu Jun 2 12:54:09 EDT 2011
The branch, 4.0/external-jsmin has been created
at d80b1e408629b1fb509d4147f3904003a67c1440 (commit)
- Log -----------------------------------------------------------------
commit d83855a292de88da85bec017b91f9572eff897c3
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jun 1 12:42:14 2011 -0400
Add tests for a dummy external jsmin -- these currently fail under modperl and fcgi
diff --git a/t/web/passthrough-jsmin b/t/web/passthrough-jsmin
new file mode 100755
index 0000000..3d9bf01
--- /dev/null
+++ b/t/web/passthrough-jsmin
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "// passthrough-jsmin added this";
+
+exec cat;
diff --git a/t/web/squish.t b/t/web/squish.t
index a6c775b..ff43e74 100644
--- a/t/web/squish.t
+++ b/t/web/squish.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
use RT;
-use RT::Test tests => 21;
+use RT::Test tests => 26;
RT->Config->Set( DevelMode => 0 );
RT->Config->Set( WebDefaultStylesheet => 'aileron' );
@@ -49,6 +49,19 @@ $m->content_contains('jQuery.noConflict', "found default js content");
RT::Test->stop_server;
+diag "Test with a trivial jsmin which is a pass-through";
+RT->Config->Set( 'JSMinPath' => RT::Test::get_abs_relocatable_dir("passthrough-jsmin"));
+( $url, $m ) = RT::Test->started_ok;
+$m->login;
+($js_link) =
+ $m->content =~ m!src="([^"]+?squished-([a-f0-9]{32})\.js)"!;
+$m->get_ok( $url . $js_link, 'follow squished js' );
+$m->content_contains( 'passthrough-jsmin added this', "has passthrough-added content" );
+$m->content_contains( 'function just_testing', "has not-by-default.js" );
+$m->content_contains('jQuery.noConflict', "found default js content");
+RT::Test->stop_server;
+
+
diag "test squished files with devel mode enabled";
RT->Config->Set( 'DevelMode' => 1 );
RT->AddJavaScript( 'not-by-default.js' );
commit d80b1e408629b1fb509d4147f3904003a67c1440
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jun 1 12:48:08 2011 -0400
Switch to the more direct modperl handler over the perl-script handler
The 'modperl' handler is faster, though it doesn't provide a number of
properties of the 'perl-script' handler. Specifically, the 'modperl'
handler doesn't:
* Tie STDIN and STDOUT; RT doesn't directly print to STDOUT or read
from STDIN, so this is unnecessary. Additionally, this feature can
cause bugs in fork and exec code-paths like IPC::Run3. Bugs of this
nature are the driving reason behind the switch from 'perl-script' to
'modperl'.
* Populate %ENV automatically, or pass changes through to
'subprocess_env'; however, Plack::Handler::Apache2 calls
$r->subprocess_env, which populates these for us.
* Reset %ENV, @INC, $/ and so forth between requests; the former is set
by Plack::Handler::Apache2, and the latter are not changed at
runtime.
diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod
index 2bd6d5d..e6161aa 100644
--- a/docs/web_deployment.pod
+++ b/docs/web_deployment.pod
@@ -39,7 +39,7 @@ B<WARNING: mod_perl 1.99_xx is not supported.>
Order allow,deny
Allow from all
- SetHandler perl-script
+ SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server
</Location>
diff --git a/t/data/configs/apache2.2+mod_perl.conf.in b/t/data/configs/apache2.2+mod_perl.conf.in
index aad8bf5..141a59b 100644
--- a/t/data/configs/apache2.2+mod_perl.conf.in
+++ b/t/data/configs/apache2.2+mod_perl.conf.in
@@ -50,7 +50,7 @@ DocumentRoot "%%DOCUMENT_ROOT%%"
Order allow,deny
Allow from all
- SetHandler perl-script
+ SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app %%RT_SBIN_PATH%%/rt-server
</Location>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list