r36401 - in /branches/upstream/libtest-cpan-meta-perl/current: Changes MANIFEST META.yml README examples/94metatest.t lib/Test/CPAN/Meta.pm lib/Test/CPAN/Meta/Version.pm t/03metaversion.t t/94metatest.t t/95changedate.t
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Mon May 25 18:36:05 UTC 2009
Author: ryan52-guest
Date: Mon May 25 18:36:00 2009
New Revision: 36401
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36401
Log:
[svn-upgrade] Integrating new upstream version, libtest-cpan-meta-perl (0.13)
Added:
branches/upstream/libtest-cpan-meta-perl/current/t/95changedate.t
Modified:
branches/upstream/libtest-cpan-meta-perl/current/Changes
branches/upstream/libtest-cpan-meta-perl/current/MANIFEST
branches/upstream/libtest-cpan-meta-perl/current/META.yml
branches/upstream/libtest-cpan-meta-perl/current/README
branches/upstream/libtest-cpan-meta-perl/current/examples/94metatest.t
branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta.pm
branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta/Version.pm
branches/upstream/libtest-cpan-meta-perl/current/t/03metaversion.t
branches/upstream/libtest-cpan-meta-perl/current/t/94metatest.t
Modified: branches/upstream/libtest-cpan-meta-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/Changes?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/Changes (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/Changes Mon May 25 18:36:00 2009
@@ -1,4 +1,10 @@
# Changes log for Test::CPAN::Meta
+
+0.13 24/05/2009
+ - added version checking to standard 94metatest.t
+ - added changes file checking, 95changedate.t
+ - added support for v-strings (thanks to David Golden)
+ - relaxed resource keys names, as per spec (thanks to Jonathan Yu)
0.12 27/06/2008
- added spec version 1.4
Modified: branches/upstream/libtest-cpan-meta-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/MANIFEST?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/MANIFEST (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/MANIFEST Mon May 25 18:36:00 2009
@@ -18,6 +18,7 @@
t/90podtest.t
t/91podcover.t
t/94metatest.t
+t/95changedate.t
t/samples/00-META.yml
t/samples/01-META.yml
t/samples/02-META.yml
Modified: branches/upstream/libtest-cpan-meta-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/META.yml?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/META.yml (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/META.yml Mon May 25 18:36:00 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Test-CPAN-Meta
-version: 0.12
+version: 0.13
abstract: A test module to validate a CPAN META.yml file.
author:
- Barbie <barbie at cpan.org>
@@ -24,10 +24,10 @@
provides:
Test::CPAN::Meta:
file: lib/Test/CPAN/Meta.pm
- version: 0.12
+ version: 0.13
Test::CPAN::Meta::Version:
file: lib/Test/CPAN/Meta/Version.pm
- version: 0.12
+ version: 0.13
no_index:
directory:
- t
Modified: branches/upstream/libtest-cpan-meta-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/README?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/README (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/README Mon May 25 18:36:00 2009
@@ -9,6 +9,10 @@
standard distribution uploaded to CPAN, meets the specifications that are
slowly being introduced to module uploads, via the use of package makers and
installers such as ExtUtils::MakeMaker, Module::Build and Module::Install.
+
+Current META.yml Specification, 1.4, was finally approved on 23 June 2008.
+
+http://www.nntp.perl.org/group/perl.module.build/2008/06/msg1360.html
DEPENDENCIES
Modified: branches/upstream/libtest-cpan-meta-perl/current/examples/94metatest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/examples/94metatest.t?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/examples/94metatest.t (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/examples/94metatest.t Mon May 25 18:36:00 2009
@@ -1,6 +1,24 @@
use Test::More;
-eval "use Test::CPAN::Meta";
-plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-meta_yaml_ok();
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+eval "use Test::CPAN::Meta 0.12";
+plan skip_all => "Test::CPAN::Meta 0.12 required for testing META.yml" if $@;
+
+plan no_plan;
+
+my $yaml = meta_spec_ok(undef,undef, at _);
+
+use MyDistro;
+
+is($yaml->{version},$MyDistro::VERSION,
+ 'META.yml distribution version matches');
+
+if($yaml->{provides}) {
+ for my $mod (keys %{$yaml->{provides}}) {
+ is($yaml->{provides}{$mod}{version},$MyDistro::VERSION,
+ "META.yml entry [$mod] version matches");
+ }
+}
Modified: branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta.pm?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta.pm (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta.pm Mon May 25 18:36:00 2009
@@ -4,7 +4,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.12';
+$VERSION = '0.13';
#----------------------------------------------------------------------------
Modified: branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta/Version.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta/Version.pm?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta/Version.pm (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/lib/Test/CPAN/Meta/Version.pm Mon May 25 18:36:00 2009
@@ -4,7 +4,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.12';
+$VERSION = '0.14';
#----------------------------------------------------------------------------
@@ -503,7 +503,7 @@
=item * version($self,$key,$value)
Validates a single version string. Versions of the type '5.8.8' and '0.00_00'
-are both valid.
+are both valid. A leading 'v' like 'v1.2.3' is also valid.
=item * boolean($self,$key,$value)
@@ -629,7 +629,7 @@
my ($self,$key,$value) = @_;
if(defined $value) {
return 0 unless($value || $value =~ /0/);
- return 1 if($value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?\d+((\.\d+((_|\.)\d+)?)?)/);
+ return 1 if($value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?v?\d+((\.\d+((_|\.)\d+)?)?)/);
} else {
$value = '<undef>';
}
@@ -681,7 +681,9 @@
sub resource {
my ($self,$key) = @_;
if(defined $key) {
- return 1 if($key && $key =~ /^([A-Z][a-z]+)+$/);
+ # a valid user defined key should be alphabetic
+ # and contain at least one capital case letter.
+ return 1 if($key && $key =~ /^[a-z]+$/i && $key =~ /[A-Z]/);
} else {
$key = '<undef>';
}
Modified: branches/upstream/libtest-cpan-meta-perl/current/t/03metaversion.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/t/03metaversion.t?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/t/03metaversion.t (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/t/03metaversion.t Mon May 25 18:36:00 2009
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 86;
+use Test::More tests => 91;
use Test::CPAN::Meta::Version;
my $spec = Test::CPAN::Meta::Version->new(spec => '1.3');
@@ -49,6 +49,8 @@
is($spec->version('version','0'),1,'valid basic version');
is($spec->version('version','0.00'),1);
is($spec->version('version','0.00_00'),1);
+is($spec->version('version','0.0.0'),1);
+is($spec->version('version','v0.0.0'),1);
is($spec->version('version','<6'),1);
is($spec->version('version','!4'),0);
is($spec->version('version',''),0);
@@ -71,7 +73,10 @@
is($spec->license('license',''),0);
is($spec->license('license',undef),0);
-is($spec->resource('MailListing'),1,'valid resource');
+is($spec->resource('MailListing'),1,'valid resource - CamelCase');
+is($spec->resource('MAILListing'),1,'valid resource - Caps start');
+is($spec->resource('mailLISTing'),1,'valid resource - Caps middle');
+is($spec->resource('mailListing'),1,'valid resource - 1 cap middle');
is($spec->resource('maillisting'),0);
is($spec->resource(''),0);
is($spec->resource(undef),0);
Modified: branches/upstream/libtest-cpan-meta-perl/current/t/94metatest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/t/94metatest.t?rev=36401&op=diff
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/t/94metatest.t (original)
+++ branches/upstream/libtest-cpan-meta-perl/current/t/94metatest.t Mon May 25 18:36:00 2009
@@ -6,6 +6,17 @@
eval "use Test::CPAN::Meta";
plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-meta_yaml_ok();
+plan no_plan;
+my $yaml = meta_spec_ok(undef,undef, at _);
+
+is($yaml->{version},$Test::CPAN::Meta::VERSION,
+ 'META.yml distribution version matches');
+
+if($yaml->{provides}) {
+ for my $mod (keys %{$yaml->{provides}}) {
+ is($yaml->{provides}{$mod}{version},$Test::CPAN::Meta::VERSION,
+ "META.yml entry [$mod] version matches");
+ }
+}
Added: branches/upstream/libtest-cpan-meta-perl/current/t/95changedate.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-cpan-meta-perl/current/t/95changedate.t?rev=36401&op=file
==============================================================================
--- branches/upstream/libtest-cpan-meta-perl/current/t/95changedate.t (added)
+++ branches/upstream/libtest-cpan-meta-perl/current/t/95changedate.t Mon May 25 18:36:00 2009
@@ -1,0 +1,20 @@
+use Test::More;
+use IO::File;
+use Test::CPAN::Meta;
+
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+
+my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open Changes file";
+
+plan no_plan;
+
+my $latest = 0;
+while(<$fh>) {
+ next unless(m!^\d!);
+ $latest = 1 if(m!^$Test::CPAN::Meta::VERSION!);
+ like($_, qr!\d[\d._]+\s+\d{2}/\d{2}/\d{4}!,'... version has a date');
+}
+
+is($latest,1,'... latest version not listed');
More information about the Pkg-perl-cvs-commits
mailing list