[Bps-public-commit] rt-authen-oauth2 branch, master, updated. 9834b0aa457c30c27303ff99ae749c7ea725d5ec

? sunnavy sunnavy at bestpractical.com
Wed Mar 28 13:19:15 EDT 2018


The branch, master has been updated
       via  9834b0aa457c30c27303ff99ae749c7ea725d5ec (commit)
       via  d69daa55bb999263aa89c9cc4fe3039c67d2b707 (commit)
       via  fe27f8d295a8e33fff652a20e36a39d9f1a40ef9 (commit)
       via  1ddcaee41a0db85e6e7cc7edd4d9bf44ada27e6e (commit)
       via  4be62c8d1adf346da3a569a7e32f9de5c820f2cd (commit)
       via  a7f44bfed904a012330ce91abab599b5b5ae7c5e (commit)
      from  08ddc63602d9d20f9315a7400f0a5562d0ea33f7 (commit)

Summary of changes:
 Changes                             |  2 +-
 MANIFEST                            | 30 ++++++++++++++++++++
 META.yml                            |  8 +++---
 Makefile.PL                         |  2 +-
 README                              | 56 ++++++++++++++-----------------------
 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           | 22 +++++++++++++--
 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/Authen/OAuth2.pm             |  9 ++----
 19 files changed, 111 insertions(+), 97 deletions(-)
 create mode 100644 MANIFEST

- Log -----------------------------------------------------------------
commit a7f44bfed904a012330ce91abab599b5b5ae7c5e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 29 00:09:39 2018 +0800

    Update inc

diff --git a/META.yml b/META.yml
index c6c174c..cac3ff7 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
@@ -26,6 +26,6 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-authen-oauth2
-version: '0.01'
-x_module_install_rtx_version: '0.38'
+version: '0.10'
+x_module_install_rtx_version: '0.40'
 x_requires_rt: 4.4.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 80538d3..7cad529 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.38';
+our $VERSION = '0.40';
 
 use FindBin;
 use File::Glob     ();
@@ -113,11 +113,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})\"
 .
 
