Codebase list libcpan-uploader-perl / 8ecd754
* New upstream release * Drop B-D-I on Test::Pod::Coverage Jonathan Yu 14 years ago
12 changed file(s) with 435 addition(s) and 96 deletion(s). Raw diff Collapse all Expand all
00 Revision history for CPAN-Uploader
1
2 0.101260 2010-05-06 22:48:37 America/New_York
3 move config file reading into CPAN::Uploader and out of the bin
4 better error message if no username is provided
5 no longer fails if ~/.pauserc is missing
6 eliminate spurious warnings
17
28 0.100760 2010-03-17 12:14:52 America/New_York
39 fix internal log_debug to not try logging $self (thanks, Chris
88 dist.ini
99 lib/CPAN/Uploader.pm
1010 t/00-load.t
11 t/release-pod-coverage.t
1211 t/release-pod-syntax.t
00 {
1 "resources" : {
2 "repository" : "git://git.codesimply.com/CPAN-Uploader.git"
3 },
4 "meta-spec" : {
5 "version" : 1.4,
6 "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
7 },
8 "generated_by" : "Dist::Zilla version 1.100730",
9 "version" : "0.100760",
10 "name" : "CPAN-Uploader",
1 "abstract" : "upload things to the CPAN",
112 "author" : [
123 "Ricardo SIGNES <rjbs@cpan.org>"
134 ],
5 "build_requires" : {
6 "Test::More" : "0"
7 },
8 "configure_requires" : {
9 "ExtUtils::MakeMaker" : "6.31"
10 },
11 "generated_by" : "Dist::Zilla version 2.101240",
1412 "license" : "perl",
15 "build_requires" : {},
13 "meta-spec" : {
14 "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html",
15 "version" : 1.4
16 },
17 "name" : "CPAN-Uploader",
18 "recommends" : {},
1619 "requires" : {
20 "Carp" : "0",
21 "Data::Dumper" : "0",
22 "File::Basename" : "0",
1723 "File::Spec" : "0",
18 "Data::Dumper" : "0",
24 "Getopt::Long::Descriptive" : "0.084",
25 "HTTP::Request::Common" : "0",
1926 "HTTP::Status" : "0",
20 "Carp" : "0",
21 "HTTP::Request::Common" : "0",
22 "Test::More" : "0",
2327 "LWP::UserAgent" : "0",
24 "Getopt::Long::Descriptive" : "0.084",
25 "File::Basename" : "0",
2628 "Term::ReadKey" : "0"
2729 },
28 "abstract" : "upload things to the CPAN",
29 "configure_requires" : {
30 "ExtUtils::MakeMaker" : "6.11"
30 "resources" : {
31 "repository" : "git://git.codesimply.com/CPAN-Uploader.git"
32 },
33 "version" : "0.101260",
34 "x_Dist_Zilla" : {
35 "plugins" : [
36 {
37 "class" : "Dist::Zilla::Plugin::GatherDir",
38 "name" : "@RJBS/@Basic/GatherDir",
39 "version" : "2.101240"
40 },
41 {
42 "class" : "Dist::Zilla::Plugin::PruneCruft",
43 "name" : "@RJBS/@Basic/PruneCruft",
44 "version" : "2.101240"
45 },
46 {
47 "class" : "Dist::Zilla::Plugin::ManifestSkip",
48 "name" : "@RJBS/@Basic/ManifestSkip",
49 "version" : "2.101240"
50 },
51 {
52 "class" : "Dist::Zilla::Plugin::MetaYAML",
53 "name" : "@RJBS/@Basic/MetaYAML",
54 "version" : "2.101240"
55 },
56 {
57 "class" : "Dist::Zilla::Plugin::License",
58 "name" : "@RJBS/@Basic/License",
59 "version" : "2.101240"
60 },
61 {
62 "class" : "Dist::Zilla::Plugin::Readme",
63 "name" : "@RJBS/@Basic/Readme",
64 "version" : "2.101240"
65 },
66 {
67 "class" : "Dist::Zilla::Plugin::ExtraTests",
68 "name" : "@RJBS/@Basic/ExtraTests",
69 "version" : "2.101240"
70 },
71 {
72 "class" : "Dist::Zilla::Plugin::ExecDir",
73 "name" : "@RJBS/@Basic/ExecDir",
74 "version" : "2.101240"
75 },
76 {
77 "class" : "Dist::Zilla::Plugin::ShareDir",
78 "name" : "@RJBS/@Basic/ShareDir",
79 "version" : "2.101240"
80 },
81 {
82 "class" : "Dist::Zilla::Plugin::MakeMaker",
83 "name" : "@RJBS/@Basic/MakeMaker",
84 "version" : "2.101240"
85 },
86 {
87 "class" : "Dist::Zilla::Plugin::Manifest",
88 "name" : "@RJBS/@Basic/Manifest",
89 "version" : "2.101240"
90 },
91 {
92 "class" : "Dist::Zilla::Plugin::TestRelease",
93 "name" : "@RJBS/@Basic/TestRelease",
94 "version" : "2.101240"
95 },
96 {
97 "class" : "Dist::Zilla::Plugin::ConfirmRelease",
98 "name" : "@RJBS/@Basic/ConfirmRelease",
99 "version" : "2.101240"
100 },
101 {
102 "class" : "Dist::Zilla::Plugin::UploadToCPAN",
103 "name" : "@RJBS/@Basic/UploadToCPAN",
104 "version" : "2.101240"
105 },
106 {
107 "class" : "Dist::Zilla::Plugin::AutoPrereq",
108 "name" : "@RJBS/AutoPrereq",
109 "version" : "2.101240"
110 },
111 {
112 "class" : "Dist::Zilla::Plugin::AutoVersion",
113 "name" : "@RJBS/AutoVersion",
114 "version" : "2.101240"
115 },
116 {
117 "class" : "Dist::Zilla::Plugin::PkgVersion",
118 "name" : "@RJBS/PkgVersion",
119 "version" : "2.101240"
120 },
121 {
122 "class" : "Dist::Zilla::Plugin::MetaConfig",
123 "name" : "@RJBS/MetaConfig",
124 "version" : "2.101240"
125 },
126 {
127 "class" : "Dist::Zilla::Plugin::MetaJSON",
128 "name" : "@RJBS/MetaJSON",
129 "version" : "2.101240"
130 },
131 {
132 "class" : "Dist::Zilla::Plugin::NextRelease",
133 "name" : "@RJBS/NextRelease",
134 "version" : "2.101240"
135 },
136 {
137 "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
138 "name" : "@RJBS/PodSyntaxTests",
139 "version" : "2.101240"
140 },
141 {
142 "class" : "Dist::Zilla::Plugin::Repository",
143 "name" : "@RJBS/Repository",
144 "version" : "0.11"
145 },
146 {
147 "class" : "Dist::Zilla::Plugin::PodWeaver",
148 "name" : "@RJBS/PodWeaver",
149 "version" : "3.100710"
150 },
151 {
152 "class" : "Dist::Zilla::Plugin::Git::Check",
153 "name" : "@RJBS/@Git/Check",
154 "version" : "1.100970"
155 },
156 {
157 "class" : "Dist::Zilla::Plugin::Git::Commit",
158 "name" : "@RJBS/@Git/Commit",
159 "version" : "1.100970"
160 },
161 {
162 "class" : "Dist::Zilla::Plugin::Git::Tag",
163 "name" : "@RJBS/@Git/Tag",
164 "version" : "1.100970"
165 },
166 {
167 "class" : "Dist::Zilla::Plugin::Git::Push",
168 "name" : "@RJBS/@Git/Push",
169 "version" : "1.100970"
170 },
171 {
172 "class" : "Dist::Zilla::Plugin::FinderCode",
173 "name" : ":InstallModules",
174 "version" : "2.101240"
175 },
176 {
177 "class" : "Dist::Zilla::Plugin::FinderCode",
178 "name" : ":TestFiles",
179 "version" : "2.101240"
180 },
181 {
182 "class" : "Dist::Zilla::Plugin::FinderCode",
183 "name" : ":ExecFiles",
184 "version" : "2.101240"
185 },
186 {
187 "class" : "Dist::Zilla::Plugin::FinderCode",
188 "name" : ":ShareFiles",
189 "version" : "2.101240"
190 }
191 ],
192 "zilla" : {
193 "class" : "Dist::Zilla",
194 "config" : {
195 "is_trial" : 0
196 },
197 "version" : "2.101240"
198 }
31199 }
32200 }
33201
11 abstract: 'upload things to the CPAN'
22 author:
33 - 'Ricardo SIGNES <rjbs@cpan.org>'
4 build_requires: {}
4 build_requires:
5 Test::More: 0
56 configure_requires:
6 ExtUtils::MakeMaker: 6.11
7 generated_by: 'Dist::Zilla version 1.100730'
7 ExtUtils::MakeMaker: 6.31
8 generated_by: 'Dist::Zilla version 2.101240'
89 license: perl
910 meta-spec:
1011 url: http://module-build.sourceforge.net/META-spec-v1.4.html
1112 version: 1.4
1213 name: CPAN-Uploader
14 recommends: {}
1315 requires:
1416 Carp: 0
1517 Data::Dumper: 0
2022 HTTP::Status: 0
2123 LWP::UserAgent: 0
2224 Term::ReadKey: 0
23 Test::More: 0
2425 resources:
2526 repository: git://git.codesimply.com/CPAN-Uploader.git
26 version: 0.100760
27 version: 0.101260
28 x_Dist_Zilla:
29 plugins:
30 -
31 class: Dist::Zilla::Plugin::GatherDir
32 name: '@RJBS/@Basic/GatherDir'
33 version: 2.101240
34 -
35 class: Dist::Zilla::Plugin::PruneCruft
36 name: '@RJBS/@Basic/PruneCruft'
37 version: 2.101240
38 -
39 class: Dist::Zilla::Plugin::ManifestSkip
40 name: '@RJBS/@Basic/ManifestSkip'
41 version: 2.101240
42 -
43 class: Dist::Zilla::Plugin::MetaYAML
44 name: '@RJBS/@Basic/MetaYAML'
45 version: 2.101240
46 -
47 class: Dist::Zilla::Plugin::License
48 name: '@RJBS/@Basic/License'
49 version: 2.101240
50 -
51 class: Dist::Zilla::Plugin::Readme
52 name: '@RJBS/@Basic/Readme'
53 version: 2.101240
54 -
55 class: Dist::Zilla::Plugin::ExtraTests
56 name: '@RJBS/@Basic/ExtraTests'
57 version: 2.101240
58 -
59 class: Dist::Zilla::Plugin::ExecDir
60 name: '@RJBS/@Basic/ExecDir'
61 version: 2.101240
62 -
63 class: Dist::Zilla::Plugin::ShareDir
64 name: '@RJBS/@Basic/ShareDir'
65 version: 2.101240
66 -
67 class: Dist::Zilla::Plugin::MakeMaker
68 name: '@RJBS/@Basic/MakeMaker'
69 version: 2.101240
70 -
71 class: Dist::Zilla::Plugin::Manifest
72 name: '@RJBS/@Basic/Manifest'
73 version: 2.101240
74 -
75 class: Dist::Zilla::Plugin::TestRelease
76 name: '@RJBS/@Basic/TestRelease'
77 version: 2.101240
78 -
79 class: Dist::Zilla::Plugin::ConfirmRelease
80 name: '@RJBS/@Basic/ConfirmRelease'
81 version: 2.101240
82 -
83 class: Dist::Zilla::Plugin::UploadToCPAN
84 name: '@RJBS/@Basic/UploadToCPAN'
85 version: 2.101240
86 -
87 class: Dist::Zilla::Plugin::AutoPrereq
88 name: '@RJBS/AutoPrereq'
89 version: 2.101240
90 -
91 class: Dist::Zilla::Plugin::AutoVersion
92 name: '@RJBS/AutoVersion'
93 version: 2.101240
94 -
95 class: Dist::Zilla::Plugin::PkgVersion
96 name: '@RJBS/PkgVersion'
97 version: 2.101240
98 -
99 class: Dist::Zilla::Plugin::MetaConfig
100 name: '@RJBS/MetaConfig'
101 version: 2.101240
102 -
103 class: Dist::Zilla::Plugin::MetaJSON
104 name: '@RJBS/MetaJSON'
105 version: 2.101240
106 -
107 class: Dist::Zilla::Plugin::NextRelease
108 name: '@RJBS/NextRelease'
109 version: 2.101240
110 -
111 class: Dist::Zilla::Plugin::PodSyntaxTests
112 name: '@RJBS/PodSyntaxTests'
113 version: 2.101240
114 -
115 class: Dist::Zilla::Plugin::Repository
116 name: '@RJBS/Repository'
117 version: 0.11
118 -
119 class: Dist::Zilla::Plugin::PodWeaver
120 name: '@RJBS/PodWeaver'
121 version: 3.100710
122 -
123 class: Dist::Zilla::Plugin::Git::Check
124 name: '@RJBS/@Git/Check'
125 version: 1.100970
126 -
127 class: Dist::Zilla::Plugin::Git::Commit
128 name: '@RJBS/@Git/Commit'
129 version: 1.100970
130 -
131 class: Dist::Zilla::Plugin::Git::Tag
132 name: '@RJBS/@Git/Tag'
133 version: 1.100970
134 -
135 class: Dist::Zilla::Plugin::Git::Push
136 name: '@RJBS/@Git/Push'
137 version: 1.100970
138 -
139 class: Dist::Zilla::Plugin::FinderCode
140 name: ':InstallModules'
141 version: 2.101240
142 -
143 class: Dist::Zilla::Plugin::FinderCode
144 name: ':TestFiles'
145 version: 2.101240
146 -
147 class: Dist::Zilla::Plugin::FinderCode
148 name: ':ExecFiles'
149 version: 2.101240
150 -
151 class: Dist::Zilla::Plugin::FinderCode
152 name: ':ShareFiles'
153 version: 2.101240
154 zilla:
155 class: Dist::Zilla
156 config:
157 is_trial: 0
158 version: 2.101240
33
44
55
6 use ExtUtils::MakeMaker 6.11;
6 use ExtUtils::MakeMaker 6.31;
77
88
99
1010 my %WriteMakefileArgs = (
11 'test' => {
12 'TESTS' => 't/*.t'
13 },
14 'NAME' => 'CPAN::Uploader',
11 'ABSTRACT' => 'upload things to the CPAN',
12 'AUTHOR' => 'Ricardo SIGNES <rjbs@cpan.org>',
13 'BUILD_REQUIRES' => {
14 'Test::More' => '0'
15 },
16 'CONFIGURE_REQUIRES' => {
17 'ExtUtils::MakeMaker' => '6.31'
18 },
1519 'DISTNAME' => 'CPAN-Uploader',
16 'CONFIGURE_REQUIRES' => {
17 'ExtUtils::MakeMaker' => '6.11'
18 },
19 'AUTHOR' => 'Ricardo SIGNES <rjbs@cpan.org>',
20 'BUILD_REQUIRES' => {},
21 'ABSTRACT' => 'upload things to the CPAN',
2220 'EXE_FILES' => [
2321 'bin/cpan-upload'
2422 ],
25 'VERSION' => '0.100760',
23 'LICENSE' => 'perl',
24 'NAME' => 'CPAN::Uploader',
2625 'PREREQ_PM' => {
26 'Carp' => '0',
27 'Data::Dumper' => '0',
28 'File::Basename' => '0',
2729 'File::Spec' => '0',
28 'Data::Dumper' => '0',
30 'Getopt::Long::Descriptive' => '0.084',
31 'HTTP::Request::Common' => '0',
2932 'HTTP::Status' => '0',
30 'Carp' => '0',
31 'HTTP::Request::Common' => '0',
32 'Test::More' => '0',
3333 'LWP::UserAgent' => '0',
34 'Getopt::Long::Descriptive' => '0.084',
35 'File::Basename' => '0',
3634 'Term::ReadKey' => '0'
3735 },
38 'LICENSE' => 'perl'
36 'VERSION' => '0.101260',
37 'test' => {
38 'TESTS' => 't/*.t'
39 }
3940 );
4041
4142
42 delete $WriteMakefileArgs{LICENSE}
43 unless eval { ExtUtils::MakeMaker->VERSION(6.31) };
43 unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
44 my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
45 my $pp = $WriteMakefileArgs{PREREQ_PM};
46 for my $mod ( keys %$br ) {
47 if ( exists $pp->{$mod} ) {
48 $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
49 }
50 else {
51 $pp->{$mod} = $br->{$mod};
52 }
53 }
54 }
55
56 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
57 unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
4458
4559 WriteMakefile(%WriteMakefileArgs);
4660
00
11
2 This archive contains the distribution CPAN-Uploader, version
3 0.100760:
2 This archive contains the distribution CPAN-Uploader,
3 version 0.101260:
44
55 upload things to the CPAN
66
99 This is free software; you can redistribute it and/or modify it under
1010 the same terms as the Perl 5 programming language system itself.
1111
12
11 use strict;
22 use warnings;
33
4 use Carp;
54 use CPAN::Uploader;
6 use File::Spec;
75 use Getopt::Long::Descriptive 0.084;
86
97 =head1 NAME
3836
3937 my %arg;
4038
41 my $home = $ENV{HOME} || '.';
42 my $rc = File::Spec->catfile($home, '.pause');
43
44 # Process .pause
45 open my $pauserc, '<', $rc or die "can't open $rc for reading: $!";
46
47 my %from_file;
48 while (<$pauserc>) {
49 chomp;
50 next unless $_ and $_ !~ /^\s*#/;
51
52 my ($k, $v) = /^\s*(\w+)\s+(.+)$/;
53 croak "multiple enties for $k" if $from_file{$k};
54 $from_file{$k} = $v;
55 }
39 my $from_file = CPAN::Uploader->read_config_file;
5640
5741 # This nonsensical hack is to cope with Module::Install wanting to call
5842 # cpan-upload -verbose; it should be made to use CPAN::Uploader instead.
7963
8064 die "Please provide a file name.\n" . $usage unless my $file = $ARGV[0];
8165
82 $arg{user} = uc( $opt->_specified('user') ? $opt->user : $from_file{user} );
66 $arg{user} = $opt->_specified('user') ? $opt->user : $from_file->{user};
67
68 die "Please provide a value for --user\n" unless defined $arg{user};
69
70 $arg{user} = uc $arg{user};
8371
8472 $arg{password} = $opt->password if $opt->_specified('password');
8573
86 if (! $arg{password} and ($arg{user} eq uc $from_file{user})) {
87 $arg{password} = $from_file{password};
74 if (
75 ! $arg{password}
76 and defined $from_file->{user}
77 and ($arg{user} eq uc $from_file->{user})
78 ) {
79 $arg{password} = $from_file->{password};
8880 }
8981
9082 $arg{debug} = 1 if $opt->verbose;
0 libcpan-uploader-perl (0.101260-1) UNRELEASED; urgency=low
1
2 * New upstream release
3 * Drop B-D-I on Test::Pod::Coverage
4
5 -- Jonathan Yu <jawnsy@cpan.org> Fri, 07 May 2010 11:24:49 -0400
6
07 libcpan-uploader-perl (0.100760-1) unstable; urgency=low
18
29 * New upstream release
22 Priority: optional
33 Build-Depends: debhelper (>= 7.0.50)
44 Build-Depends-Indep: perl, libgetopt-long-descriptive-perl (>= 0.084),
5 libwww-perl, libterm-readkey-perl, libpod-coverage-trustpod-perl,
6 libtest-pod-perl, libtest-pod-coverage-perl
5 libwww-perl, libterm-readkey-perl, libtest-pod-perl
76 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
87 Uploaders: Jonathan Yu <jawnsy@cpan.org>
98 Standards-Version: 3.8.4
00 use strict;
11 use warnings;
22 package CPAN::Uploader;
3 our $VERSION = '0.100760';
3 BEGIN {
4 $CPAN::Uploader::VERSION = '0.101260';
5 }
46 # ABSTRACT: upload things to the CPAN
57
68
9 use Carp ();
710 use File::Basename ();
11 use File::Spec;
812 use HTTP::Request::Common qw(POST);
913 use HTTP::Status;
1014 use LWP::UserAgent;
111115 }
112116
113117
118 sub read_config_file {
119 my ($class, $filename) = @_;
120
121 unless ($filename) {
122 my $home = $ENV{HOME} || '.';
123 $filename = File::Spec->catfile($home, '.pause');
124
125 return {} unless -e $filename and -r _;
126 }
127
128 # Process .pause
129 open my $pauserc, '<', $filename
130 or die "can't open $filename for reading: $!";
131
132 my %from_file;
133 while (<$pauserc>) {
134 chomp;
135 next unless $_ and $_ !~ /^\s*#/;
136
137 my ($k, $v) = /^\s*(\w+)\s+(.+)$/;
138 Carp::croak "multiple enties for $k" if $from_file{$k};
139 $from_file{$k} = $v;
140 }
141
142 return \%from_file;
143 }
144
145
114146 sub log {
115147 shift;
116148 print "$_[0]\n"
134166
135167 =head1 VERSION
136168
137 version 0.100760
169 version 0.101260
138170
139171 =head1 METHODS
140172
164196
165197 Valid arguments are the same as those to C<upload_file>.
166198
199 =head2 read_config_file
200
201 my $config = CPAN::Uploader->read_config_file( $filename );
202
203 This reads the config file and returns a hashref of its contents that can be
204 used as configuration for CPAN::Uploader.
205
206 If no filename is given, it looks for F<.pause> in the user's home directory
207 (from the env var C<HOME>, or the current directory if C<HOME> isn't set).
208
167209 =head2 log
168210
169211 $uploader->log($message);
+0
-21
t/release-pod-coverage.t less more
0 #!perl
1
2 BEGIN {
3 unless ($ENV{RELEASE_TESTING}) {
4 require Test::More;
5 Test::More::plan(skip_all => 'these tests are for release candidate testing');
6 }
7 }
8
9
10 use Test::More;
11
12 eval "use Test::Pod::Coverage 1.08";
13 plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
14 if $@;
15
16 eval "use Pod::Coverage::TrustPod";
17 plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
18 if $@;
19
20 all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
88
99 use Test::More;
1010
11 eval "use Test::Pod 1.00";
12 plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
11 eval "use Test::Pod 1.41";
12 plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
1313
1414 all_pod_files_ok();