[Rt-commit] r19952 - in rt/3.999/trunk: lib lib/RT t/web
sartak at bestpractical.com
sartak at bestpractical.com
Mon Jun 8 15:29:25 EDT 2009
Author: sartak
Date: Mon Jun 8 15:29:25 2009
New Revision: 19952
Modified:
rt/3.999/trunk/lib/RT.pm
rt/3.999/trunk/lib/RT/Test.pm
rt/3.999/trunk/t/ticket/action_linear_escalate.t
rt/3.999/trunk/t/web/command_line.t
Log:
RT->bin_path instead of $RT::BinPath
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:29:25 2009
@@ -62,7 +62,6 @@
our $VERSION = '3.999.0';
our $BASE_PATH = Jifty::Util->app_root;
-our $BinPath = $BASE_PATH . '/bin';
our $VarPath = $BASE_PATH . '/var';
our $LocalPath = $BASE_PATH . '/local';
our $LocalPluginPath = $LocalPath . "/plugins";
@@ -371,6 +370,14 @@
sub sbin_path { Jifty::Util->app_root . '/sbin' }
+=head2 bin_path
+
+The root of F</bin> (RT programs)
+
+=cut
+
+sub bin_path { Jifty::Util->app_root . '/bin' }
+
=head2 html_path
The root of F</share/html> (Mason templates)
Modified: rt/3.999/trunk/lib/RT/Test.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Test.pm (original)
+++ rt/3.999/trunk/lib/RT/Test.pm Mon Jun 8 15:29:25 2009
@@ -155,7 +155,11 @@
my $baseurl = shift;
my $queue = shift || 'general';
my $action = shift || 'correspond';
- ok( open( my $mail, "|$RT::BinPath/rt-mailgate --url $baseurl --queue $queue --action $action" ), "Opened the mailgate - $!" );
+
+ my $mailgate = RT->bin_path . '/rt-mailgate';
+ my $mail_command = "|$mailgate --url $baseurl --queue $queue --action $action" ;
+
+ ok( open( my $mail, $mail_command), "Opened the mailgate - $!" );
return $mail;
}
@@ -405,7 +409,7 @@
);
my $message = delete $args{'message'};
- my $cmd = $RT::BinPath . '/rt-mailgate';
+ my $cmd = RT->bin_path . '/rt-mailgate';
die "Couldn't find mailgate ($cmd) command" unless -f $cmd;
$cmd = $^X . " " . $cmd . ' --debug';
Modified: rt/3.999/trunk/t/ticket/action_linear_escalate.t
==============================================================================
--- rt/3.999/trunk/t/ticket/action_linear_escalate.t (original)
+++ rt/3.999/trunk/t/ticket/action_linear_escalate.t Mon Jun 8 15:29:25 2009
@@ -91,8 +91,10 @@
sub escalate_ticket_ok {
my $ticket = shift;
my $id = $ticket->id;
- print "$RT::BinPath/rt-crontool --search RT::Search::FromSQL --search-arg \"id = @{[$id]}\" --action RT::ScripAction::LinearEscalate --action-arg \"RecordTransaction:$RecordTransaction; UpdateLastUpdated:$UpdateLastUpdated\"\n";
- print STDERR `$RT::BinPath/rt-crontool --search RT::Search::FromSQL --search-arg "id = @{[$id]}" --action RT::ScripAction::LinearEscalate --action-arg "RecordTransaction:$RecordTransaction; UpdateLastUpdated:$UpdateLastUpdated"`;
+
+ my $crontool = RT->bin_path . '/rt-crontool';
+ print "$crontool --search RT::Search::FromSQL --search-arg \"id = @{[$id]}\" --action RT::ScripAction::LinearEscalate --action-arg \"RecordTransaction:$RecordTransaction; UpdateLastUpdated:$UpdateLastUpdated\"\n";
+ print STDERR `$crontool --search RT::Search::FromSQL --search-arg "id = @{[$id]}" --action RT::ScripAction::LinearEscalate --action-arg "RecordTransaction:$RecordTransaction; UpdateLastUpdated:$UpdateLastUpdated"`;
Jifty::DBI::Record::Cachable->flush_cache;
$ticket->load($id); # reload, because otherwise we get the cached value
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:29:25 2009
@@ -9,7 +9,7 @@
use RT::Model::User;
use RT::Model::Queue;
use Encode;
-my $rt_tool_path = "$RT::BinPath/rt";
+my $rt_tool_path = RT->bin_path . '/rt';
# {{{ test configuration options
More information about the Rt-commit
mailing list