[Bps-public-commit] rt-extension-quickassign branch update-for-rt5 created. 1.01-3-g10afc6c

BPS Git Server git at git.bestpractical.com
Fri Mar 4 19:55:35 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-quickassign".

The branch, update-for-rt5 has been created
        at  10afc6c6eeb02b74db307aeb7e80d0f5753aa2b4 (commit)

- Log -----------------------------------------------------------------
commit 10afc6c6eeb02b74db307aeb7e80d0f5753aa2b4
Author: Jason Crome <jcrome at bestpractical.com>
Date:   Thu Mar 3 15:59:37 2022 -0500

    Updated docs for RT5

diff --git a/README b/README
index fd0407c..aa849a7 100644
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ DESCRIPTION
     performance impact for some installations.
 
 RT VERSION
-    Works with RT 4.0, 4.2 and 4.4
+    Works with RT 4 and 5.0
 
 INSTALLATION
     perl Makefile.PL
@@ -48,7 +48,7 @@ BUGS
         L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-QuickAssign>.
 
 LICENSE AND COPYRIGHT
-    This software is Copyright (c) 2014-2019 by Best Practical Solutions,
+    This software is Copyright (c) 2014-2022 by Best Practical Solutions,
     LLC
 
     This is free software, licensed under:
diff --git a/lib/RT/Extension/QuickAssign.pm b/lib/RT/Extension/QuickAssign.pm
index 0e8b548..ca35e2c 100644
--- a/lib/RT/Extension/QuickAssign.pm
+++ b/lib/RT/Extension/QuickAssign.pm
@@ -20,7 +20,7 @@ performance impact for some installations.
 
 =head1 RT VERSION
 
-Works with RT 4.0, 4.2 and 4.4
+Works with RT 4 and 5.0
 
 =head1 INSTALLATION
 
@@ -70,7 +70,7 @@ or via the web at
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2014-2019 by Best Practical Solutions, LLC
+This software is Copyright (c) 2014-2022 by Best Practical Solutions, LLC
 
 This is free software, licensed under:
 

commit 2753f67180295f64c4526eb1ccc361e0df3300d6
Author: Jason Crome <jcrome at bestpractical.com>
Date:   Thu Mar 3 15:58:49 2022 -0500

    Update Module::Install

diff --git a/META.yml b/META.yml
index 8f9b8c4..fe452e0 100644
--- a/META.yml
+++ b/META.yml
@@ -24,6 +24,5 @@ resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-quickassign
 version: '1.01'
-x_module_install_rtx_version: '0.40'
+x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.0
-x_rt_too_new: 4.6.0
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 7cad529..2889ece 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.43';
 
 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;
@@ -117,7 +134,7 @@ lexicons ::
     if( $extra_args->{'remove_files'} ){
         $self->include('Module::Install::RTx::Remove');
         our @remove_files;
-        eval { require "etc/upgrade/remove_files" }
+        eval { require "./etc/upgrade/remove_files" }
           or print "No remove file located, no files to remove\n";
         $remove_files = join ",", map {"q(\$(DESTDIR)$plugin_path/$name/$_)"} @remove_files;
     }
@@ -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

commit d5825bafdc66b07b3b20036ba919e00f5a2408b7
Author: Jason Crome <jcrome at bestpractical.com>
Date:   Thu Mar 3 15:58:08 2022 -0500

    Add "." to @INC for Perl 5.26+

diff --git a/Makefile.PL b/Makefile.PL
index 13c4eee..2a49ec2 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,4 @@
+use lib '.';
 use inc::Module::Install;
 
 RTx     'RT-Extension-QuickAssign';
@@ -5,7 +6,6 @@ license 'gplv2';
 repository 'https://github.com/bestpractical/rt-extension-quickassign';
 
 requires_rt '4.0.0';
-rt_too_new '4.6.0';
 
 sign;
 WriteAll;

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


hooks/post-receive
-- 
rt-extension-quickassign


More information about the Bps-public-commit mailing list