Permalink
Browse files

re-work META.yml validation and fix the detected errors

  • Loading branch information...
1 parent 10ea52a commit 4989229fce0fb9e7d29a06b0adb716f710aa1a5e @tonycoz committed May 23, 2011
Showing with 26 additions and 40 deletions.
  1. +3 −0 Changes
  2. +2 −0 MANIFEST
  3. +0 −20 META.yml
  4. +2 −11 Makefile.PL
  5. +19 −0 t/t98meta.t
  6. +0 −9 t/x10meta.t
View
@@ -11,6 +11,9 @@ Bug fixes:
- re-work, document and test Imager's logging facility.
https://rt.cpan.org/Ticket/Display.html?id=65227
+ - fix META.yml testing and the generated META.yml
+ https://rt.cpan.org/Ticket/Display.html?id=65235
+
Imager 0.83 - 21 May 2011
===========
View
@@ -326,6 +326,8 @@ t/t91pod.t Test POD with Test::Pod
t/t92samples.t
t/t93podcover.t POD Coverage tests
t/t94kwalitee.t Various "kwalitee" tests
+t/t95log.t
+t/t98meta.t
t/t99thread.t Test wrt to perl threads
t/tr18561.t Regression tests
t/tr18561b.t
View
@@ -1,20 +0,0 @@
---- #YAML:1.0
-name: Imager
-version: 0.67
-version_from: Imager.pm
-author:
- - Tony Cook <tony@imager.perl.org>
- - Arnar M. Hrafnkelsson
-abstract: Perl extension for Generating 24 bit Images
-installdirs: site
-recommends:
- Parse::RecDescent: 0
-requires:
- Test::More: 0.47
-license: perl
-dynamic_config: 1
-distribution_type: module
-meta-spec:
- version: 1.3
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
-generated_by: Imager version 0.67
View
@@ -220,17 +220,8 @@ if ($MM_ver >= 6.46) {
resources =>
{
homepage => "http://imager.perl.org/",
- repository =>
- {
- url => "git://git.imager.perl.org/imager.git",
- web => "http://git.imager.perl.org/imager.git",
- type => "git",
- },
- bugtracker =>
- {
- web => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
- mailto => 'bug-Imager@rt.cpan.org',
- },
+ repository => "git://git.imager.perl.org/imager.git",
+ bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
},
};
}
View
@@ -0,0 +1,19 @@
+#!perl -w
+use strict;
+use Test::More;
+plan skip_all => "Only run as part of the dist"
+ unless -f "META.yml";
+eval "use CPAN::Meta 2.0;";
+plan skip_all => "CPAN::Meta required for testing META.yml"
+ if $@;
+plan skip_all => "Only if automated or author testing"
+ unless $ENV{AUTOMATED_TESTING} || -d "../.git";
+plan tests => 1;
+
+my $meta;
+unless (ok(eval {
+ $meta = CPAN::Meta->load_file("META.yml",
+ { lazy_validation => 0 }) },
+ "loaded META.yml successfully")) {
+ diag($@);
+}
View
@@ -1,9 +0,0 @@
-#!perl -w
-# this is not intended for distribution with Imager
-# it is intended for testing from SVN only
-use strict;
-use Test::More;
-eval "use Test::YAML::Meta";
-plan skip_all => "Test::YAML::Meta required for testing META.yml" if $@;
-meta_yaml_ok();
-

0 comments on commit 4989229

Please sign in to comment.