[Bps-public-commit] RT-Extension-ExtractCustomFieldValues branch, master, updated. 3.10-1-g624030f

Alex Vandiver alexmv at bestpractical.com
Tue Jun 17 14:30:56 EDT 2014


The branch, master has been updated
       via  624030f9dc166f14fc6667a0b5c8331fe1b38fe8 (commit)
      from  f3bad7084e1cdd0421e30b0163c117029a7d712a (commit)

Summary of changes:
 .gitignore                                   |   1 +
 Changes                                      | 131 ++++++++++++++-------------
 META.yml                                     |   4 +-
 README                                       |   8 +-
 inc/Module/Install.pm                        |   2 +-
 inc/Module/Install/Base.pm                   |   2 +-
 inc/Module/Install/Can.pm                    |   2 +-
 inc/Module/Install/Fetch.pm                  |   2 +-
 inc/Module/Install/Makefile.pm               |   2 +-
 inc/Module/Install/Metadata.pm               |   2 +-
 inc/Module/Install/RTx.pm                    |  69 ++++++++------
 inc/Module/Install/Win32.pm                  |   2 +-
 inc/Module/Install/WriteAll.pm               |   2 +-
 lib/RT/Extension/ExtractCustomFieldValues.pm |  13 ++-
 14 files changed, 132 insertions(+), 110 deletions(-)

- Log -----------------------------------------------------------------
commit 624030f9dc166f14fc6667a0b5c8331fe1b38fe8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jun 17 00:16:57 2014 -0400

    Releng 3.11

diff --git a/.gitignore b/.gitignore
index cab9d8b..5500041 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ pm_to_blib
 *.old
 blib
 RT-Extension-ExtractCustomFieldValues-*
+/MYMETA.*
diff --git a/Changes b/Changes
index 91550fc..a3e9443 100644
--- a/Changes
+++ b/Changes
@@ -1,94 +1,95 @@
-3.10    Thu Oct  3 13:48:17 EDT 2013
-* Fix example template to pass the template compiler check
-* Strip leading and trailing spaces when parsing template lines
+3.11 2014-06-17
+ - Packaging updates
 
-3.09    Tue Jul 30 20:04:08 PDT 2013
-* Re-release 3.08 aftering fixing PAUSE permissions
+3.10 2013-10-03
+ - Fix example template to pass the template compiler check
+ - Strip leading and trailing spaces when parsing template lines
 
-3.08    Tue Jul 30 17:51:30 PDT 2013
-* Add a '+' option to capture multiple values (thanks to Kevin Riggle)
-* Add an explicit license
+3.09 2013-07-30
+ - Re-release 3.08 aftering fixing PAUSE permissions
 
-3.07
+3.08 2013-07-30
+ - Add a '+' option to capture multiple values (thanks to Kevin Riggle)
+ - Add an explicit license
 
-Compatibility tweaks for RT4
+3.07 2011-05-17
+ - Compatibility tweaks for RT4
 
-3.06
+3.06 2010-03-30
+ - New 'Extract Custom Field Values With Code in Template' action that
+   allows your ExtractCustomFieldValues template to contain Text::Template
+   code in case your template needs to be dynamic.
 
-New 'Extract Custom Field Values With Code in Template' action
-that allows your ExtractCustomFieldValues template to contain 
-Text::Template code in case your template needs to be dynamic.
+3.05 2009-09-17
+ - doc updates
+ - get rid of uninit warnings
 
-3.05
-doc updates
-get rid of uninit warnings
+3.04 2009-08-06
+ - packaging release
 
-3.04
-packaging release
+3.03 2009-08-06
+ - Add feature to search all of the headers of a mail, rather than just a
+   specific header.
 
-3.03
-Add feature to search all of the headers of a mail, rather than
-just a specific header.
+3.02 2009-07-27
+ - Parse text/html part if it's the only part in an email
+ - Don't run callback on negative matches
 
-3.02
-Parse text/html part if it's the only part in an email
-Don't run callback on negative matches
+3.01 2009-07-01
+ - Fix signature
 
-3.01
-Fix signature
+3.00 2009-07-01
+ - Release updated parser from 2.99 dev releases
 
-3.00
-Release updated parser from 2.99 dev releases
+2.99_02 2009-05-28
+ - If you specified an invalid CF in your template or used the match-any-cf
+   option and your regex matched something that wasn't a CF name, the Scrip
+   would die before completing
 
-2.99_02
-If you specified an invalid CF in your template or used the
-match-any-cf option and your regex matched something that wasn't
-a CF name, the Scrip would die before completing
+2.99_01 2009-03-12
+ - Rewrite to use method calls, not functions, and support extraction from
+   _all_ text/plain MIME parts, not just the first.
 
