[Bps-public-commit] RT-Extension-Captcha branch, master, updated. 1.20

Alex Vandiver alexmv at bestpractical.com
Wed Dec 31 14:16:29 EST 2014


The branch, master has been updated
       via  ef7817735011c3db78494b21512ab20988a67db7 (commit)
       via  c409452688e248255b7bdc297a452a372de29f91 (commit)
      from  fa5e03a6eb628143a702e43f15bb72d700200051 (commit)

Summary of changes:
 CHANGES                        |  3 +++
 META.yml                       | 10 +++++-----
 Makefile.PL                    |  8 ++++----
 README                         | 14 ++++----------
 inc/Module/Install.pm          |  6 +++++-
 inc/Module/Install/Base.pm     |  2 +-
 inc/Module/Install/Can.pm      |  2 +-
 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      |  2 +-
 inc/Module/Install/Win32.pm    |  2 +-
 inc/Module/Install/WriteAll.pm |  2 +-
 lib/RT/Extension/Captcha.pm    | 27 ++++++---------------------
 15 files changed, 36 insertions(+), 50 deletions(-)

- Log -----------------------------------------------------------------
commit c409452688e248255b7bdc297a452a372de29f91
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 31 14:14:58 2014 -0500

    Switch to the RT 4.2 style of adding new rights

diff --git a/lib/RT/Extension/Captcha.pm b/lib/RT/Extension/Captcha.pm
index caea5c9..409b02e 100644
--- a/lib/RT/Extension/Captcha.pm
+++ b/lib/RT/Extension/Captcha.pm
@@ -84,18 +84,9 @@ for the module for full list of options.
 
 =cut
 
-use RT::Queue;
-$RT::Queue::RIGHTS->{'NoCaptchaOnCreate'} = "Don't ask user to solve a CAPTCHA on ticket create"; #loc_pair
-$RT::Queue::RIGHTS->{'NoCaptchaOnUpdate'} = "Don't ask user to solve a CAPTCHA on ticket reply or comment"; #loc_pair
-
-if ($RT::Queue::RIGHT_CATEGORIES) {
-    $RT::Queue::RIGHT_CATEGORIES->{"NoCaptchaOn$_"} = 'Staff'
-        for qw(Create Update);
-}
-
-use RT::ACE;
-$RT::ACE::LOWERCASERIGHTNAMES{ lc $_ } = $_
-    foreach qw(NoCaptchaOnCreate NoCaptchaOnUpdate);
+require RT::Queue;
+RT::Queue->AddRight( Staff => NoCaptchaOnCreate => "Don't ask user to solve a CAPTCHA on ticket create" ); #loc_pair
+RT::Queue->AddRight( Staff => NoCaptchaOnUpdate => "Don't ask user to solve a CAPTCHA on ticket reply or comment" ); #loc_pair
 
 =head1 AUTHOR
 

commit ef7817735011c3db78494b21512ab20988a67db7
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 31 14:15:58 2014 -0500

    Version 1.20 releng

diff --git a/CHANGES b/CHANGES
index 1fc9a86..9777252 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1.20 2014-12-31
+ - Bump dependency to 4.2
+
 1.00 2014-12-15
  - Packaging and documentation updates
 
diff --git a/META.yml b/META.yml
index 798fa5e..dd291fb 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.12'
+generated_by: 'Module::Install version 1.14'
 license: gpl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,10 +21,10 @@ no_index:
     - inc
 requires:
   GD::SecurityImage: 0
-  perl: 5.8.3
+  perl: 5.10.1
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: '1.00'
+  repository: https://github.com/bestpractical/rt-extension-captcha
+version: '1.20'
 x_module_install_rtx_version: '0.36'
-x_requires_rt: 4.0.0
-x_rt_too_new: 4.2.0
+x_requires_rt: 4.2.0
diff --git a/Makefile.PL b/Makefile.PL
index 52898e7..05f3205 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,11 +1,11 @@
 use inc::Module::Install;
 
-RTx         'RT-Extension-Captcha';
+RTx 'RT-Extension-Captcha';
 