@@ -279,4 +297,4 @@ sub _load_rt_handle {
 
 __END__
 
-#line 428
+#line 468
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 3634ee0..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.26';
+$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 4be62c8d1adf346da3a569a7e32f9de5c820f2cd
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 29 00:11:51 2018 +0800

    gplv2 => gpl_2 as the former is not valid value :/

diff --git a/META.yml b/META.yml
index cac3ff7..e7af1b0 100644
--- a/META.yml
+++ b/META.yml
@@ -9,7 +9,7 @@ configure_requires:
 distribution_type: module
 dynamic_config: 1
 generated_by: 'Module::Install version 1.19'
-license: gplv2
+license: gpl_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: 1.4
diff --git a/Makefile.PL b/Makefile.PL
index 1042e96..fb3c90f 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,7 +1,7 @@
 use inc::Module::Install;
 
 RTx     'RT-Authen-OAuth2';
-license 'gplv2';
+license 'gpl_2';
 repository 'https://github.com/bestpractical/rt-authen-oauth2';
 
 requires_rt '4.4.0';

commit 1ddcaee41a0db85e6e7cc7edd4d9bf44ada27e6e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 29 00:18:50 2018 +0800

    Drop documention for 4.0

diff --git a/lib/RT/Authen/OAuth2.pm b/lib/RT/Authen/OAuth2.pm
index 7880a41..23d45b7 100644
--- a/lib/RT/Authen/OAuth2.pm
+++ b/lib/RT/Authen/OAuth2.pm
@@ -41,16 +41,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::Authen::OAuth2');
 
-For RT 4.0, add this line:
-
-    Set(@Plugins, qw(RT::Authen::OAuth2));
-
-or add C<RT::Authen::OAuth2> to your existing C<@Plugins> line.
-
 =item Add / Edit OAuth2 configs found in OAuth2_Config.pm
 
 =item Clear your mason cache

commit fe27f8d295a8e33fff652a20e36a39d9f1a40ef9
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 29 01:10:15 2018 +0800

    Move methods pod to Methods section

diff --git a/lib/RT/Authen/OAuth2.pm b/lib/RT/Authen/OAuth2.pm
index 23d45b7..3fc322a 100644
--- a/lib/RT/Authen/OAuth2.pm
+++ b/lib/RT/Authen/OAuth2.pm
@@ -79,6 +79,7 @@ This is free software, licensed under:
 
 =cut
 
+=head1 METHODS
 
 =head2 C<RequestAuthorization()>
 

commit d69daa55bb999263aa89c9cc4fe3039c67d2b707
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 29 01:10:58 2018 +0800

    Update README

diff --git a/README b/README
index 4f44239..66c54c6 100644
--- a/README
+++ b/README
@@ -18,16 +18,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::Authen::OAuth2');
 
-        For RT 4.0, add this line:
-
-            Set(@Plugins, qw(RT::Authen::OAuth2));
-
-        or add RT::Authen::OAuth2 to your existing @Plugins line.
-
     Add / Edit OAuth2 configs found in OAuth2_Config.pm
     Clear your mason cache
             rm -rf /opt/rt4/var/mason_data/obj
@@ -53,32 +47,24 @@ LICENSE AND COPYRIGHT
 
       The GNU General Public License, Version 2, June 1991
 
-    RequestAuthorization()
-
-            Creates an Authorization Request on behalf of the Resource Owner
-            (user), and initiates the OAuth 2 protocol with the
-            Authorization Server. The browser will redirect to the
-            $OAuthRedirect endpoint specified in the config.
-
-    LogUserIn()
-
-            Called from the $OAuthRedirect endpoint handler element.
-            Validates the user exists and is allowed to log in,
-            auto-populates user metadata returned from the OAuth 2 server,
-            and sets up a session. If successful, returns to the handler
-            template element to redirect to the final destination.
-
-    IDPLoginButtonImage()
-
-            Returns the appropriate login button image for the active OAuth
-            2 server. This is displayed on the RT login page.
-
-POD ERRORS
-    Hey! The above document had some coding errors, which are explained
-    below:
-
-    Around line 87:
-        '=item' outside of any '=over'
-
-        =over without closing =back
+METHODS
+  RequestAuthorization()
+        Creates an Authorization Request on behalf of the Resource Owner
+        (user), and initiates the OAuth 2 protocol with the Authorization
+        Server. The browser will redirect to the $OAuthRedirect endpoint
+        specified in the config.
+
+  LogUserIn()
+        Called from the $OAuthRedirect endpoint handler element. Validates
+        the user exists and is allowed to log in, auto-populates user
+        metadata returned from the OAuth 2 server, and sets up a session. If
+        successful, returns to the handler template element to redirect to
+        the final destination.
+
+  IDPLoginButtonImage()
+        Returns the appropriate login button image for the active OAuth 2
+        server. This is displayed on the RT login page.
+
+  LogOutURL()
+        Returns the appropriate logout URL active OAuth 2 server.
 

commit 9834b0aa457c30c27303ff99ae749c7ea725d5ec
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 29 01:18:00 2018 +0800

    Release 0.10

diff --git a/Changes b/Changes
index c58b8c2..9fc7161 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
 Revision history for RT-Authen-OAuth
 
-0.01 [Release Date]
+0.10 2018-03-28
  - Initial version
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..b2dd8f2
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,30 @@
+Changes
+etc/OAuth2_Config.pm
+html/Callbacks/OAuth/Elements/Login/Default
+html/Callbacks/OAuth/NoAuth/Logout.html/Default
+html/Callbacks/OAuth/NoAuth/Logout.html/ModifyLoginRedirect
+html/NoAuth/OAuth
+html/NoAuth/OAuthRedirect
+inc/Module/Install.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
+inc/Module/Install/RTx.pm
+inc/Module/Install/RTx/Runtime.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+inc/YAML/Tiny.pm
+lib/RT/Authen/OAuth2.pm
+lib/RT/Authen/OAuth2/Google.pm
+lib/RT/Authen/OAuth2/Unimplemented.pm
+LICENSE
+Makefile.PL
+MANIFEST			This list of files
+META.yml
+README
+static/images/btn_auth0_signin.png
+static/images/btn_google_signin_dark_normal_web.png

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


More information about the Bps-public-commit mailing list