r36355 - in /branches/upstream/libtest-yaml-meta-perl/current: Changes MANIFEST META.yml README examples/94metatest.t lib/Test/YAML/Meta.pm lib/Test/YAML/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 02:08:20 UTC 2009


Author: ryan52-guest
Date: Mon May 25 02:08:15 2009
New Revision: 36355

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36355
Log:
[svn-upgrade] Integrating new upstream version, libtest-yaml-meta-perl (0.12)

Added:
    branches/upstream/libtest-yaml-meta-perl/current/t/95changedate.t
Modified:
    branches/upstream/libtest-yaml-meta-perl/current/Changes
    branches/upstream/libtest-yaml-meta-perl/current/MANIFEST
    branches/upstream/libtest-yaml-meta-perl/current/META.yml
    branches/upstream/libtest-yaml-meta-perl/current/README
    branches/upstream/libtest-yaml-meta-perl/current/examples/94metatest.t
    branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta.pm
    branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta/Version.pm
    branches/upstream/libtest-yaml-meta-perl/current/t/03metaversion.t
    branches/upstream/libtest-yaml-meta-perl/current/t/94metatest.t

Modified: branches/upstream/libtest-yaml-meta-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/Changes?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/Changes (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/Changes Mon May 25 02:08:15 2009
@@ -1,4 +1,11 @@
 # Changes log for Test::YAML::Meta
+
+0.12    24/05/2009
+	- added version checking to standard 94metatest.t
+	- added changes file checking, 95changedate.t
+	- added support for v-strings (RT#43566, thanks to David Golden)
+	- relaxed resource keys names, as per spec (RT#41605, thanks to 
+	  Jonathan Yu)
 
 0.11    27/06/2008
 	- added spec version 1.4

Modified: branches/upstream/libtest-yaml-meta-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/MANIFEST?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/MANIFEST (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/MANIFEST Mon May 25 02:08:15 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-yaml-meta-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/META.yml?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/META.yml (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/META.yml Mon May 25 02:08:15 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                     Test-YAML-Meta
-version:                  0.11
+version:                  0.12
 abstract:                 A test module to validate a META.yml file.
 author:
   - Barbie <barbie at cpan.org>
@@ -27,10 +27,10 @@
 provides:
   Test::YAML::Meta:
     file:     lib/Test/YAML/Meta.pm
-    version:  0.11
+    version:  0.12
   Test::YAML::Meta::Version:
     file:     lib/Test/YAML/Meta/Version.pm
-    version:  0.11
+    version:  0.12
 no_index:
   directory:
     - t

Modified: branches/upstream/libtest-yaml-meta-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/README?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/README (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/README Mon May 25 02:08:15 2009
@@ -9,6 +9,10 @@
 standard distribution uploaded to CPAN, meets the specifications that slowly 
 being introduced to module uploads, via the use of 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-yaml-meta-perl/current/examples/94metatest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/examples/94metatest.t?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/examples/94metatest.t (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/examples/94metatest.t Mon May 25 02:08:15 2009
@@ -1,6 +1,24 @@
 use Test::More;
-eval "use Test::YAML::Meta";
-plan skip_all => "Test::YAML::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::YAML::Meta 0.12";
+plan skip_all => "Test::YAML::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-yaml-meta-perl/current/lib/Test/YAML/Meta.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta.pm?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta.pm (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta.pm Mon May 25 02:08:15 2009
@@ -4,7 +4,7 @@
 use strict;
 
 use vars qw($VERSION);
-$VERSION = '0.11';
+$VERSION = '0.12';
 
 #----------------------------------------------------------------------------
 

Modified: branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta/Version.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta/Version.pm?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta/Version.pm (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/lib/Test/YAML/Meta/Version.pm Mon May 25 02:08:15 2009
@@ -4,7 +4,7 @@
 use strict;
 
 use vars qw($VERSION);
-$VERSION = '0.11';
+$VERSION = '0.12';
 
 #----------------------------------------------------------------------------
 
@@ -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-yaml-meta-perl/current/t/03metaversion.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/t/03metaversion.t?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/t/03metaversion.t (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/t/03metaversion.t Mon May 25 02:08:15 2009
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use Test::More  tests => 86;
+use Test::More  tests => 91;
 use Test::YAML::Meta::Version;
 
 my $spec = Test::YAML::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-yaml-meta-perl/current/t/94metatest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/t/94metatest.t?rev=36355&op=diff
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/t/94metatest.t (original)
+++ branches/upstream/libtest-yaml-meta-perl/current/t/94metatest.t Mon May 25 02:08:15 2009
@@ -6,6 +6,17 @@
 
 eval "use Test::YAML::Meta";
 plan skip_all => "Test::YAML::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::YAML::Meta::VERSION,
+    'META.yml distribution version matches');
+
+if($yaml->{provides}) {
+    for my $mod (keys %{$yaml->{provides}}) {
+        is($yaml->{provides}{$mod}{version},$Test::YAML::Meta::VERSION,
+            "META.yml entry [$mod] version matches");
+    }
+}

Added: branches/upstream/libtest-yaml-meta-perl/current/t/95changedate.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-yaml-meta-perl/current/t/95changedate.t?rev=36355&op=file
==============================================================================
--- branches/upstream/libtest-yaml-meta-perl/current/t/95changedate.t (added)
+++ branches/upstream/libtest-yaml-meta-perl/current/t/95changedate.t Mon May 25 02:08:15 2009
@@ -1,0 +1,20 @@
+use Test::More;
+use IO::File;
+use Test::YAML::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::YAML::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