-requires_rt '4.0.0';
-rt_too_new '4.2.0';
+requires_rt '4.2.0';
 requires 'GD::SecurityImage';
 
+repository 'https://github.com/bestpractical/rt-extension-captcha';
+
 sign();
 WriteAll();
-
diff --git a/README b/README
index 86e800a..eae57f7 100644
--- a/README
+++ b/README
@@ -2,9 +2,9 @@ NAME
     RT::Extension::Captcha - solve a CAPTCHA before some actions in RT
 
 DESCRIPTION
-    This extension is for RT 3.8.1 or newer. It requires solving captchas
-    when a user creates a ticket (using either regular interface or quick
-    create) and on replies/comments (updates).
+    This extension is for RT 4.2 or newer. It requires solving captchas when
+    a user creates a ticket (using either regular interface or quick create)
+    and on replies/comments (updates).
 
 INSTALLATION
     perl Makefile.PL
@@ -13,16 +13,10 @@ INSTALLATION
         May need root permissions
 
     Edit your /opt/rt4/etc/RT_SiteConfig.pm
-        If you are using RT 4.2 or greater, add this line:
+        Add this line:
 
             Plugin('RT::Extension::Captcha');
 
-        For RT 4.0, add this line:
-
-            Set(@Plugins, qw(RT::Extension::Captcha));
-
-        or add RT::Extension::Captcha to your existing @Plugins line.
-
     Clear your mason cache
             rm -rf /opt/rt4/var/mason_data/obj
 
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 5460dd5..ff767fa 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.12';
+	$VERSION = '1.14';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -378,6 +378,7 @@ eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 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;
@@ -386,6 +387,7 @@ 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;
@@ -416,6 +418,7 @@ eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
 	local *FH;
 	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
+	binmode FH;
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
@@ -425,6 +428,7 @@ END_NEW
 sub _write {
 	local *FH;
 	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
+	binmode FH;
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index f9bf5de..4206347 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.12';
+	$VERSION = '1.14';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index b4e5e3b..9929b1b 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.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 54f14fb..3d8de76 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.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index 7224cff..f274f87 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.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 81cddd5..66993af 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.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 2c66b1e..e547fa0 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.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 73e7245..1b55bfa 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -123,7 +123,7 @@ install ::
         $has_etc{acl}++;
     }
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
-    if ( grep { /\d+\.\d+(\.\d+)?.*$/ } glob('etc/upgrade/*.*') ) {
+    if ( grep { /\d+\.\d+\.\d+.*$/ } glob('etc/upgrade/*.*.*') ) {
         $has_etc{upgrade}++;
     }
 
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index e48c32d..9706e5f 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.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 409ef40..dbedc00 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.12';
+	$VERSION = '1.14';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
diff --git a/lib/RT/Extension/Captcha.pm b/lib/RT/Extension/Captcha.pm
index 409b02e..9de8499 100644
--- a/lib/RT/Extension/Captcha.pm
+++ b/lib/RT/Extension/Captcha.pm
@@ -4,7 +4,7 @@ use 5.008003;
 use strict;
 use warnings;
 
-our $VERSION = '1.00';
+our $VERSION = '1.20';
 
 use GD::SecurityImage;
 
@@ -14,7 +14,7 @@ RT::Extension::Captcha - solve a CAPTCHA before some actions in RT
 
 =head1 DESCRIPTION
 
-This extension is for RT 3.8.1 or newer.  It requires solving captchas
+This extension is for RT 4.2 or newer.  It requires solving captchas
 when a user creates a ticket (using either regular interface or quick
 create) and on replies/comments (updates).
 
@@ -32,16 +32,10 @@ May need root permissions
 
 =item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
 
-If you are using RT 4.2 or greater, add this line:
+Add this line:
 
     Plugin('RT::Extension::Captcha');
 
-For RT 4.0, add this line:
-
-    Set(@Plugins, qw(RT::Extension::Captcha));
-
-or add C<RT::Extension::Captcha> to your existing C<@Plugins> line.
-
 =item Clear your mason cache
 
     rm -rf /opt/rt4/var/mason_data/obj

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


More information about the Bps-public-commit mailing list