[Bps-public-commit] RT-Extension-RepliesToResolved branch update-for-rt5 created. 1.01-6-g3978595

BPS Git Server git at git.bestpractical.com
Fri Jan 14 23:18:17 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "RT-Extension-RepliesToResolved".

The branch, update-for-rt5 has been created
        at  39785957ec119cf2267c5f3360c85ea4a4527f39 (commit)

- Log -----------------------------------------------------------------
commit 39785957ec119cf2267c5f3360c85ea4a4527f39
Author: Brad Embree <brad at bestpractical.com>
Date:   Fri Jan 14 15:15:33 2022 -0800

    Prep version 1.03

diff --git a/META.yml b/META.yml
index ecc21e4..3bfa5c8 100644
--- a/META.yml
+++ b/META.yml
@@ -25,7 +25,7 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-repliestoresolved
-version: '1.02'
-x_module_install_rtx_version: '0.40'
+version: '1.03'
+x_module_install_rtx_version: '0.42'
 x_requires_rt: 4.0.9
-x_rt_too_new: 4.6.0
+x_rt_too_new: 5.2.0
diff --git a/Makefile.PL b/Makefile.PL
index 43efd8b..2f4def8 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -7,7 +7,7 @@ repository('https://github.com/bestpractical/rt-extension-repliestoresolved');
 no_index( package => 'RT::Interface::Email' );
 
 requires_rt '4.0.9';
-rt_too_new  '4.6.0';
+rt_too_new  '5.2.0';
 
 license 'gplv2';
 
diff --git a/README b/README
index fc67381..438354f 100644
--- a/README
+++ b/README
@@ -1,6 +1,9 @@
 NAME
     RT::Extension::RepliesToResolved - intercept replies to resolved tickets
 
+RT VERSION
+    Works with RT 4.4, 5.0
+
 DESCRIPTION
     Intercepts replies via email to resolved tickets, and creates a new
     ticket rather than updating the resolved ticket. There are a few reasons
diff --git a/lib/RT/Extension/RepliesToResolved.pm b/lib/RT/Extension/RepliesToResolved.pm
index f4d31b2..6985220 100644
--- a/lib/RT/Extension/RepliesToResolved.pm
+++ b/lib/RT/Extension/RepliesToResolved.pm
@@ -2,12 +2,16 @@ use 5.008003; use strict; use warnings;
 
 package RT::Extension::RepliesToResolved;
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 
 =head1 NAME
 
 RT::Extension::RepliesToResolved - intercept replies to resolved tickets
 
+=head1 RT VERSION
+
+Works with RT 4.4, 5.0 
+
 =head1 DESCRIPTION
 
 Intercepts replies via email to resolved tickets, and creates a new

commit f442e505fd8bf2d84fbbcf2b355ccb53bdb78734
Author: Brad Embree <brad at bestpractical.com>
Date:   Fri Jan 14 15:14:23 2022 -0800

    Add dot to inc for Module::Install

diff --git a/Makefile.PL b/Makefile.PL
index 68d3b40..43efd8b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,4 @@
+use lib '.';
 use inc::Module::Install;
 RTx('RT-Extension-RepliesToResolved');
 

commit 38e2168005f5889bb006ef8def1385919d03afbd
Author: Brad Embree <brad at bestpractical.com>
Date:   Fri Jan 14 15:11:04 2022 -0800

    Update Module::Install

diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 7cad529..2dd9489 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -6,9 +6,10 @@ use strict;
 use warnings;
 no warnings 'once';
 
+use Term::ANSIColor qw(:constants);
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.40';
+our $VERSION = '0.42';
 
 use FindBin;
 use File::Glob     ();
@@ -53,7 +54,7 @@ sub RTx {
         my @look = @INC;
         unshift @look, grep {defined and -d $_} @try;
         push @look, grep {defined and -d $_}
-            map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes;
+            map { ( "$_/rt5/lib", "$_/lib/rt5", "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes;
         last if eval {local @INC = @look; require RT; $RT::LocalLibPath};
 
         warn
@@ -76,6 +77,22 @@ sub RTx {
         $self->requires_rt('4.0.0');
     }
 
+    my $package = $name;
+    $package =~ s/-/::/g;
+    if ( $RT::CORED_PLUGINS{$package} ) {
+        my ($base_version) = $RT::VERSION =~ /(\d+\.\d+\.\d+)/;
+        die RED, <<"EOT";
+
+**** Error: Your installed version of RT ($RT::VERSION) already
+            contains this extension in core, so you don't need to
+            install it.
+
+            Check https://docs.bestpractical.com/rt/$base_version/RT_Config.html
+            to configure it.
+
+EOT
+    }
+
     # Installation locations
     my %path;
     my $plugin_path;
@@ -223,7 +240,7 @@ sub requires_rt {
     my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
 
     if ($sorted[-1] eq $version) {
-        die <<"EOT";
+        die RED, <<"EOT";
 
 **** Error: This extension requires RT $version. Your installed version
             of RT ($RT::VERSION) is too old.
@@ -249,12 +266,12 @@ sub requires_rt_plugin {
         unshift @INC, $path;
     } else {
         my $name = $self->name;
-        warn <<"EOT";
+        my $msg = <<"EOT";
 
 **** Warning: $name requires that the $plugin plugin be installed and
               enabled; it does not appear to be installed.
-
 EOT
+        warn RED, $msg, RESET, "\n";
     }
     $self->requires(@_);
 }
@@ -264,9 +281,8 @@ sub rt_too_new {
     my $name = $self->name;
     $msg ||= <<EOT;
 
-**** Error: Your installed version of RT (%s) is too new; this extension
-            only works with versions older than %s.
-
+**** Warning: Your installed version of RT (%s) is too new; this extension
+              has not been tested on your version of RT and may not work as expected.
 EOT
     $self->add_metadata("x_rt_too_new", $version) if $self->is_admin;
 
@@ -274,7 +290,7 @@ EOT
     my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
 
     if ($sorted[0] eq $version) {
-        die sprintf($msg,$RT::VERSION,$version);
+        warn RED, sprintf($msg,$RT::VERSION), RESET, "\n";
     }
 }
 
@@ -297,4 +313,4 @@ sub _load_rt_handle {
 
 __END__
 
-#line 468
+#line 484

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


hooks/post-receive
-- 
RT-Extension-RepliesToResolved


More information about the Bps-public-commit mailing list