[Bps-public-commit] plient branch, master, updated. 7d86f329f2e417e785809d641c5b6ea0962c257a
? sunnavy
sunnavy at bestpractical.com
Tue May 4 20:59:47 EDT 2010
The branch, master has been updated
via 7d86f329f2e417e785809d641c5b6ea0962c257a (commit)
via fcb6a3e8633a0e09a301a5d7ae3a215c2c958ec4 (commit)
via 53edce33e56e67615d4c0f952c3b2fafb5052a1f (commit)
via 890a41a88190de57c9a75d54a332bce5764341da (commit)
from b0411e71a214f018b36b565ef2ae6de323579606 (commit)
Summary of changes:
bin/plient | 3 +--
lib/Plient/Handler/HTTPLite.pm | 5 +++++
t/00.load.t | 20 +++++++++++++-------
t/01.plient.t | 4 ++--
t/http/get.t | 6 +++---
t/http/head.t | 6 +++---
t/http/post.t | 6 +++---
7 files changed, 30 insertions(+), 20 deletions(-)
- Log -----------------------------------------------------------------
commit 890a41a88190de57c9a75d54a332bce5764341da
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 5 08:52:55 2010 +0800
update 00.load.t because we don't maintain MANIFEST any more
diff --git a/t/00.load.t b/t/00.load.t
index 5e77d9f..8861304 100644
--- a/t/00.load.t
+++ b/t/00.load.t
@@ -2,16 +2,22 @@ use Test::More;
use File::Spec::Functions qw/catfile catdir/;
use File::Basename qw( dirname );
-my $manifest = catdir( dirname(__FILE__), '..', 'MANIFEST' );
-plan skip_all => 'MANIFEST does not exist' unless -e $manifest;
-open FH, '<', $manifest;
+use File::Find;
+my @pms;
-my @pms = map { s|^lib/||; chomp; $_ } grep { m|^lib/.*pm$| } <FH>;
+find(
+ sub {
+ return unless -f && /\.pm$/;
+ my $name = $File::Find::name;
+ $name =~ s!.*lib[/\\]!!;
+ $name =~ s![/\\]!::!g;
+ $name =~ s/\.pm$//;
+ push @pms, $name;
+ },
+ 'lib'
+);
plan tests => scalar @pms;
for my $pm (@pms) {
- $pm =~ s|\.pm$||;
- $pm =~ s|/|::|g;
-
use_ok($pm);
}
commit 53edce33e56e67615d4c0f952c3b2fafb5052a1f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 5 08:53:30 2010 +0800
don't use_ok in other tests but 00.load.t
diff --git a/t/01.plient.t b/t/01.plient.t
index 190645b..6845406 100644
--- a/t/01.plient.t
+++ b/t/01.plient.t
@@ -1,9 +1,9 @@
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
-use_ok( 'Plient' );
+use Plient;
ok( Plient->plient_support('File','GET'), 'supports File GET' );
# ok( Plient->available('HTTP','GET'), 'supports HTTP GET' );
diff --git a/t/http/get.t b/t/http/get.t
index f0712be..6647b10 100644
--- a/t/http/get.t
+++ b/t/http/get.t
@@ -1,10 +1,10 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 8;
-use_ok('Plient');
-use_ok('Plient::Test');
+use Plient;
+use Plient::Test;
my $url = start_http_server();
SKIP: {
diff --git a/t/http/head.t b/t/http/head.t
index 71cd466..60d585d 100644
--- a/t/http/head.t
+++ b/t/http/head.t
@@ -1,10 +1,10 @@
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 2;
-use_ok('Plient');
-use_ok('Plient::Test');
+use Plient;
+use Plient::Test;
my $url = start_http_server();
SKIP: {
diff --git a/t/http/post.t b/t/http/post.t
index ad426c8..c88311c 100644
--- a/t/http/post.t
+++ b/t/http/post.t
@@ -1,10 +1,10 @@
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More tests => 4;
-use_ok('Plient');
-use_ok('Plient::Test');
+use Plient;
+use Plient::Test;
my $url = start_http_server();
SKIP: {
commit fcb6a3e8633a0e09a301a5d7ae3a215c2c958ec4
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 5 08:55:50 2010 +0800
don't use HTTPLite if http_proxy needs auth
diff --git a/lib/Plient/Handler/HTTPLite.pm b/lib/Plient/Handler/HTTPLite.pm
index d5d86f5..5b91438 100644
--- a/lib/Plient/Handler/HTTPLite.pm
+++ b/lib/Plient/Handler/HTTPLite.pm
@@ -20,6 +20,11 @@ sub support_method {
return;
}
+ if ( $ENV{http_proxy} && $ENV{http_proxy} =~ /@/ ) {
+ # HTTPLite doesn't support proxy auth
+ return;
+ }
+
return $class->SUPER::support_method(@_);
}
commit 7d86f329f2e417e785809d641c5b6ea0962c257a
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 5 08:59:13 2010 +0800
remove -s shortcut since it conflicts with curl's -s(silent)
diff --git a/bin/plient b/bin/plient
index ac871c0..4154e40 100755
--- a/bin/plient
+++ b/bin/plient
@@ -8,7 +8,7 @@ Plient->import( 'plient', 'plient_support' );
my %args;
-GetOptions( \%args, 'help|h', 'support|s=s', 'request|X=s', 'output|o=s',
+GetOptions( \%args, 'help|h', 'support=s', 'request|X=s', 'output|o=s',
'user|u=s' )
or die 'unknown option';
@@ -16,7 +16,6 @@ my $USAGE =<<EOF;
USAGE: plient URL [ ... ]
EXAMPLES:
plient --support http_get # check is support HTTP GET
- plient -s http_get # ditto
plient http://cpan.org/ # fetch http://cpan.org
plient -o /tmp/cpan.html http://cpan.org/ # write to file
plient -u user:password http://foo.org # use basic auth
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list