[Bps-public-commit] rt-extension-nonwatcherrecipients branch, master, updated. 1.01-5-g9a78197
? sunnavy
sunnavy at bestpractical.com
Mon Jul 27 14:42:35 EDT 2020
The branch, master has been updated
via 9a78197187a13b5fa02588ca8df4b57e693724da (commit)
via 10a3f68e8bc88b9cfcd40bb3b9e98125b8dc4ba6 (commit)
via 01d4ced122d856e1b345a473028a6c22013c5d70 (commit)
via 1e725ff4a86c6ac9a8cd6ed5894c7e67d8f5d1f2 (commit)
via 0dceabce0fd2a93c864fb8cfe8a8201d364b31fb (commit)
from 3a705b5af5c2d025d55c8c371cd2dd5c407dd93f (commit)
Summary of changes:
Changes | 3 ++
META.yml | 8 ++--
Makefile.PL | 3 +-
README | 4 +-
inc/Module/Install.pm | 35 +++------------
inc/Module/Install/Base.pm | 2 +-
inc/Module/Install/Can.pm | 13 +++++-
inc/Module/Install/Fetch.pm | 2 +-
inc/Module/Install/Include.pm | 2 +-
inc/Module/Install/Makefile.pm | 2 +-
inc/Module/Install/Metadata.pm | 2 +-
inc/Module/Install/RTx.pm | 54 +++++++++++++++++++-----
inc/Module/Install/RTx/Runtime.pm | 1 +
inc/Module/Install/ReadmeFromPod.pm | 2 +-
inc/Module/Install/Win32.pm | 2 +-
inc/Module/Install/WriteAll.pm | 2 +-
inc/YAML/Tiny.pm | 14 +++---
lib/RT/Extension/NonWatcherRecipients.pm | 6 +--
lib/RT/Extension/NonWatcherRecipients/Test.pm.in | 2 +-
19 files changed, 91 insertions(+), 68 deletions(-)
- Log -----------------------------------------------------------------
commit 0dceabce0fd2a93c864fb8cfe8a8201d364b31fb
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jul 28 02:29:59 2020 +0800
Update M:I
diff --git a/META.yml b/META.yml
index 0068673..cc8f15e 100644
--- a/META.yml
+++ b/META.yml
@@ -8,7 +8,7 @@ configure_requires:
ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
-generated_by: 'Module::Install version 1.16'
+generated_by: 'Module::Install version 1.19'
license: gplv2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,6 +25,6 @@ resources:
license: http://opensource.org/licenses/gpl-license.php
repository: https://github.com/bestpractical/rt-extension-nonwatcherrecipients
version: '1.01'
-x_module_install_rtx_version: '0.37'
+x_module_install_rtx_version: '0.42'
x_requires_rt: 4.0.0
x_rt_too_new: 4.6.0
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index f44ab4d..7ba98c2 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.16';
+ $VERSION = '1.19';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -244,6 +244,8 @@ sub new {
}
return $args{_self} if $args{_self};
+ $base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS';
+
$args{dispatch} ||= 'Admin';
$args{prefix} ||= 'inc';
$args{author} ||= ($^O eq 'VMS' ? '_author' : '.author');
@@ -322,7 +324,7 @@ sub find_extensions {
my ($self, $path) = @_;
my @found;
- File::Find::find( sub {
+ File::Find::find( {no_chdir => 1, wanted => sub {
my $file = $File::Find::name;
return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
my $subpath = $1;
@@ -336,7 +338,7 @@ sub find_extensions {
# correctly. Otherwise, root through the file to locate the case-preserved
# version of the package name.
if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
- my $content = Module::Install::_read($subpath . '.pm');
+ my $content = Module::Install::_read($File::Find::name);
my $in_pod = 0;
foreach ( split /\n/, $content ) {
$in_pod = 1 if /^=\w/;
@@ -351,7 +353,7 @@ sub find_extensions {
}
push @found, [ $file, $pkg ];
- }, $path ) if -d $path;
+ }}, $path ) if -d $path;
@found;
}
@@ -373,8 +375,6 @@ sub _caller {
return $call;
}
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _read {
local *FH;
open( FH, '<', $_[0] ) or die "open($_[0]): $!";
@@ -383,16 +383,6 @@ sub _read {
close FH or die "close($_[0]): $!";
return $string;
}
-END_NEW
-sub _read {
- local *FH;
- open( FH, "< $_[0]" ) or die "open($_[0]): $!";
- binmode FH;
- my $string = do { local $/; <FH> };
- close FH or die "close($_[0]): $!";
- return $string;
-}
-END_OLD
sub _readperl {
my $string = Module::Install::_read($_[0]);
@@ -413,8 +403,6 @@ sub _readpod {
return $string;
}
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
local *FH;
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
@@ -424,17 +412,6 @@ sub _write {
}
close FH or die "close($_[0]): $!";
}
-END_NEW
-sub _write {
- local *FH;
- open( FH, "> $_[0]" ) or die "open($_[0]): $!";
- binmode FH;
- foreach ( 1 .. $#_ ) {
- print FH $_[$_] or die "print($_[0]): $!";
- }
- close FH or die "close($_[0]): $!";
-}
-END_OLD
# _version is for processing module versions (eg, 1.03_05) not
# Perl versions (eg, 5.8.1).
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 5762a74..9fa42c2 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index d859276..d65c753 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -8,7 +8,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -121,6 +121,15 @@ END_C
# Can we locate a (the) C compiler
sub can_cc {
my $self = shift;
+
+ if ($^O eq 'VMS') {
+ require ExtUtils::CBuilder;
+ my $builder = ExtUtils::CBuilder->new(
+ quiet => 1,
+ );
+ return $builder->have_compiler;
+ }
+
my @chunks = split(/ /, $Config::Config{cc}) or return;
# $Config{cc} may contain args; try to find out the program part
@@ -151,4 +160,4 @@ if ( $^O eq 'cygwin' ) {
__END__
-#line 236
+#line 245
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 41d3517..3072b08 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index 2eb1d1f..13fdcd0 100644
--- a/inc/Module/Install/Include.pm
+++ b/inc/Module/Install/Include.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index e9918d2..13a4464 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 9792685..11bf971 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index cb4cfde..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.37';
+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;
@@ -113,11 +130,29 @@ lexicons ::
.
}
+ my $remove_files;
+ if( $extra_args->{'remove_files'} ){
+ $self->include('Module::Install::RTx::Remove');
+ our @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;
+ }
+
$self->include('Module::Install::RTx::Runtime') if $self->admin;
$self->include_deps( 'YAML::Tiny', 0 ) if $self->admin;
my $postamble = << ".";
install ::
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxPlugin()"
+.
+
+ if( $remove_files ){
+ $postamble .= << ".";
+\t\$(NOECHO) \$(PERL) -MModule::Install::RTx::Remove -e \"RTxRemove([$remove_files])\"
+.
+ }
+
+ $postamble .= << ".";
\t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
.
@@ -205,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.
@@ -231,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(@_);
}
@@ -246,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;
@@ -256,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";
}
}
@@ -279,4 +313,4 @@ sub _load_rt_handle {
__END__
-#line 428
+#line 484
diff --git a/inc/Module/Install/RTx/Runtime.pm b/inc/Module/Install/RTx/Runtime.pm
index 937949f..ae07502 100644
--- a/inc/Module/Install/RTx/Runtime.pm
+++ b/inc/Module/Install/RTx/Runtime.pm
@@ -33,6 +33,7 @@ sub RTxDatabase {
my $lib_path = File::Basename::dirname($INC{'RT.pm'});
my @args = (
+ "-I.",
"-Ilib",
"-I$RT::LocalLibPath",
"-I$lib_path",
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
index 4a25172..3738232 100644
--- a/inc/Module/Install/ReadmeFromPod.pm
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -7,7 +7,7 @@ use warnings;
use base qw(Module::Install::Base);
use vars qw($VERSION);
-$VERSION = '0.24';
+$VERSION = '0.30';
{
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index 218a66b..f7aa615 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 530749b..2db861a 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.19';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff --git a/inc/YAML/Tiny.pm b/inc/YAML/Tiny.pm
index aa539f7..fb157a6 100644
--- a/inc/YAML/Tiny.pm
+++ b/inc/YAML/Tiny.pm
@@ -2,12 +2,12 @@
use 5.008001; # sane UTF-8 support
use strict;
use warnings;
-package YAML::Tiny; # git description: v1.68-2-gcc5324e
+package YAML::Tiny; # git description: v1.72-7-g8682f63
# XXX-INGY is 5.8.1 too old/broken for utf8?
# XXX-XDG Lancaster consensus was that it was sufficient until
# proven otherwise
-our $VERSION = '1.69';
+our $VERSION = '1.73';
#####################################################################
# The YAML::Tiny API.
@@ -374,7 +374,7 @@ sub _load_scalar {
while ( @$lines ) {
$lines->[0] =~ /^(\s*)/;
last unless length($1) >= $indent->[-1];
- push @multiline, substr(shift(@$lines), length($1));
+ push @multiline, substr(shift(@$lines), $indent->[-1]);
}
my $j = (substr($string, 0, 1) eq '>') ? ' ' : "\n";
@@ -570,10 +570,8 @@ sub _dump_file {
if ( _can_flock() ) {
# Open without truncation (truncate comes after lock)
my $flags = Fcntl::O_WRONLY()|Fcntl::O_CREAT();
- sysopen( $fh, $file, $flags );
- unless ( $fh ) {
- $self->_error("Failed to open file '$file' for writing: $!");
- }
+ sysopen( $fh, $file, $flags )
+ or $self->_error("Failed to open file '$file' for writing: $!");
# Use no translation and strict UTF-8
binmode( $fh, ":raw:encoding(UTF-8)");
@@ -871,4 +869,4 @@ delete $YAML::Tiny::{refaddr};
__END__
-#line 1489
+#line 1487
commit 1e725ff4a86c6ac9a8cd6ed5894c7e67d8f5d1f2
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jul 28 02:32:01 2020 +0800
Support RT 5.0 and update docs accordingly
diff --git a/META.yml b/META.yml
index cc8f15e..ed65e37 100644
--- a/META.yml
+++ b/META.yml
@@ -27,4 +27,4 @@ resources:
version: '1.01'
x_module_install_rtx_version: '0.42'
x_requires_rt: 4.0.0
-x_rt_too_new: 4.6.0
+x_rt_too_new: 5.2.0
diff --git a/Makefile.PL b/Makefile.PL
index 9587c2d..dd124d1 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -28,7 +28,7 @@ substitute(
);
requires_rt '4.0.0';
-rt_too_new '4.6.0';
+rt_too_new '5.2.0';
sign;
WriteAll;
diff --git a/README b/README
index 4b67525..bc06aa2 100644
--- a/README
+++ b/README
@@ -41,7 +41,7 @@ INSTALLATION
If you are upgrading this module, check for upgrading instructions
in case changes need to be made to your database.
- 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::NonWatcherRecipients');
diff --git a/lib/RT/Extension/NonWatcherRecipients.pm b/lib/RT/Extension/NonWatcherRecipients.pm
index 14816c4..ee831cd 100644
--- a/lib/RT/Extension/NonWatcherRecipients.pm
+++ b/lib/RT/Extension/NonWatcherRecipients.pm
@@ -55,7 +55,7 @@ in your database.
If you are upgrading this module, check for upgrading instructions
in case changes need to be made to your database.
-=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:
diff --git a/lib/RT/Extension/NonWatcherRecipients/Test.pm.in b/lib/RT/Extension/NonWatcherRecipients/Test.pm.in
index 3df0994..a1c9369 100644
--- a/lib/RT/Extension/NonWatcherRecipients/Test.pm.in
+++ b/lib/RT/Extension/NonWatcherRecipients/Test.pm.in
@@ -2,7 +2,7 @@ use strict;
use warnings;
### after: use lib qw(@RT_LIB_PATH@);
-use lib qw(/opt/rt4/local/lib /opt/rt4/lib);
+use lib qw(/opt/rt5/local/lib /opt/rt5/lib);
package RT::Extension::NonWatcherRecipients::Test;
commit 01d4ced122d856e1b345a473028a6c22013c5d70
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jul 28 02:38:08 2020 +0800
Add "." to @INC for perl 5.26+
diff --git a/Makefile.PL b/Makefile.PL
index dd124d1..67ee015 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,4 @@
+use lib '.';
use inc::Module::Install;
RTx 'RT-Extension-NonWatcherRecipients';
commit 10a3f68e8bc88b9cfcd40bb3b9e98125b8dc4ba6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jul 28 02:38:28 2020 +0800
Update copyright year to 2020
diff --git a/README b/README
index bc06aa2..ffb735e 100644
--- a/README
+++ b/README
@@ -96,7 +96,7 @@ BUGS
L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-NonWatcherRecipients>.
LICENSE AND COPYRIGHT
- This software is Copyright (c) 2013-2016 by Best Practical Solutions,
+ This software is Copyright (c) 2013-2020 by Best Practical Solutions,
LLC
This is free software, licensed under:
diff --git a/lib/RT/Extension/NonWatcherRecipients.pm b/lib/RT/Extension/NonWatcherRecipients.pm
index ee831cd..2025002 100644
--- a/lib/RT/Extension/NonWatcherRecipients.pm
+++ b/lib/RT/Extension/NonWatcherRecipients.pm
@@ -191,7 +191,7 @@ or via the web at
=head1 LICENSE AND COPYRIGHT
-This software is Copyright (c) 2013-2016 by Best Practical Solutions, LLC
+This software is Copyright (c) 2013-2020 by Best Practical Solutions, LLC
This is free software, licensed under:
commit 9a78197187a13b5fa02588ca8df4b57e693724da
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jul 28 02:39:32 2020 +0800
Prep 1.02
diff --git a/Changes b/Changes
index 8d56aa0..5ac3ae8 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+1.02 2020-07-27
+ - Add RT 5 support
+
1.01 2016-06-07
- Packaging updates
- Compatibility with RT 4.4.x
diff --git a/META.yml b/META.yml
index ed65e37..2d55365 100644
--- a/META.yml
+++ b/META.yml
@@ -24,7 +24,7 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
repository: https://github.com/bestpractical/rt-extension-nonwatcherrecipients
-version: '1.01'
+version: '1.02'
x_module_install_rtx_version: '0.42'
x_requires_rt: 4.0.0
x_rt_too_new: 5.2.0
diff --git a/lib/RT/Extension/NonWatcherRecipients.pm b/lib/RT/Extension/NonWatcherRecipients.pm
index 2025002..6149bfa 100644
--- a/lib/RT/Extension/NonWatcherRecipients.pm
+++ b/lib/RT/Extension/NonWatcherRecipients.pm
@@ -2,7 +2,7 @@ use strict;
use warnings;
package RT::Extension::NonWatcherRecipients;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
=head1 NAME
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list