[Rt-commit] r19949 - in rt/3.999/trunk: lib t/web

sartak at bestpractical.com sartak at bestpractical.com
Mon Jun 8 15:17:21 EDT 2009


Author: sartak
Date: Mon Jun  8 15:17:20 2009
New Revision: 19949

Modified:
   rt/3.999/trunk/lib/RT.pm
   rt/3.999/trunk/t/mail/gateway.t
   rt/3.999/trunk/t/web/attachments.t
   rt/3.999/trunk/t/web/cf_access.t
   rt/3.999/trunk/t/web/command_line.t

Log:
RT->html_path instead of app_root mangling

Modified: rt/3.999/trunk/lib/RT.pm
==============================================================================
--- rt/3.999/trunk/lib/RT.pm	(original)
+++ rt/3.999/trunk/lib/RT.pm	Mon Jun  8 15:17:20 2009
@@ -347,13 +347,21 @@
     }
 }
 
+=head2 local_path
+
+The root of F</local (user overrides)
+
+=cut
+
+sub local_path { Jifty::Util->app_root . '/local' }
+
 =head2 local_lib_path
 
 The root of F</local/lib> (user libraries)
 
 =cut
 
-sub local_lib_path { Jifty::Util->app_root . '/local/lib' }
+sub local_lib_path { shift->local_path . '/lib' }
 
 =head2 sbin_path
 
@@ -363,6 +371,14 @@
 
 sub sbin_path { Jifty::Util->app_root . '/sbin' }
 
+=head2 html_path
+
+The root of F</share/html> (Mason templates)
+
+=cut
+
+sub html_path { Jifty::Util->app_root . '/share/html' }
+
 =head1 BUGS
 
 Please report them to C<rt-bugs at bestpractical.com>, if you know what's

Modified: rt/3.999/trunk/t/mail/gateway.t
==============================================================================
--- rt/3.999/trunk/t/mail/gateway.t	(original)
+++ rt/3.999/trunk/t/mail/gateway.t	Mon Jun  8 15:17:20 2009
@@ -457,7 +457,7 @@
 diag "Testing preservation of binary attachments" if $ENV{'TEST_VERBOSE'};
 {
     # Get a binary blob (Best Practical logo) 
-    my $LOGO_FILE = Jifty::Util->app_root .'/share/html/NoAuth/images/bplogo.gif';
+    my $LOGO_FILE = RT->html_path .'/NoAuth/images/bplogo.gif';
 
     # Create a mime entity with an attachment
     my $entity = MIME::Entity->build(

Modified: rt/3.999/trunk/t/web/attachments.t
==============================================================================
--- rt/3.999/trunk/t/web/attachments.t	(original)
+++ rt/3.999/trunk/t/web/attachments.t	Mon Jun  8 15:17:20 2009
@@ -3,7 +3,7 @@
 
 use RT::Test; use Test::More tests => 14;
 
-use constant ImageRoot => Jifty::Util->app_root . '/share/html/NoAuth/images';
+use constant ImageRoot => RT->html_path . '/NoAuth/images';
 use constant LogoFile => ImageRoot .'/bplogo.gif';
 use constant FaviconFile => ImageRoot .'/favicon.png';
 

Modified: rt/3.999/trunk/t/web/cf_access.t
==============================================================================
--- rt/3.999/trunk/t/web/cf_access.t	(original)
+++ rt/3.999/trunk/t/web/cf_access.t	Mon Jun  8 15:17:20 2009
@@ -7,7 +7,7 @@
 
 my ($baseurl, $m) = RT::Test->started_ok;
 
-use constant ImageFile => Jifty::Util->app_root .'/share/html/NoAuth/images/bplogo.gif';
+use constant ImageFile => RT->html_path .'/NoAuth/images/bplogo.gif';
 use constant ImageFileContent => RT::Test->file_content(ImageFile);
 
 ok $m->login, 'logged in';

Modified: rt/3.999/trunk/t/web/command_line.t
==============================================================================
--- rt/3.999/trunk/t/web/command_line.t	(original)
+++ rt/3.999/trunk/t/web/command_line.t	Mon Jun  8 15:17:20 2009
@@ -116,7 +116,7 @@
     # text attachment
     check_attachment($test_email);
     # binary attachment
-    check_attachment(Jifty::Util->app_root.'/share/html/NoAuth/images/bplogo.gif');
+    check_attachment(RT->html_path.'/NoAuth/images/bplogo.gif');
 
 # change a ticket's Owner
 expect_send("edit ticket/$ticket_id set owner=root", 'Changing owner...');


More information about the Rt-commit mailing list