[Bps-public-commit] rt-extension-quickassign branch master updated. 1.02

BPS Git Server git at git.bestpractical.com
Fri Mar 4 20:02:48 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, master has been updated
       via  42b374174fe3625509242ebcd638a12af518c840 (commit)
       via  d4e37c3e6607e372a3bfd5f87af442b6e3ddd990 (commit)
       via  263c3fe15b8639f9cadb68b643310d9edc2f30c2 (commit)
       via  2753f67180295f64c4526eb1ccc361e0df3300d6 (commit)
       via  d5825bafdc66b07b3b20036ba919e00f5a2408b7 (commit)
      from  0263dcae314a393f32dcc4c3d867fe8c3fd7e030 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 42b374174fe3625509242ebcd638a12af518c840
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Mar 5 03:57:30 2022 +0800

    Prep 1.02

diff --git a/Changes b/Changes
index 1583971..a89dde6 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for RT-Extension-QuickAssign
 
+1.02 2022-03-04
+ - Add RT 5 support
+
 1.01 2019-06-12
  - Declare that it works with 4.4 too
 
diff --git a/META.yml b/META.yml
index fe452e0..6ed9acf 100644
--- a/META.yml
+++ b/META.yml
@@ -23,6 +23,6 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-quickassign
-version: '1.01'
+version: '1.02'
 x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.0
diff --git a/lib/RT/Extension/QuickAssign.pm b/lib/RT/Extension/QuickAssign.pm
index d8d5cf2..2256b51 100644
--- a/lib/RT/Extension/QuickAssign.pm
+++ b/lib/RT/Extension/QuickAssign.pm
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 package RT::Extension::QuickAssign;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 =head1 NAME
 

commit d4e37c3e6607e372a3bfd5f87af442b6e3ddd990
Merge: 0263dca 263c3fe
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Mar 5 03:59:14 2022 +0800

    Merge branch 'update-for-rt5'


commit 263c3fe15b8639f9cadb68b643310d9edc2f30c2
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..ffc5b09 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
@@ -19,7 +19,7 @@ INSTALLATION
     make install
         May need root permissions
 
-    Edit your /opt/rt4/etc/RT_SiteConfig.pm
+    Edit your /opt/rt5/etc/RT_SiteConfig.pm
         If you are using RT 4.2 or greater, add this line:
 
             Plugin('RT::Extension::QuickAssign');
@@ -31,7 +31,7 @@ INSTALLATION
         or add RT::Extension::QuickAssign to your existing @Plugins line.
 
     Clear your mason cache
-            rm -rf /opt/rt4/var/mason_data/obj
+            rm -rf /opt/rt5/var/mason_data/obj
 
     Restart your webserver
 
@@ -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..d8d5cf2 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
 
@@ -34,7 +34,7 @@ Works with RT 4.0, 4.2 and 4.4
 
 May need root permissions
 
-=item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
+=item Edit your F</opt/rt5/etc/RT_SiteConfig.pm>
 
 If you are using RT 4.2 or greater, add this line:
 
@@ -48,7 +48,7 @@ or add C<RT::Extension::QuickAssign> to your existing C<@Plugins> line.
 
 =item Clear your mason cache
 
-    rm -rf /opt/rt4/var/mason_data/obj
+    rm -rf /opt/rt5/var/mason_data/obj
 
 =item Restart your webserver
 
@@ -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;

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

Summary of changes:
 Changes                         |  3 +++
 META.yml                        |  5 ++---
 Makefile.PL                     |  2 +-
 README                          |  8 ++++----
 inc/Module/Install/RTx.pm       | 38 +++++++++++++++++++++++++++-----------
 lib/RT/Extension/QuickAssign.pm | 10 +++++-----
 6 files changed, 42 insertions(+), 24 deletions(-)


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


More information about the Bps-public-commit mailing list