[Catalyst-commits] r11741 - in Catalyst-Plugin-RequireSSL/branches/module-install: . t xt xt/author

norbi at dev.catalyst.perl.org norbi at dev.catalyst.perl.org
Wed Nov 4 19:50:28 GMT 2009


Author: norbi
Date: 2009-11-04 19:50:27 +0000 (Wed, 04 Nov 2009)
New Revision: 11741

Added:
   Catalyst-Plugin-RequireSSL/branches/module-install/xt/
   Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/
   Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/02pod.t
   Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/03podcoverage.t
   Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.rc
   Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.t
Removed:
   Catalyst-Plugin-RequireSSL/branches/module-install/Build.PL
   Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST
   Catalyst-Plugin-RequireSSL/branches/module-install/META.yml
   Catalyst-Plugin-RequireSSL/branches/module-install/t/02pod.t
   Catalyst-Plugin-RequireSSL/branches/module-install/t/03podcoverage.t
   Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.rc
   Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.t
Modified:
   Catalyst-Plugin-RequireSSL/branches/module-install/
   Catalyst-Plugin-RequireSSL/branches/module-install/Changes
   Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST.SKIP
   Catalyst-Plugin-RequireSSL/branches/module-install/Makefile.PL
   Catalyst-Plugin-RequireSSL/branches/module-install/README
Log:
 r11782 at vger:  mendel | 2009-11-04 20:39:53 +0100
 Converted to Module::Install.



Property changes on: Catalyst-Plugin-RequireSSL/branches/module-install
___________________________________________________________________
Name: svk:merge
   - cf8fe1c1-d5c0-41b4-84a9-31cb5e8e0cbe:/local/catalyst/Catalyst-Plugin-RequireSSL:11768
   + 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Plugin-RequireSSL/trunk:11736
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Plugin-RequireSSL:11732
cf8fe1c1-d5c0-41b4-84a9-31cb5e8e0cbe:/local/catalyst/Catalyst-Plugin-RequireSSL:11768
cf8fe1c1-d5c0-41b4-84a9-31cb5e8e0cbe:/local/catalyst/Catalyst-Plugin-RequireSSL/branches/module-install:11782

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/Build.PL
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/Build.PL	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/Build.PL	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,14 +0,0 @@
-use strict;
-use Module::Build;
-
-my $build = Module::Build->new(
-    create_makefile_pl => 'passthrough',
-    license            => 'perl',
-    module_name        => 'Catalyst::Plugin::RequireSSL',
-    requires           => { 'Catalyst' => '5.23' },
-    create_makefile_pl => 'passthrough',
-    test_files   => [
-        glob('t/*.t') 
-    ]
-);
-$build->create_build_script;

Modified: Catalyst-Plugin-RequireSSL/branches/module-install/Changes
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/Changes	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/Changes	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,6 +1,7 @@
 Revision history for Perl extension Catalyst::Plugin::RequireSSL
 
 0.07
+	- Converted to use Module::Install instead of Module::Build.
         - Removed unused 'default' method from the app (triggered a deprecation warning).
         - Fix Perl Critic test for hard tabs (t0m)
         - Fix POD coverage (t0m)

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,17 +0,0 @@
-Build.PL
-Changes
-lib/Catalyst/Plugin/RequireSSL.pm
-Makefile.PL
-MANIFEST			This list of files
-META.yml
-README
-t/01use.t
-t/02pod.t
-t/03podcoverage.t
-t/04ssl.t
-t/05ssl_host.t
-t/06remain_in_ssl.t
-t/07no_cache.t
-t/08detach_on_redirect.t
-t/lib/TestApp.pm
-t/lib/TestApp/Controller/SSL.pm

Modified: Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST.SKIP
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST.SKIP	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/MANIFEST.SKIP	2009-11-04 19:50:27 UTC (rev 11741)
@@ -3,6 +3,7 @@
 \bCVS\b
 ,v$
 \B\.svn\b
+\B\.git\b
 
 # Avoid Makemaker generated and utility files.
 \bMakefile$
@@ -23,3 +24,19 @@
 \.bak$
 \#$
 \b\.#
