From 972ec34a502d7fa853750f9ed4236d5a3559f289 Mon Sep 17 00:00:00 2001 From: Christopher Mckay Date: Tue, 8 Oct 2013 16:06:25 +1000 Subject: [PATCH 1/6] added with-test options to install and update --- lib/Carton/Builder.pm | 3 ++- lib/Carton/CLI.pm | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Carton/Builder.pm b/lib/Carton/Builder.pm index 9684b54..fb6eb8d 100644 --- a/lib/Carton/Builder.pm +++ b/lib/Carton/Builder.pm @@ -8,6 +8,7 @@ has index => (is => 'rw'); has cascade => (is => 'rw', default => sub { 1 }); has without => (is => 'rw', default => sub { [] }); has cpanfile => (is => 'rw'); +has with_test => (is => 'rw', default => sub { 0 }); has fatscript => (is => 'lazy'); sub effective_mirrors { @@ -109,7 +110,7 @@ sub _build_fatscript { sub run_cpanm { my($self, @args) = @_; local $ENV{PERL_CPANM_OPT}; - !system $^X, $self->fatscript, "--quiet", "--notest", @args; + !system $^X, $self->fatscript, "--quiet", ($self->with_test ? () : "--notest"), @args; } 1; diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm index e2e34ec..4f17b65 100644 --- a/lib/Carton/CLI.pm +++ b/lib/Carton/CLI.pm @@ -149,6 +149,7 @@ sub cmd_bundle { $self->parse_options( \@args, "fatpack!" => \$fatpack, + "with-test!" => \my $with_test, ); my $env = Carton::Environment->build; @@ -159,6 +160,7 @@ sub cmd_bundle { my $builder = Carton::Builder->new( mirror => $self->mirror, cpanfile => $env->cpanfile, + with_test => $with_test, ); $builder->bundle($env->install_path, $env->vendor_cache, $env->snapshot); @@ -182,6 +184,7 @@ sub cmd_install { "without=s" => sub { push @without, split /,/, $_[1] }, "deployment!" => \my $deployment, "cached!" => \my $cached, + "with-test!" => \my $with_test, ); my $env = Carton::Environment->build($cpanfile_path, $install_path); @@ -196,6 +199,7 @@ sub cmd_install { mirror => $self->mirror, without => \@without, cpanfile => $env->cpanfile, + with_test => $with_test, ); # TODO: --without with no .lock won't fetch the groups, resulting in insufficient requirements From d6bdfedfff7b45b7bf001a95a0054a2c1fc148e7 Mon Sep 17 00:00:00 2001 From: Christopher Mckay Date: Tue, 8 Oct 2013 16:09:59 +1000 Subject: [PATCH 2/6] Doc'd --with-test option --- lib/Carton/Doc/Install.pod | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Carton/Doc/Install.pod b/lib/Carton/Doc/Install.pod index 77c77da..9de850c 100644 --- a/lib/Carton/Doc/Install.pod +++ b/lib/Carton/Doc/Install.pod @@ -92,4 +92,11 @@ to exclude, in the comma separated list. B: C<--without> for the initial installation (without cpanfile.snapshot) is not supported at this moment. +=item --with-test + +By default, C will skip installation of all test dependencies. +This can prove undesirable if running through an automated testing system +This option causes carton to install all test dependencies and run the tests +of all dependencies. + =back From 1331aacc2d96896bfc3a57c176ef51e188028e39 Mon Sep 17 00:00:00 2001 From: Jose Luis Martinez Date: Tue, 31 Mar 2015 23:50:30 +0200 Subject: [PATCH 3/6] Try to fix mixed console output on Windows When executing carton exec COMMAND on Windows, the command returns, to the command prompt, while it's running if exec is used. system behaves correctly --- lib/Carton/CLI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm index e2e34ec..e82a074 100644 --- a/lib/Carton/CLI.pm +++ b/lib/Carton/CLI.pm @@ -19,7 +19,7 @@ use Carton::Error; use constant { SUCCESS => 0, INFO => 1, WARN => 2, ERROR => 3 }; -our $UseSystem = 0; # 1 for unit testing +our $UseSystem = ($^O eq 'MSWin32'); # 1 for unit testing, and for Windows has verbose => (is => 'rw'); has carton => (is => 'lazy'); From 64faf28ed61a6d0278c87831c83258cf8ecc40a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slobodan=20Mis=CC=8Ckovic=CC=81?= Date: Thu, 11 Jun 2015 00:19:04 -0700 Subject: [PATCH 4/6] allow cpanm options to be set via PERL_CARTON_CPANM_OPT --- lib/Carton/Builder.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Carton/Builder.pm b/lib/Carton/Builder.pm index de456d7..7eb43be 100644 --- a/lib/Carton/Builder.pm +++ b/lib/Carton/Builder.pm @@ -107,7 +107,8 @@ sub _build_fatscript { sub run_cpanm { my($self, @args) = @_; - local $ENV{PERL_CPANM_OPT}; + # allow cpanm options to be set via PERL_CARTON_CPANM_OPT + local $ENV{PERL_CPANM_OPT} = $ENV{PERL_CARTON_CPANM_OPT}; !system $^X, $self->fatscript, "--quiet", "--notest", @args; } From 1f1aaf68ea03914bac12fb95bf75ce1e98b31d9b Mon Sep 17 00:00:00 2001 From: Jose Luis Martinez Date: Fri, 6 May 2016 10:15:07 +0000 Subject: [PATCH 5/6] develop dependency to be able to build the dist --- cpanfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpanfile b/cpanfile index bdaa6cd..d9b00d0 100644 --- a/cpanfile +++ b/cpanfile @@ -29,4 +29,6 @@ on develop => sub { requires 'Test::More', 0.90; requires 'Test::Requires'; requires 'Capture::Tiny'; + requires 'Dist::Zilla'; + requires 'Dist::Zilla::PluginBundle::Milla'; }; From a9502d32ef04ab5617243a5ec56ab7b39bcabe92 Mon Sep 17 00:00:00 2001 From: Jose Luis Martinez Date: Fri, 6 May 2016 10:15:44 +0000 Subject: [PATCH 6/6] Bump up version --- META.json | 31 ++++++++++++++++++++----------- Makefile.PL | 4 ++-- README.md | 2 +- lib/Carton.pm | 2 +- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/META.json b/META.json index 3b9e9e8..083a527 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Tatsuhiko Miyagawa" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 5.039, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150005", + "generated_by" : "Dist::Zilla version 5.047, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], @@ -15,12 +15,12 @@ "name" : "Carton", "no_index" : { "directory" : [ - "t", - "xt", + "eg", + "examples", "inc", "share", - "eg", - "examples" + "t", + "xt" ] }, "prereqs" : { @@ -28,12 +28,17 @@ "requires" : { "ExtUtils::MakeMaker" : "0", "version" : "0.77" + }, + "suggests" : { + "JSON::PP" : "2.27300" } }, "develop" : { "requires" : { "Capture::Tiny" : "0", "Dist::Milla" : "v1.0.15", + "Dist::Zilla" : "0", + "Dist::Zilla::PluginBundle::Milla" : "0", "Test::More" : "0.9", "Test::Pod" : "1.41", "Test::Requires" : "0" @@ -65,31 +70,35 @@ "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "https://github.com/perl-carton/carton/issues" + "web" : "https://github.com/pplu/carton/issues" }, - "homepage" : "https://github.com/perl-carton/carton", + "homepage" : "https://github.com/pplu/carton", "repository" : { "type" : "git", - "url" : "https://github.com/perl-carton/carton.git", - "web" : "https://github.com/perl-carton/carton" + "url" : "https://github.com/pplu/carton.git", + "web" : "https://github.com/pplu/carton" } }, - "version" : "v1.0.22", + "version" : "v1.1.1", "x_contributors" : [ "Christian Walde ", + "Christopher Mckay ", "David Golden ", "David Steinbrunner ", - "ikasam_a ", "Jonathan Steinert ", + "Jose Luis Martinez ", "Kan Fushihara ", "Masahiro Chiba ", "NAKAGAWA Masaki ", "Olaf Alders ", "Pedro Figueiredo ", + "Pedro Melo ", "Peter Oliver ", "shiba_yu36 ", + "Slobodan Mis\u030ckovic\u0301 ", "Tatsuhiko Miyagawa ", "Tatsuhiko Miyagawa ", + "WATANABE Hiroaki ", "Yanick Champoux " ] } diff --git a/Makefile.PL b/Makefile.PL index e5fe429..29ff46f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.039. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.047. use strict; use warnings; @@ -35,7 +35,7 @@ my %WriteMakefileArgs = ( "Try::Tiny" => "0.09", "parent" => "0.223" }, - "VERSION" => "v1.0.22", + "VERSION" => "v1.1.1", "test" => { "TESTS" => "t/*.t" } diff --git a/README.md b/README.md index 61add40..b48220e 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ with perl lower than the specified version. # COMMUNITY -- [https://github.com/miyagawa/carton](https://github.com/miyagawa/carton) +- [https://github.com/perl-carton/carton](https://github.com/perl-carton/carton) Code repository, Wiki and Issue Tracker diff --git a/lib/Carton.pm b/lib/Carton.pm index 4481ab2..79046b6 100644 --- a/lib/Carton.pm +++ b/lib/Carton.pm @@ -1,7 +1,7 @@ package Carton; use strict; use 5.008_005; -use version; our $VERSION = version->declare("v1.0.22"); +use version; our $VERSION = version->declare("v1.1.1"); 1; __END__