re-work META.yml validation and fix the detected errors
authorTony Cook <tony@develop-help.com>
Mon, 23 May 2011 10:13:00 +0000 (20:13 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 23 May 2011 10:13:00 +0000 (20:13 +1000)
Changes
MANIFEST
META.yml [deleted file]
Makefile.PL
t/t98meta.t [new file with mode: 0644]
t/x10meta.t [deleted file]

diff --git a/Changes b/Changes
index 156672b..3d23355 100644 (file)
--- a/Changes
+++ b/Changes
@@ -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
 ===========
 
index c159baa..5fb1f70 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -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
diff --git a/META.yml b/META.yml
deleted file mode 100644 (file)
index aa1ae16..0000000
--- a/META.yml
+++ /dev/null
@@ -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
index c1c7ad5..0751744 100644 (file)
@@ -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",
      },
     };
 }
diff --git a/t/t98meta.t b/t/t98meta.t
new file mode 100644 (file)
index 0000000..0fe1781
--- /dev/null
@@ -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($@);
+}
diff --git a/t/x10meta.t b/t/x10meta.t
deleted file mode 100644 (file)
index 8d3e842..0000000
+++ /dev/null
@@ -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();
-