Permalink
Browse files

added META.json and test script

  • Loading branch information...
1 parent 816898d commit 216d0b4f9c760e9552ac9840d9e94fe5005259e5 @barbie barbie committed Apr 5, 2012
Showing with 105 additions and 10 deletions.
  1. +4 −0 Changes
  2. +2 −0 MANIFEST
  3. +63 −0 META.json
  4. +10 −9 META.yml
  5. +1 −1 lib/CPAN/Testers/WWW/Reports/Query/Reports.pm
  6. +25 −0 t/96metatest.t
View
@@ -1,5 +1,9 @@
Revision history for CPAN-Testers-WWW-Reports-Query-Reports
+0.03 05/04/2012
+ - missed JSON::XS from prereq lists :(
+ - added META.json (and test script)
+
0.02 31/03/2012
- now with the correct README!
View
@@ -3,6 +3,7 @@ examples/query.pl
lib/CPAN/Testers/WWW/Reports/Query/Reports.pm
Makefile.PL
MANIFEST
+META.json
META.yml
README
t/01base.t
@@ -11,3 +12,4 @@ t/90podtest.t
t/91podcover.t
t/94metatest.t
t/95changedate.t
+t/96metatest.t
View
@@ -0,0 +1,63 @@
+{
+ "name": "CPAN-Testers-WWW-Reports-Query-Reports",
+ "version": "0.03",
+ "abstract": "Retrieve CPAN Testers metadata direct from the CPAN Testers website",
+ "author": [
+ "Barbie (BARBIE) <barbie@cpan.org>"
+ ],
+
+ "license": "artistic_2",
+ "dynamic_config" : 0,
+ "release_status" : "stable",
+ "meta-spec": {
+ "version": "2",
+ "url": "http://search.cpan.org/dist/CPAN-Meta/lib/CPAN/Meta/Spec.pm"
+ },
+ "generated_by": "Hand 1.0",
+ "keywords" : [
+ "qa",
+ "cpan",
+ "testing",
+ "json"
+ ],
+
+ "prereqs" : {
+ "runtime" : {
+ "requires" : {
+ "WWW::Mechanize": "0",
+ "JSON::XS": "0"
+ }
+ },
+ "test" : {
+ "requires": {
+ "Test::More": "0.70"
+ },
+ "recommends": {
+ "Test::CPAN::Meta": "0.13",
+ "Test::CPAN::Meta::JSON": "0.12",
+ "Test::Pod": "1.00",
+ "Test::Pod::Coverage": "0.08"
+ }
+ }
+ },
+
+ "provides": {
+ "CPAN::Testers::WWW::Reports::Query::Reports": {
+ "file": "lib/CPAN/Testers/WWW/Reports/Query/Reports.pm",
+ "version": "0.03"
+ }
+ },
+ "no_index": {
+ "directory": ["t","examples"]
+ },
+
+ "resources": {
+ "license": "http://dev.perl.org/licenses/",
+ "bugtracker": { "web": "http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Reports-Query-Reports" },
+ "repository": {
+ "url": "git://github.com/barbie/cpan-testers-www-reports-query-reports.git",
+ "web": "http://github.com/barbie/cpan-testers-www-reports-query-reports",
+ "type": "git"
+ }
+ }
+}
View
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: CPAN::Testers::WWW::Reports::Query::Reports
-version: 0.02
+version: 0.03
abstract: Retrieve CPAN Testers metadata direct from the CPAN Testers website.
author:
- Barbie <barbie@cpan.org>
@@ -10,20 +10,21 @@ distribution_type: module
installdirs: site
requires:
- WWW::Mechanize: 0
- JSON::XS: 0
+ WWW::Mechanize: 0
+ JSON::XS: 0
recommends:
- Test::More: 0.70
- Test::Pod: 1.00
- Test::Pod::Coverage: 0.08
- Test::CPAN::Meta: 0.12
+ Test::More: 0.70
+ Test::Pod: 1.00
+ Test::Pod::Coverage: 0.08
+ Test::CPAN::Meta: 0.13
+ Test::CPAN::Meta::JSON: 0.12
build_requires:
- Test::More: 0.01
+ Test::More: 0.70
provides:
CPAN::Testers::WWW::Reports::Query::Reports:
file: lib/CPAN/Testers/WWW/Reports/Query/Reports.pm
- version: 0.02
+ version: 0.03
resources:
repository: http://github.com/barbie/cpan-testers-www-reports-query-reports
@@ -3,7 +3,7 @@ package CPAN::Testers::WWW::Reports::Query::Reports;
use strict;
use warnings;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
#----------------------------------------------------------------------------
View
@@ -0,0 +1,25 @@
+use Test::More;
+
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+
+eval "use Test::JSON::Meta 0.08";
+plan skip_all => "Test::JSON::Meta 0.08 required for testing META.json files" if $@;
+
+plan no_plan;
+
+my $meta = meta_spec_ok(undef,undef,@_);
+
+use CPAN::Testers::WWW::Reports::Query::Reports;
+my $version = $CPAN::Testers::WWW::Reports::Query::Reports::VERSION;
+
+is($meta->{version},$version,
+ 'META.json distribution version matches');
+
+if($meta->{provides}) {
+ for my $mod (keys %{$meta->{provides}}) {
+ is($meta->{provides}{$mod}{version},$version,
+ "META.json entry [$mod] version matches");
+ }
+}

0 comments on commit 216d0b4

Please sign in to comment.