Skip to content

Commit

Permalink
Generate "provides" info in META files
Browse files Browse the repository at this point in the history
The experimental CPANTS metric `meta_yml_has_provides` tests if the
`provides` information exists in the META.yml and META.json files.  The
easiest way to implement this is in `Dist::Zilla` projects is to use the
`MetaProvides::Package` plugin, which automatically generates this
information and adds it to the META.* files.  This plugin has been added
to `dist.ini` and as a new dependency to the distribution; the relevant
"provides" metadata has also been added.
  • Loading branch information
Paul Cochrane committed Nov 10, 2016
1 parent ecffd69 commit e116406
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions META.json
Expand Up @@ -38,6 +38,7 @@
"runtime" : {
"requires" : {
"Dist::Zilla" : "0",
"Dist::Zilla::Plugin::MetaProvides::Package" : "0",
"Moose" : "0",
"Moose::Util::TypeConstraints" : "0",
"Path::Tiny" : "0",
Expand All @@ -52,6 +53,12 @@
}
}
},
"provides" : {
"Dist::Zilla::Plugin::GitHubREADME::Badge" : {
"file" : "lib/Dist/Zilla/Plugin/GitHubREADME/Badge.pm",
"version" : "0.20"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
Expand Down
2 changes: 2 additions & 0 deletions Makefile.PL
Expand Up @@ -18,6 +18,7 @@ my %WriteMakefileArgs = (
"NAME" => "Dist::Zilla::Plugin::GitHubREADME::Badge",
"PREREQ_PM" => {
"Dist::Zilla" => 0,
"Dist::Zilla::Plugin::MetaProvides::Package" => 0,
"Moose" => 0,
"Moose::Util::TypeConstraints" => 0,
"Path::Tiny" => 0,
Expand All @@ -36,6 +37,7 @@ my %WriteMakefileArgs = (

my %FallbackPrereqs = (
"Dist::Zilla" => 0,
"Dist::Zilla::Plugin::MetaProvides::Package" => 0,
"Moose" => 0,
"Moose::Util::TypeConstraints" => 0,
"Path::Tiny" => 0,
Expand Down
1 change: 1 addition & 0 deletions cpanfile
Expand Up @@ -4,6 +4,7 @@ requires 'Path::Tiny';
requires 'Moose';
requires 'Moose::Util::TypeConstraints';
requires 'namespace::autoclean';
requires 'Dist::Zilla::Plugin::MetaProvides::Package';

on test => sub {
requires 'Test::More', '0.96';
Expand Down
2 changes: 2 additions & 0 deletions dist.ini
@@ -1,6 +1,8 @@
[@Milla]
installer = MakeMaker

[MetaProvides::Package]

[GitHubREADME::Badge]
badges = travis
badges = coveralls
Expand Down

0 comments on commit e116406

Please sign in to comment.