This is an automated email from the git hooks/post-receive script. kanashiro-guest pushed a commit to branch master in repository carton.
commit 5f805c82e7fd1eea9a0450a697f3dc2ad7fbaeef Author: Tatsuhiko Miyagawa <[email protected]> Date: Mon Jul 22 10:23:24 2013 -0700 Enable without for 'features' as well --- lib/Carton/Builder.pm | 11 ++++++++--- xt/cli/without.t | 30 +++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/lib/Carton/Builder.pm b/lib/Carton/Builder.pm index dadae87..5e8160a 100644 --- a/lib/Carton/Builder.pm +++ b/lib/Carton/Builder.pm @@ -60,9 +60,14 @@ sub install { sub groups { my $self = shift; - my @options; - unless (grep $_ eq 'develop', @{$self->without}) { - push @options, '--with-develop'; + my @options = ('--with-all-features', '--with-develop'); + + for my $group (@{$self->without}) { + if ($group eq 'develop') { + push @options, '--without-develop'; + } else { + push @options, "--without-feature=$group"; + } } return @options; diff --git a/xt/cli/without.t b/xt/cli/without.t index f1d5b0e..d9c51f7 100644 --- a/xt/cli/without.t +++ b/xt/cli/without.t @@ -2,7 +2,7 @@ use strict; use Test::More; use xt::CLI; -subtest 'carton install and check' => sub { +subtest 'carton install --without develop' => sub { my $app = cli(); $app->write_cpanfile(<<EOF); requires 'Try::Tiny'; @@ -35,5 +35,33 @@ EOF unlike $app->stderr, qr/Hash::MultiValue .* version 0.14/; }; +subtest 'without features' => sub { + my $app = cli(); + $app->write_cpanfile(<<EOF); +requires 'Try::Tiny'; + +feature 'stream' => sub { + requires 'Stream::Buffered', '== 0.01'; +}; +EOF + + $app->run("install"); + $app->run("list"); + like $app->stdout, qr/Stream-Buffered-0\.01/; + + $app->clean_local; + + $app->run("install", "--deployment"); + $app->run("exec", "perl", "-e", "use Stream::Buffered 1"); + like $app->stderr, qr/Stream::Buffered .* version 0\.01/; + + $app->clean_local; + + $app->run("install", "--without", "stream"); + + $app->run("exec", "perl", "-e", "use Stream::Buffered 1"); + unlike $app->stderr, qr/Stream::Buffered .* version 0\.01/; +}; + done_testing; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
