diff options
author | Damyan Ivanov <dmn@debian.org> | 2017-11-04 20:00:56 +0000 |
---|---|---|
committer | Damyan Ivanov <dmn@debian.org> | 2017-11-04 20:00:56 +0000 |
commit | 5eab574521fc96fdce2a07066800f2cdfb65c241 (patch) | |
tree | c43cf1bfa6a66d35fa4dbb4f1aa7109ee2076522 | |
parent | fffe37a423a8532dbbe1c7d7256bd1e9acd96b53 (diff) | |
parent | 2877ef68c1ceb3644c547303309c59bc33f712e6 (diff) |
Update upstream source from tag 'upstream/0.35'
Update to upstream version '0.35'
with Debian dir 0bbb0044e08fac8cdd7d65845799774aeec95c3c
-rw-r--r-- | Build.PL | 2 | ||||
-rw-r--r-- | Changes | 8 | ||||
-rw-r--r-- | MANIFEST | 2 | ||||
-rw-r--r-- | META.json | 154 | ||||
-rw-r--r-- | META.yml | 108 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | bin/mcpani | 2 | ||||
-rw-r--r-- | lib/CPAN/Mini/Inject.pm | 6 | ||||
-rw-r--r-- | lib/CPAN/Mini/Inject/Config.pm | 4 | ||||
-rw-r--r-- | t/inject.t | 3 | ||||
-rw-r--r-- | t/local/CPAN/modules/02packages.details.txt.gz.original | bin | 429 -> 461 bytes | |||
-rw-r--r-- | t/testremote.t | 17 | ||||
-rw-r--r-- | t/update_mirror.t | 12 |
13 files changed, 170 insertions, 150 deletions
@@ -18,6 +18,7 @@ my $builder = MyBuilder->new( 'Karen Etheridge <ether@cpan.org>', 'Salve J. Nilsen <sjn@cpan.org>', 'Wolfgang Pecho <pecho@belwue.de>', + 'Konstantin Yakunin <twinhooker@gmail.com>', ], dist_version_from => 'lib/CPAN/Mini/Inject.pm', configure_requires => { 'Module::Build' => 0.4 }, @@ -39,6 +40,7 @@ my $builder = MyBuilder->new( 'LWP::Simple' => 0, 'Pod::Usage' => 0, 'Test::More' => 0, + 'Net::EmptyPort' => 0, 'YAML' => 0, 'File::Slurp' => 0, 'File::Temp' => 0, @@ -1,5 +1,13 @@ Revision history for CPAN-Mini-Inject +0.35 2017/07/19 + - use Net::EmptyPort to find an empty port to use + instead of a hard-coded one + +0.34 2017/07/18 + Konstantin Yakunin <twinhooker@gmail.com>: + - sort packages case insensitively + 0.33 2013/07/30 Wolfgang Pecho <pecho@belwue.de>: - allow spaces in configuration file @@ -9,13 +9,13 @@ META.json META.yml README t/.mcpani/config -t/.mcpani/config_with_whitespaces t/.mcpani/config_bad t/.mcpani/config_badremote t/.mcpani/config_mcpi t/.mcpani/config_noread t/.mcpani/config_norepo t/.mcpani/config_nowrite +t/.mcpani/config_with_whitespaces t/00.load.t t/add-multiple.t t/add.t @@ -1,76 +1,78 @@ -{
- "abstract" : "Inject modules into a CPAN::Mini mirror.",
- "author" : [
- "Shawn Sorichetti <ssoriche@coloredblocks.net>",
- "Andy Armstrong <andy@hexten.net>",
- "Christian Walde <walde.christian@googlemail.com>",
- "Randy Stauner <rwstauner@cpan.org>",
- "Karen Etheridge <ether@cpan.org>",
- "Salve J. Nilsen <sjn@cpan.org>",
- "Wolfgang Pecho <pecho@belwue.de>"
- ],
- "dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4007, CPAN::Meta::Converter version 2.131560",
- "license" : [
- "perl_5"
- ],
- "meta-spec" : {
- "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
- },
- "name" : "CPAN-Mini-Inject",
- "prereqs" : {
- "configure" : {
- "requires" : {
- "Module::Build" : "0.4"
- }
- },
- "runtime" : {
- "requires" : {
- "CPAN::Checksums" : "0",
- "CPAN::Mini" : "0.32",
- "Carp" : "0",
- "Compress::Zlib" : "0",
- "Dist::Metadata" : "0.921",
- "Env" : "0",
- "File::Basename" : "0",
- "File::Copy" : "0",
- "File::Path" : "2.07",
- "File::Slurp" : "0",
- "File::Spec" : "2.07",
- "File::Spec::Functions" : "0",
- "File::Temp" : "0",
- "Getopt::Long" : "0",
- "HTTP::Server::Simple" : "0.07",
- "IO::Zlib" : "0",
- "LWP::Simple" : "0",
- "Pod::Usage" : "0",
- "Test::More" : "0",
- "YAML" : "0"
- }
- }
- },
- "provides" : {
- "CPAN::Mini::Inject" : {
- "file" : "lib/CPAN/Mini/Inject.pm",
- "version" : "0.33"
- },
- "CPAN::Mini::Inject::Config" : {
- "file" : "lib/CPAN/Mini/Inject/Config.pm",
- "version" : "0.33"
- }
- },
- "release_status" : "stable",
- "resources" : {
- "bugtracker" : {
- "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-Mini-Inject"
- },
- "license" : [
- "http://dev.perl.org/licenses/"
- ],
- "repository" : {
- "url" : "git://github.com/AndyA/CPAN--Mini--Inject.git"
- }
- },
- "version" : "0.33"
-}
+{ + "abstract" : "Inject modules into a CPAN::Mini mirror.", + "author" : [ + "Shawn Sorichetti <ssoriche@coloredblocks.net>", + "Andy Armstrong <andy@hexten.net>", + "Christian Walde <walde.christian@googlemail.com>", + "Randy Stauner <rwstauner@cpan.org>", + "Karen Etheridge <ether@cpan.org>", + "Salve J. Nilsen <sjn@cpan.org>", + "Wolfgang Pecho <pecho@belwue.de>", + "Konstantin Yakunin <twinhooker@gmail.com>" + ], + "dynamic_config" : 1, + "generated_by" : "Module::Build version 0.421", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "CPAN-Mini-Inject", + "prereqs" : { + "configure" : { + "requires" : { + "Module::Build" : "0.4" + } + }, + "runtime" : { + "requires" : { + "CPAN::Checksums" : "0", + "CPAN::Mini" : "0.32", + "Carp" : "0", + "Compress::Zlib" : "0", + "Dist::Metadata" : "0.921", + "Env" : "0", + "File::Basename" : "0", + "File::Copy" : "0", + "File::Path" : "2.07", + "File::Slurp" : "0", + "File::Spec" : "2.07", + "File::Spec::Functions" : "0", + "File::Temp" : "0", + "Getopt::Long" : "0", + "HTTP::Server::Simple" : "0.07", + "IO::Zlib" : "0", + "LWP::Simple" : "0", + "Net::EmptyPort" : "0", + "Pod::Usage" : "0", + "Test::More" : "0", + "YAML" : "0" + } + } + }, + "provides" : { + "CPAN::Mini::Inject" : { + "file" : "lib/CPAN/Mini/Inject.pm", + "version" : "0.35" + }, + "CPAN::Mini::Inject::Config" : { + "file" : "lib/CPAN/Mini/Inject/Config.pm", + "version" : "0.35" + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-Mini-Inject" + }, + "license" : [ + "http://dev.perl.org/licenses/" + ], + "repository" : { + "url" : "git://github.com/AndyA/CPAN--Mini--Inject.git" + } + }, + "version" : "0.35" +} @@ -1,53 +1,55 @@ ----
-abstract: Inject modules into a CPAN::Mini mirror.
-author:
-- Shawn Sorichetti <ssoriche@coloredblocks.net>
-- Andy Armstrong <andy@hexten.net>
-- Christian Walde <walde.christian@googlemail.com>
-- Randy Stauner <rwstauner@cpan.org>
-- Karen Etheridge <ether@cpan.org>
-- Salve J. Nilsen <sjn@cpan.org>
-- Wolfgang Pecho <pecho@belwue.de>
-build_requires: {}
-configure_requires:
- Module::Build: '0.4'
-dynamic_config: 1
-generated_by: Module::Build version 0.4007, CPAN::Meta::Converter version 2.131560
-license: perl
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
-name: CPAN-Mini-Inject
-provides:
- CPAN::Mini::Inject:
- file: lib/CPAN/Mini/Inject.pm
- version: '0.33'
- CPAN::Mini::Inject::Config:
- file: lib/CPAN/Mini/Inject/Config.pm
- version: '0.33'
-requires:
- CPAN::Checksums: '0'
- CPAN::Mini: '0.32'
- Carp: '0'
- Compress::Zlib: '0'
- Dist::Metadata: '0.921'
- Env: '0'
- File::Basename: '0'
- File::Copy: '0'
- File::Path: '2.07'
- File::Slurp: '0'
- File::Spec: '2.07'
- File::Spec::Functions: '0'
- File::Temp: '0'
- Getopt::Long: '0'
- HTTP::Server::Simple: '0.07'
- IO::Zlib: '0'
- LWP::Simple: '0'
- Pod::Usage: '0'
- Test::More: '0'
- YAML: '0'
-resources:
- bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-Mini-Inject
- license: http://dev.perl.org/licenses/
- repository: git://github.com/AndyA/CPAN--Mini--Inject.git
-version: '0.33'
+--- +abstract: 'Inject modules into a CPAN::Mini mirror.' +author: + - 'Shawn Sorichetti <ssoriche@coloredblocks.net>' + - 'Andy Armstrong <andy@hexten.net>' + - 'Christian Walde <walde.christian@googlemail.com>' + - 'Randy Stauner <rwstauner@cpan.org>' + - 'Karen Etheridge <ether@cpan.org>' + - 'Salve J. Nilsen <sjn@cpan.org>' + - 'Wolfgang Pecho <pecho@belwue.de>' + - 'Konstantin Yakunin <twinhooker@gmail.com>' +build_requires: {} +configure_requires: + Module::Build: '0.4' +dynamic_config: 1 +generated_by: 'Module::Build version 0.421, CPAN::Meta::Converter version 2.143240' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: CPAN-Mini-Inject +provides: + CPAN::Mini::Inject: + file: lib/CPAN/Mini/Inject.pm + version: '0.35' + CPAN::Mini::Inject::Config: + file: lib/CPAN/Mini/Inject/Config.pm + version: '0.35' +requires: + CPAN::Checksums: '0' + CPAN::Mini: '0.32' + Carp: '0' + Compress::Zlib: '0' + Dist::Metadata: '0.921' + Env: '0' + File::Basename: '0' + File::Copy: '0' + File::Path: '2.07' + File::Slurp: '0' + File::Spec: '2.07' + File::Spec::Functions: '0' + File::Temp: '0' + Getopt::Long: '0' + HTTP::Server::Simple: '0.07' + IO::Zlib: '0' + LWP::Simple: '0' + Net::EmptyPort: '0' + Pod::Usage: '0' + Test::More: '0' + YAML: '0' +resources: + bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-Mini-Inject + license: http://dev.perl.org/licenses/ + repository: git://github.com/AndyA/CPAN--Mini--Inject.git +version: '0.35' @@ -2,5 +2,5 @@ README for CPAN::Mini::Inject CPAN::Mini::Inject uses CPAN::Mini to build or update a local CPAN mirror then adds modules from your repository to it. Allowing the inclusion -of private modules in a minimal CPAN mirror. This enables the use of +of private modules in a minimal CPAN mirror. This enables the use of CPAN/CPANPLUS to install them. @@ -9,7 +9,7 @@ use Env; use File::Slurp 'write_file'; use File::Temp; -our $VERSION = '0.33'; +our $VERSION = '0.35'; our %options = (); sub print_version { diff --git a/lib/CPAN/Mini/Inject.pm b/lib/CPAN/Mini/Inject.pm index 6dd59cd..854e90e 100644 --- a/lib/CPAN/Mini/Inject.pm +++ b/lib/CPAN/Mini/Inject.pm @@ -22,11 +22,11 @@ CPAN::Mini::Inject - Inject modules into a CPAN::Mini mirror. =head1 VERSION -Version 0.33 +Version 0.35 =cut -our $VERSION = '0.33'; +our $VERSION = '0.35'; our @ISA = qw( CPAN::Mini ); =head1 Synopsis @@ -457,7 +457,7 @@ sub updpackages { $packages{$pkg} = $line; }; - $self->_writepkgs( [ sort values %packages ] ); + $self->_writepkgs( [ sort { lc $a cmp lc $b } values %packages ] ); } =head2 C<updauthors> diff --git a/lib/CPAN/Mini/Inject/Config.pm b/lib/CPAN/Mini/Inject/Config.pm index 5e89627..e23fb4b 100644 --- a/lib/CPAN/Mini/Inject/Config.pm +++ b/lib/CPAN/Mini/Inject/Config.pm @@ -12,11 +12,11 @@ CPAN::Mini::Inject::Config - Config for CPAN::Mini::Inject =head1 VERSION -Version 0.33 +Version 0.35 =cut -our $VERSION = '0.33'; +our $VERSION = '0.35'; =head2 C<new> @@ -117,9 +117,10 @@ Description: Package names found in directory $CPAN/authors/id/ Columns: package name, version, path Intended-For: Automated fetch routines, namespace documentation. Written-By: -Line-Count: 6 +Line-Count: 7 Last-Updated: +abbreviation 0.02 M/MI/MIYAGAWA/abbreviation-0.02.tar.gz Acme::Code::Police 2.1828 O/OV/OVID/Acme-Code-Police-2.1828.tar.gz BFD 0.31 R/RB/RBS/BFD-0.31.tar.gz CPAN::Mini 0.17 R/RJ/RJBS/CPAN-Mini-0.17.tar.gz diff --git a/t/local/CPAN/modules/02packages.details.txt.gz.original b/t/local/CPAN/modules/02packages.details.txt.gz.original Binary files differindex 60cdbd7..01e0a0a 100644 --- a/t/local/CPAN/modules/02packages.details.txt.gz.original +++ b/t/local/CPAN/modules/02packages.details.txt.gz.original diff --git a/t/testremote.t b/t/testremote.t index 900d3e8..8512c10 100644 --- a/t/testremote.t +++ b/t/testremote.t @@ -5,14 +5,15 @@ use CPAN::Mini::Inject; use lib 't/lib'; BEGIN { - eval "use CPANServer"; - plan skip_all => "HTTP::Server::Simple required to test update_mirror" - if $@; + if not eval "use CPANServer; 1"; + plan skip_all => "Net::EmptyPort required to test update_mirror" + if not eval "use Net::EmptyPort; 1"; plan tests => 3; } -my $server = CPANServer->new( 11027 ); +my $port = Net::EmptyPort::empty_port; +my $server = CPANServer->new( $port ); my $pid = $server->background; ok( $pid, 'HTTP Server started' ); # Give server time to get going. @@ -22,19 +23,21 @@ $SIG{__DIE__} = sub { kill( 9, $pid ) }; my $mcpi = CPAN::Mini::Inject->new; $mcpi->loadcfg( 't/.mcpani/config' )->parsecfg; +$mcpi->{config}{remote} =~ s/:\d{5}\b/:$port/; +my $url = "http://localhost:$port/"; $mcpi->testremote; -is( $mcpi->{site}, 'http://localhost:11027/', 'Correct remote URL' ); +is( $mcpi->{site}, $url, 'Correct remote URL' ); $mcpi->loadcfg( 't/.mcpani/config_badremote' )->parsecfg; +$mcpi->{config}{remote} =~ s/:\d{5}\b/:$port/; SKIP: { skip 'Test fails with funky DNS providers', 1 if can_fetch( 'http://blahblah' ); # This fails with OpenDNS &c $mcpi->testremote; - is( $mcpi->{site}, 'http://localhost:11027/', - 'Selects correct remote URL' ); + is( $mcpi->{site}, $url, 'Selects correct remote URL' ); } kill( 9, $pid ); diff --git a/t/update_mirror.t b/t/update_mirror.t index c90cea2..7bd5a57 100644 --- a/t/update_mirror.t +++ b/t/update_mirror.t @@ -6,10 +6,10 @@ use warnings; use lib 't/lib'; BEGIN { - eval "use CPANServer"; - plan skip_all => "HTTP::Server::Simple required to test update_mirror" - if $@; + if not eval "use CPANServer; 1"; + plan skip_all => "Net::EmptyPort required to test update_mirror" + if not eval "use Net::EmptyPort; 1"; plan tests => 8; } @@ -18,7 +18,8 @@ use File::Path; rmtree( [ catdir( 't', 'mirror' ) ], 0, 1 ); -my $server = CPANServer->new( 11027 ); +my $port = Net::EmptyPort::empty_port; +my $server = CPANServer->new( $port ); my $pid = $server->background; ok( $pid, 'HTTP Server started' ); sleep 1; @@ -27,11 +28,12 @@ $SIG{__DIE__} = sub { kill( 9, $pid ) }; my $mcpi = CPAN::Mini::Inject->new; $mcpi->parsecfg( 't/.mcpani/config' ); +$mcpi->{config}{remote} =~ s/:\d{5}\b/:$port/; mkdir( catdir( 't', 'mirror' ) ); $mcpi->update_mirror( - remote => 'http://localhost:11027', + remote => "http://localhost:$port", local => catdir( 't', 'mirror' ) ); |