[carton] 294/472: install develop dependencies in cpanfile as well
Lucas Kanashiro
kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
kanashiro-guest pushed a commit to branch master
in repository carton.
commit ed7e584e42882334fe0d391eb7816941948f717b
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date: Wed Jun 5 18:47:35 2013 +0900
install develop dependencies in cpanfile as well
---
lib/Carton/Lock.pm | 2 +-
lib/Carton/Requirements.pm | 2 +-
xt/cli/{test_deps.t => deps_phase.t} | 6 ++++++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/Carton/Lock.pm b/lib/Carton/Lock.pm
index 2d6f819..e243367 100644
--- a/lib/Carton/Lock.pm
+++ b/lib/Carton/Lock.pm
@@ -112,7 +112,7 @@ sub find_installs {
my $reqs = CPAN::Meta::Requirements->new;
$reqs->add_requirements($prereqs->requirements_for($_, 'requires'))
- for qw( configure build runtime test );
+ for qw( configure build runtime test develop );
my @installs;
my $wanted = sub {
diff --git a/lib/Carton/Requirements.pm b/lib/Carton/Requirements.pm
index 538bf1c..94c2597 100644
--- a/lib/Carton/Requirements.pm
+++ b/lib/Carton/Requirements.pm
@@ -17,7 +17,7 @@ sub walk_down {
$cb->($dependency, $level) if $dependency;
my @phase = qw( configure build runtime );
- push @phase, 'test' unless $dependency;
+ push @phase, qw( test develop ) unless $dependency;
my $reqs = CPAN::Meta::Requirements->new;
$reqs->add_requirements($prereqs->requirements_for($_, 'requires')) for @phase;
diff --git a/xt/cli/test_deps.t b/xt/cli/deps_phase.t
similarity index 63%
rename from xt/cli/test_deps.t
rename to xt/cli/deps_phase.t
index 65957fe..781d767 100644
--- a/xt/cli/test_deps.t
+++ b/xt/cli/deps_phase.t
@@ -8,6 +8,10 @@ use xt::CLI;
$app->dir->child("cpanfile")->spew(<<EOF);
on test => sub {
requires 'Test::NoWarnings';
+ recommends 'Test::Pretty';
+};
+on develop => sub {
+ requires 'Path::Tiny';
};
EOF
@@ -15,6 +19,8 @@ EOF
$app->run("list");
like $app->stdout, qr/Test-NoWarnings/;
+ like $app->stdout, qr/Path-Tiny/;
+ unlike $app->stdout, qr/Test-Pretty/;
}
done_testing;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git
More information about the Pkg-perl-cvs-commits
mailing list