[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.13-57-gb00a27f

Shawn Moore shawn at bestpractical.com
Fri Sep 9 11:53:56 EDT 2016


The branch, 4.2-trunk has been updated
       via  b00a27fdb942e033bc6eaa83cac228298da425c0 (commit)
      from  3da2bf2868ff72f5e13b19eba4f02eb8f5a85f70 (commit)

Summary of changes:
 lib/RT/I18N.pm                 | 5 +++--
 t/lifecycles/basics.t          | 2 +-
 t/lifecycles/dates.t           | 2 +-
 t/lifecycles/moving.t          | 2 +-
 t/lifecycles/types.t           | 2 +-
 t/lifecycles/unresolved-deps.t | 2 +-
 6 files changed, 8 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit b00a27fdb942e033bc6eaa83cac228298da425c0
Author: Niko Tyni <ntyni at debian.org>
Date:   Sun Sep 4 11:41:29 2016 +0300

    Fix RT::I18N and the test suite to work without cwd in @INC

diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm
index 60a6622..1bf0b57 100644
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@ -56,6 +56,7 @@ package RT::I18N;
 
 use strict;
 use warnings;
+use Cwd ();
 
 
 use Locale::Maketext 1.04;
@@ -97,10 +98,10 @@ sub Init {
     @lang = ('*') unless @lang;
 
     # load default functions
-    require substr(__FILE__, 0, -3) . '/i_default.pm';
+    require substr(Cwd::abs_path(__FILE__), 0, -3) . '/i_default.pm';
 
     # Load language-specific functions
-    foreach my $file ( File::Glob::bsd_glob(substr(__FILE__, 0, -3) . "/*.pm") ) {
+    foreach my $file ( File::Glob::bsd_glob(substr(Cwd::abs_path(__FILE__), 0, -3) . "/*.pm") ) {
         my ($lang) = ($file =~ /([^\\\/]+?)\.pm$/);
         next unless grep $_ eq '*' || $_ eq $lang, @lang;
         require $file;
diff --git a/t/lifecycles/basics.t b/t/lifecycles/basics.t
index e18bea3..85e77c7 100644
--- a/t/lifecycles/basics.t
+++ b/t/lifecycles/basics.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-BEGIN {require  't/lifecycles/utils.pl'};
+BEGIN {require  './t/lifecycles/utils.pl'};
 
 my $general = RT::Test->load_or_create_queue(
     Name => 'General',
diff --git a/t/lifecycles/dates.t b/t/lifecycles/dates.t
index 0c74a1b..a8dd8cf 100644
--- a/t/lifecycles/dates.t
+++ b/t/lifecycles/dates.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-BEGIN {require 't/lifecycles/utils.pl'};
+BEGIN {require './t/lifecycles/utils.pl'};
 
 my $general = RT::Test->load_or_create_queue(
     Name => 'General',
diff --git a/t/lifecycles/moving.t b/t/lifecycles/moving.t
index 8a03e3e..379b646 100644
--- a/t/lifecycles/moving.t
+++ b/t/lifecycles/moving.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-BEGIN {require 't/lifecycles/utils.pl'};
+BEGIN {require './t/lifecycles/utils.pl'};
 
 my $general = RT::Test->load_or_create_queue(
     Name => 'General',
diff --git a/t/lifecycles/types.t b/t/lifecycles/types.t
index 79b0714..84cfd86 100644
--- a/t/lifecycles/types.t
+++ b/t/lifecycles/types.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-BEGIN {require  't/lifecycles/utils.pl'};
+BEGIN {require  './t/lifecycles/utils.pl'};
 
 is_deeply( [ RT::Lifecycle->ListAll ], [qw/ approvals default delivery /],
        "Get the list of all lifecycles (implicitly for for tickets)");
diff --git a/t/lifecycles/unresolved-deps.t b/t/lifecycles/unresolved-deps.t
index 5da4b8f..fe09d3b 100644
--- a/t/lifecycles/unresolved-deps.t
+++ b/t/lifecycles/unresolved-deps.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-BEGIN {require  't/lifecycles/utils.pl'};
+BEGIN {require  './t/lifecycles/utils.pl'};
 
 my $general = RT::Test->load_or_create_queue(
     Name => 'General',

-----------------------------------------------------------------------


More information about the rt-commit mailing list