-2.99_01
-Rewrite to use method calls, not functions, and support extraction
-from _all_ text/plain MIME parts, not just the first.
+2.05 2009-03-12
+ - Previous versions could find disabled versions of custon fields if they
+   had duplicate names.  Work around this by not using LoadByNameAndQueue.
 
-2.05
-Previous versions could find disabled versions of custon fields if
-they had duplicate names.  Work around this by not using
-LoadByNameAndQueue.
+2.0 2008-12-17
+ - Fix initialdata quoting
 
-2.0
-Fix initialdata quoting
+1.9 2008-12-15
+ - Add wildcard functionality
+ - Documentation and example fixups
 
-1.9
-Add wildcard functionality
-Documentation and example fixups
+1.8 2008-10-31
+ - Bump Module::Install::RTx version
 
-1.8
-Bump Module::Install::RTx version
+1.7 2007-06-04
+ - Minor code cleanups
+ - More logging
+ - Warnings
 
-1.7
-Minor code cleanups
-More logging
-Warnings
+1.6 2007-04-18
+ - Added support for running code on a match without updating a custom
+   field.
+ - Refactor the Action code to handle this case.
 
-1.6
-Added support for running code on a match without updating a custom field.
-Refactor the Action code to handle this case.
-
-Best Practical local:
-* Converted to RTx module.
+1.3
+ - First release from Best Practical
 
 1.2b1
-added support for multiple value custom fields (values sep. by ",")
-(Thanks to Steven Turner, MIT)
+ - Added support for multiple value custom fields (values sep. by ",")
+   (Thanks to Steven Turner, MIT)
 
 1.1b3
-corrected a typo, which reappeared from a temporary version
-
-1.1b2
-added Command to change the Separator througout the template
+ - corrected a typo, which reappeared from a temporary version
 
 1.1b1
-added Option "q" for not recording transactions
+ - added Option "q" for not recording transactions
+
+1.1b2
+ - added Command to change the Separator througout the template
 
 1.0b2
-fixed a bug, when called for a transaction without Attachment
+ - fixed a bug, when called for a transaction without Attachment
 
diff --git a/META.yml b/META.yml
index adf6c28..5d27efa 100644
--- a/META.yml
+++ b/META.yml
@@ -8,7 +8,7 @@ configure_requires:
   ExtUtils::MakeMaker: 6.36
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.06'
+generated_by: 'Module::Install version 1.08'
 license: gpl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,4 +20,4 @@ no_index:
     - inc
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 3.10
+version: '3.11'
diff --git a/README b/README
index d4dbf04..a054611 100644
--- a/README
+++ b/README
@@ -23,7 +23,11 @@ INSTALLATION
         in case changes need to be made to your database.
 
     Edit your /opt/rt4/etc/RT_SiteConfig.pm
-        Add this line:
+        If you are using RT 4.2 or greater, add this line:
+
+            Plugin('RT::Extension::ExtractCustomFieldValues');
+
+        For RT 4.0, add this line:
 
             Set(@Plugins, qw(RT::Extension::ExtractCustomFieldValues));
 
@@ -114,7 +118,7 @@ SUPPORT
     <sales at bestpractical.com>.
 
 LICENSE AND COPYRIGHT
-    This software is Copyright (c) 2007-2013 by Best Practical Solutions,
+    This software is Copyright (c) 2007-2014 by Best Practical Solutions,
     LLC.
 
     This is free software, licensed under:
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 4ecf46b..7680c84 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.06';
+	$VERSION = '1.08';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 802844a..3e63345 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.06';
+	$VERSION = '1.08';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 22167b8..93f248d 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index bee0c4f..ecc0d53 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 7052f36..c0978a4 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 58430f3..e4112f8 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index ac04c79..f9ead18 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.32';
+our $VERSION = '0.34';
 
 use FindBin;
 use File::Glob     ();
@@ -88,6 +88,11 @@ sub RTx {
             ."Upgrade to RT 3.8.1 or newer.\n" if $RT::VERSION =~ /^3\.8\.0/;
         $path{$_} = $RT::LocalPluginPath . "/$original_name/$_"
             foreach @DIRS;
+
+        # Copy RT 4.2.0 static files into NoAuth; insufficient for
+        # images, but good enough for css and js.
+        $path{static} = "$path{html}/NoAuth/"
+            unless $RT::StaticPath;
     } else {
         foreach ( @DIRS ) {
             no strict 'refs';
@@ -136,7 +141,9 @@ install ::
         $has_etc{acl}++;
     }
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
-    if ( -d 'etc/upgrade/' )    { $has_etc{upgrade}++; }
+    if ( grep { /\d+\.\d+\.\d+.*$/ } glob('etc/upgrade/*.*.*') ) {
+        $has_etc{upgrade}++;
+    }
 
     $self->postamble("$postamble\n");
     unless ( $subdirs{'lib'} ) {
@@ -174,46 +181,50 @@ install ::
     }
 }
 
-# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
-{ my %word = (
-    a     => -4,
-    alpha => -4,
-    b     => -3,
-    beta  => -3,
-    pre   => -2,
-    rc    => -1,
-    head  => 9999,
-);
-sub cmp_version($$) {
-    my ($a, $b) = (@_);
-    my @a = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
-        split /([^0-9]+)/, $a;
-    my @b = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
-        split /([^0-9]+)/, $b;
-    @a > @b
-        ? push @b, (0) x (@a- at b)
-        : push @a, (0) x (@b- at a);
-    for ( my $i = 0; $i < @a; $i++ ) {
-        return $a[$i] <=> $b[$i] if $a[$i] <=> $b[$i];
-    }
-    return 0;
-}}
 sub requires_rt {
     my ($self,$version) = @_;
 
     # if we're exactly the same version as what we want, silently return
     return if ($version eq $RT::VERSION);
 
-    my @sorted = sort cmp_version $version,$RT::VERSION;
+    _load_rt_handle();
+    my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
 
     if ($sorted[-1] eq $version) {
         # should we die?
-        warn "\nWarning: prerequisite RT $version not found. Your installed version of RT ($RT::VERSION) is too old.\n\n";
+        die "\nWarning: prerequisite RT $version not found. Your installed version of RT ($RT::VERSION) is too old.\n\n";
+    }
+}
+
+sub rt_too_new {
+    my ($self,$version,$msg) = @_;
+    $msg ||= "Your version %s is too new, this extension requires a release of RT older than %s\n";
+
+    _load_rt_handle();
+    my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
+
+    if ($sorted[0] eq $version) {
+        die sprintf($msg,$RT::VERSION,$version);
+    }
+}
+
+# RT::Handle runs FinalizeDatabaseType which calls RT->Config->Get
+# On 3.8, this dies.  On 4.0/4.2 ->Config transparently runs LoadConfig.
+# LoadConfig requires being able to read RT_SiteConfig.pm (root) so we'd
+# like to avoid pushing that on users.
+# Fake up just enough Config to let FinalizeDatabaseType finish, and
+# anyone later calling LoadConfig will overwrite our shenanigans.
+sub _load_rt_handle {
+    unless ($RT::Config) {
+        require RT::Config;
+        $RT::Config = RT::Config->new;
+        RT->Config->Set('DatabaseType','mysql');
     }
+    require RT::Handle;
 }
 
 1;
 
 __END__
 
-#line 336
+#line 367
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index eeaa3fe..e529382 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 85d8018..2c74308 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.06';
+	$VERSION = '1.08';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
diff --git a/lib/RT/Extension/ExtractCustomFieldValues.pm b/lib/RT/Extension/ExtractCustomFieldValues.pm
index 27d17f2..f67e8f5 100644
--- a/lib/RT/Extension/ExtractCustomFieldValues.pm
+++ b/lib/RT/Extension/ExtractCustomFieldValues.pm
@@ -9,7 +9,7 @@ RT::Extension::ExtractCustomFieldValues - extract CF values from email headers o
 
 =cut
 
-our $VERSION = '3.10';
+our $VERSION = '3.11';
 
 1;
 
@@ -43,11 +43,16 @@ in case changes need to be made to your database.
 
 =item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
 
-Add this line:
+If you are using RT 4.2 or greater, add this line:
+
+    Plugin('RT::Extension::ExtractCustomFieldValues');
+
+For RT 4.0, add this line:
 
     Set(@Plugins, qw(RT::Extension::ExtractCustomFieldValues));
 
-or add C<RT::Extension::ExtractCustomFieldValues> to your existing C<@Plugins> line.
+or add C<RT::Extension::ExtractCustomFieldValues> to your existing
+C<@Plugins> line.
 
 =item Restart your webserver
 
@@ -154,7 +159,7 @@ E<lt>sales at bestpractical.comE<gt>.
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2007-2013 by Best Practical Solutions, LLC.
+This software is Copyright (c) 2007-2014 by Best Practical Solutions, LLC.
 
 This is free software, licensed under:
 

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


More information about the Bps-public-commit mailing list