+\.DS_Store$
+
+# Avoid Apache::Test files
+t/conf/apache_test_config.pm
+t/conf/extra.conf$
+t/conf/httpd.conf
+t/conf/mime.types
+t/htdocs
+t/logs
+t/var
+
+# No tarballs!
+\.gz$
+
+# Skip the roadmap
+lib/Catalyst/ROADMAP.pod

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/META.yml
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/META.yml	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/META.yml	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,19 +0,0 @@
----
-name: Catalyst-Plugin-RequireSSL
-version: 0.06
-author:
-  - 'Andy Grundman, <andy at hybridized.org>'
-abstract: Force SSL mode on select pages
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
-requires:
-  Catalyst: 5.23
-provides:
-  Catalyst::Plugin::RequireSSL:
-    file: lib/Catalyst/Plugin/RequireSSL.pm
-    version: 0.06
-generated_by: Module::Build version 0.2806
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2

Modified: Catalyst-Plugin-RequireSSL/branches/module-install/Makefile.PL
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/Makefile.PL	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/Makefile.PL	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,31 +1,38 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
-    
-    unless (eval "use Module::Build::Compat 0.02; 1" ) {
-      print "This module requires Module::Build to install itself.\n";
-      
-      require ExtUtils::MakeMaker;
-      my $yn = ExtUtils::MakeMaker::prompt
-	('  Install Module::Build now from CPAN?', 'y');
-      
-      unless ($yn =~ /^y/i) {
-	die " *** Cannot install without Module::Build.  Exiting ...\n";
-      }
-      
-      require Cwd;
-      require File::Spec;
-      require CPAN;
-      
-      # Save this 'cause CPAN will chdir all over the place.
-      my $cwd = Cwd::cwd();
-      
-      CPAN::Shell->install('Module::Build::Compat');
-      CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
-	or die "Couldn't install Module::Build, giving up.\n";
-      
-      chdir $cwd or die "Cannot chdir() back to $cwd: $!";
-    }
-    eval "use Module::Build::Compat 0.02; 1" or die $@;
-    
-    Module::Build::Compat->run_build_pl(args => \@ARGV);
-    require Module::Build;
-    Module::Build::Compat->write_makefile(build_class => 'Module::Build');
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use inc::Module::Install 0.91;
+
+use Module::Install::ReadmeFromPod 0.06;
+use Module::Install::AuthorRequires 0.02;
+use Module::Install::Repository 0.06;
+use Module::Install::ExtraTests 0.006;
+
+name 'Catalyst-Plugin-RequireSSL';
+all_from 'lib/Catalyst/Plugin/RequireSSL.pm';
+readme_from 'lib/Catalyst/Plugin/RequireSSL.pm';
+auto_set_repository;
+
+requires 'Catalyst' => '5.23';
+requires 'NEXT';
+requires 'base';
+
+test_requires 'Test::More';
+test_requires 'lib';
+test_requires 'Data::Dumper';
+test_requires 'FindBin';
+test_requires 'File::Spec';
+test_requires 'Catalyst::Test';
+test_requires 'HTTP::Request::Common';
+
+author_requires 'Test::Pod' => '1.14';
+author_requires 'Test::Pod::Coverage' => '1.04';
+author_requires 'Test::Perl::Critic' => '1.01';
+
+extra_tests;
+
+auto_install;
+
+WriteAll;

Modified: Catalyst-Plugin-RequireSSL/branches/module-install/README
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/README	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/README	2009-11-04 19:50:27 UTC (rev 11741)
@@ -10,6 +10,8 @@
             https => 'secure.mydomain.com',
             http => 'www.mydomain.com',
             remain_in_ssl => 0,
+            no_cache => 0,
+            detach_on_redirect => 1,
         };
 
         # in any controller methods that should be secured
@@ -37,22 +39,35 @@
     values:
 
         https => $ssl_host
-    
+
     If your SSL domain name is different from your non-SSL domain, set this
     value.
 
         http => $non_ssl_host
-    
+
     If you have set the https value above, you must also set the hostname of
     your non-SSL server.
 
         remain_in_ssl
-    
+
     If you'd like your users to remain in SSL mode after visiting an
     SSL-required page, you can set this option to 1. By default, this option
     is disabled and users will be redirected back to non-SSL mode as soon as
     possible.
 
+        no_cache
+
+    If you have a wildcard certificate you will need to set this option if
+    you are using multiple domains on one instance of Catalyst.
+
+        detach_on_redirect
+
+    By default "$c->require_ssl" only calls "$c->response->redirect" but
+    does not stop request processing (so it returns and subsequent
+    statements are run). This is probably not what you want. If you set this
+    option to a true value "$c->require_ssl" will call "$c->detach" when it
+    redirects.
+
 METHODS
   require_ssl
     Call require_ssl in any controller method you wish to be secured.
@@ -62,6 +77,22 @@
     The browser will be redirected to the same path on your SSL server. POST
     requests are never redirected.
 
+  allow_ssl
+    Call allow_ssl in any controller method you wish to access both in SSL
+    and non-SSL mode.
+
+        $c->allow_ssl;
+
+    The browser will not be redirected, independently of whether the request
+    was made to the SSL or non-SSL server.
+
+  setup
+    Disables this plugin if running under an engine which does not support
+    SSL.
+
+  finalize
+    Performs the redirect to SSL url if required.
+
 KNOWN ISSUES
     When viewing an SSL-required page that uses static files served from the
     Static plugin, the static files are redirected to the non-SSL path.
@@ -76,6 +107,9 @@
 AUTHOR
     Andy Grundman, <andy at hybridized.org>
 
+CONTRIBUTORS
+    Simon Elliott <simon at browsing.co.uk> (support for wildcards)
+
 COPYRIGHT
     This program is free software, you can redistribute it and/or modify it
     under the same terms as Perl itself.

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/t/02pod.t
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/t/02pod.t	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/t/02pod.t	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod 1.14";
-plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_files_ok();

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/t/03podcoverage.t
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/t/03podcoverage.t	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/t/03podcoverage.t	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_coverage_ok();

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.rc
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.rc	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.rc	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,5 +0,0 @@
-include  = CodeLayout::ProhibitHardTabs
-only     = 1
-
-[CodeLayout::ProhibitHardTabs]
-allow_leading_tabs = 0
\ No newline at end of file

Deleted: Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.t
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.t	2009-11-04 19:36:52 UTC (rev 11740)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/t/04critic.t	2009-11-04 19:50:27 UTC (rev 11741)
@@ -1,22 +0,0 @@
-use strict;
-use warnings;
-
-use File::Spec;
-use FindBin ();
-use Test::More;
-
-if ( !-e "$FindBin::Bin/../MANIFEST.SKIP" ) {
-    plan skip_all => 'Critic test only for developers.';
-}
-else {
-    eval { require Test::Perl::Critic };
-    if ( $@ ) {
-        plan tests => 1;
-        fail( 'You must install Test::Perl::Critic to run 04critic.t' );
-        exit;
-    }
-}
-
-my $rcfile = File::Spec->catfile( 't', '04critic.rc' );
-Test::Perl::Critic->import( -profile => $rcfile );
-all_critic_ok();
\ No newline at end of file

Added: Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/02pod.t
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/02pod.t	                        (rev 0)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/02pod.t	2009-11-04 19:50:27 UTC (rev 11741)
@@ -0,0 +1,11 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();

Added: Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/03podcoverage.t
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/03podcoverage.t	                        (rev 0)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/03podcoverage.t	2009-11-04 19:50:27 UTC (rev 11741)
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+# Ensure a recent version of Test::Pod::Coverage
+my $min_tpc = 1.08;
+eval "use Test::Pod::Coverage $min_tpc";
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
+    if $@;
+
+# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
+# but older versions don't recognize some common documentation styles
+my $min_pc = 0.18;
+eval "use Pod::Coverage $min_pc";
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
+    if $@;
+
+all_pod_coverage_ok();

Added: Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.rc
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.rc	                        (rev 0)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.rc	2009-11-04 19:50:27 UTC (rev 11741)
@@ -0,0 +1,5 @@
+include  = CodeLayout::ProhibitHardTabs
+only     = 1
+
+[CodeLayout::ProhibitHardTabs]
+allow_leading_tabs = 0
\ No newline at end of file

Added: Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.t
===================================================================
--- Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.t	                        (rev 0)
+++ Catalyst-Plugin-RequireSSL/branches/module-install/xt/author/04critic.t	2009-11-04 19:50:27 UTC (rev 11741)
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+use File::Spec;
+use FindBin ();
+use Test::More;
+
+eval { require Test::Perl::Critic };
+if ( $@ ) {
+    plan tests => 1;
+    fail( 'You must install Test::Perl::Critic to run 04critic.t' );
+    exit;
+}
+
+my $rcfile = File::Spec->catfile( $FindBin::Bin, '04critic.rc' );
+Test::Perl::Critic->import( -profile => $rcfile );
+all_critic_ok();




More information about the Catalyst-commits mailing list