diff --git a/.travis.yml b/.travis.yml index 481c4de..df1af65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,12 @@ perl: - "5.14" - "5.18" - "5.19" +env: + matrix: + - STERILIZE_ENV=0 + - STERILIZE_ENV=1 +before_install: + - perl ./maint-travis-ci/sterilize_env.pl branches: only: - "build/master" diff --git a/Build.PL b/Build.PL index 2501a56..b7501b6 100644 --- a/Build.PL +++ b/Build.PL @@ -17,7 +17,7 @@ my %module_build_args = ( "Kent Fredric " ], "dist_name" => "Dist-Zilla-Plugin-Bootstrap-lib", - "dist_version" => "0.04000000", + "dist_version" => "0.04000001", "license" => "perl", "module_name" => "Dist::Zilla::Plugin::Bootstrap::lib", "recommends" => {}, @@ -32,12 +32,14 @@ my %module_build_args = ( "script_files" => [], "test_requires" => { "Cwd" => 0, - "Dist::Zilla" => 0, "File::Copy::Recursive" => 0, + "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Path::FindDev" => 0, "Path::Tiny" => 0, + "Test::DZil" => 0, + "Test::Fatal" => 0, "Test::More" => "0.98" } ); diff --git a/Changes b/Changes index 56a3ad1..074ada3 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,21 @@ Revision history for Dist-Zilla-Plugin-Bootstrap-lib +0.04000001 2013-09-24T16:22:46Z + [Bugfix] + - Attempt to solve the problem of CPAN Smokers not having dzil in path by using Test::DZil instead. + + [Dependencies::Added / test requires] + - File::Spec + - Test::DZil + - Test::Fatal + + [Dependencies::Removed / test requires] + - Dist::Zilla + + [Tests] + - additional test for new ::Role::Bootstrap behaviour + - update compile test + 0.04000000 2013-09-05T08:17:38Z [!Major and API breaking Changes] - no_fallback deprecated in favour of fallback = 0/1 diff --git a/MANIFEST b/MANIFEST index f3f25d1..470bbeb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -23,10 +23,23 @@ corpus/fake_dist_05/E-0.01/dist.ini corpus/fake_dist_05/E-0.01/lib/E.pm corpus/fake_dist_05/dist.ini corpus/fake_dist_05/lib/E.pm +corpus/fake_dist_06/E-0.01/META.json +corpus/fake_dist_06/E-0.01/dist.ini +corpus/fake_dist_06/E-0.01/lib/E.pm +corpus/fake_dist_06/E-0.02/META.json +corpus/fake_dist_06/E-0.02/dist.ini +corpus/fake_dist_06/E-0.02/lib/E.pm +corpus/fake_dist_06/dist.ini +corpus/fake_dist_06/lib/E.pm dist.ini layout/self_structure.dot layout/self_structure.png lib/Dist/Zilla/Plugin/Bootstrap/lib.pm +maint-travis-ci/README.mkdn +maint-travis-ci/merge_travis_yml.pl +maint-travis-ci/sterilize_env.pl +maint-travis-ci/sync_tree.pl +maint-travis-ci/yamls/sterile.yaml perlcritic.rc t/00-compile.t t/000-report-versions-tiny.t @@ -35,6 +48,7 @@ t/02-try_built.t t/03-try_built-pass2.t t/04-try_built_nofallback.t t/05-try_built_nofallback-pass2.t +t/06-try_built_nofallback-pass3.t weaver.ini xt/author/critic.t xt/release/cpan-changes.t diff --git a/META.json b/META.json index aeac24a..478a59f 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Kent Fredric " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.132140", + "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661", "license" : [ "perl_5" ], @@ -54,12 +54,14 @@ "test" : { "requires" : { "Cwd" : "0", - "Dist::Zilla" : "0", "File::Copy::Recursive" : "0", + "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Path::FindDev" : "0", "Path::Tiny" : "0", + "Test::DZil" : "0", + "Test::Fatal" : "0", "Test::More" : "0.98" } } @@ -67,7 +69,7 @@ "provides" : { "Dist::Zilla::Plugin::Bootstrap::lib" : { "file" : "lib/Dist/Zilla/Plugin/Bootstrap/lib.pm", - "version" : "0.04000000" + "version" : "0.04000001" } }, "release_status" : "stable", @@ -82,40 +84,42 @@ "web" : "https://github.com/kentfredric/Dist-Zilla-Plugin-Bootstrap-lib" } }, - "version" : "0.04000000", + "version" : "0.04000001", "x_BuiltWith" : { "modules" : { - "Cwd" : "3.40", - "Dist::Zilla" : "4.300037", + "Cwd" : "3.44", "Dist::Zilla::PluginBundle::Author::KENTNL" : "1.8.3", - "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "NA(possibly not installed)", - "Dist::Zilla::Role::Bootstrap" : "0.1.0", + "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "1.7.2", + "Dist::Zilla::Role::Bootstrap" : "0.2.1", "File::Copy::Recursive" : "0.38", - "IO::Handle" : "1.34", - "IPC::Open3" : "1.13", + "File::Spec" : "3.44", + "IO::Handle" : "1.35", + "IPC::Open3" : "1.15", "Module::Build" : "0.4007", "Moose" : "2.1005", - "Path::FindDev" : "0.2.0", - "Path::Tiny" : "0.031", + "Path::FindDev" : "0.3.1", + "Path::Tiny" : "0.035", "Pod::Coverage::TrustPod" : "0.100002", "Test::CPAN::Changes" : "0.23", "Test::CPAN::Meta" : "0.23", + "Test::DZil" : "4.300039", + "Test::Fatal" : "0.013", "Test::Kwalitee" : "1.14", "Test::More" : "0.98", "Test::Pod" : "1.48", "Test::Pod::Coverage" : "1.08", "perl" : "NA(skipped: perl)", - "strict" : "1.07", + "strict" : "1.08", "version" : "0.9904", "warnings" : "1.18" }, "perl" : { - "original" : "v5.18.0", + "original" : "v5.19.3", "qv" : 1, "version" : [ 5, - 18, - 0 + 19, + 3 ] }, "perl-config" : { @@ -124,11 +128,11 @@ "osname" : "linux" }, "platform" : "linux", - "uname" : "Linux 3.10.9-gentoo x86_64 GenuineIntel GNU/Linux" + "uname" : "Linux 3.11.1-gentoo x86_64 GenuineIntel GNU/Linux" }, "x_Dist_Zilla" : { "perl" : { - "version" : "5.018000" + "version" : "5.019003" }, "plugins" : [ { @@ -137,7 +141,8 @@ "Dist::Zilla::Role::Bootstrap" : { "distname" : "Dist-Zilla-Plugin-Bootstrap-lib", "fallback" : "1", - "try_built" : null + "try_built" : null, + "try_built_method" : "mtime" } }, "name" : "Bootstrap::lib", @@ -151,17 +156,30 @@ { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::KENTNL/MetaConfig", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::KENTNL/GithubMeta", - "version" : "0.34" + "version" : "0.38" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM", + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", + "config" : { + "Dist::Zilla::Plugin::MetaProvides::Package" : {}, + "Dist::Zilla::Role::MetaProvider::Provider" : { + "inherit_missing" : "1", + "inherit_version" : "1", + "meta_noindex" : "1" + } + }, "name" : "@Author::KENTNL/MetaProvides::Package", - "version" : "1.14000003" + "version" : "1.15000000" }, { "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith", @@ -193,37 +211,37 @@ { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::KENTNL/License", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::KENTNL/MetaJSON", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::KENTNL/MetaYAML", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::KENTNL/Manifest", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::KENTNL/MetaTests", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::KENTNL/PodCoverageTests", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::KENTNL/PodSyntaxTests", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", @@ -258,7 +276,7 @@ } }, "name" : "@Author::KENTNL/Test::Compile", - "version" : "2.025" + "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", @@ -268,17 +286,17 @@ { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::KENTNL/PruneCruft", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::KENTNL/ManifestSkip", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::KENTNL/PkgVersion", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", @@ -288,12 +306,12 @@ { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::KENTNL/NextRelease", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::KENTNL/AutoPrereqs", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", @@ -304,7 +322,7 @@ } }, "name" : "@Author::KENTNL/Prereqs/BundleDevelNeeds", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", @@ -315,7 +333,7 @@ } }, "name" : "@Author::KENTNL/Prereqs/BundleDevelRecommends", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", @@ -326,7 +344,7 @@ } }, "name" : "@Author::KENTNL/Prereqs/BundleDevelSuggests", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl", @@ -336,12 +354,12 @@ { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::KENTNL/Authority", - "version" : "1.007" + "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::ModuleBuild", "name" : "@Author::KENTNL/ModuleBuild", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ReadmeFromPod", @@ -366,12 +384,12 @@ { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::KENTNL/TestRelease", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::KENTNL/ConfirmRelease", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::Check", @@ -401,7 +419,7 @@ { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::KENTNL/UploadToCPAN", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Twitter", @@ -451,46 +469,35 @@ "name" : "@Author::KENTNL/Prereqs::MatchInstalled", "version" : "0.1.2" }, - { - "class" : "Dist::Zilla::Plugin::Prereqs", - "config" : { - "Dist::Zilla::Plugin::Prereqs" : { - "phase" : "test", - "type" : "requires" - } - }, - "name" : "TestRequires", - "version" : "4.300037" - }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", - "version" : "4.300037" + "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", - "version" : "4.300037" + "version" : "4.300039" } ], "zilla" : { @@ -498,7 +505,7 @@ "config" : { "is_trial" : "0" }, - "version" : "4.300037" + "version" : "4.300039" } }, "x_authority" : "cpan:KENTNL" diff --git a/META.yml b/META.yml index a0d86f3..ea7e0ba 100644 --- a/META.yml +++ b/META.yml @@ -4,18 +4,20 @@ author: - 'Kent Fredric ' build_requires: Cwd: 0 - Dist::Zilla: 0 File::Copy::Recursive: 0 + File::Spec: 0 IO::Handle: 0 IPC::Open3: 0 Module::Build: 0.4007 Path::FindDev: 0 Path::Tiny: 0 + Test::DZil: 0 + Test::Fatal: 0 Test::More: 0.98 configure_requires: Module::Build: 0.4007 dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.132140' +generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -24,7 +26,7 @@ name: Dist-Zilla-Plugin-Bootstrap-lib provides: Dist::Zilla::Plugin::Bootstrap::lib: file: lib/Dist/Zilla/Plugin/Bootstrap/lib.pm - version: 0.04000000 + version: 0.04000001 requires: Dist::Zilla::Role::Bootstrap: 0 Moose: 0 @@ -35,48 +37,50 @@ resources: bugtracker: https://github.com/kentfredric/Dist-Zilla-Plugin-Bootstrap-lib/issues homepage: https://github.com/kentfredric/Dist-Zilla-Plugin-Bootstrap-lib repository: https://github.com/kentfredric/Dist-Zilla-Plugin-Bootstrap-lib.git -version: 0.04000000 +version: 0.04000001 x_BuiltWith: modules: - Cwd: 3.40 - Dist::Zilla: 4.300037 + Cwd: 3.44 Dist::Zilla::PluginBundle::Author::KENTNL: 1.8.3 - Dist::Zilla::PluginBundle::Author::KENTNL::Lite: 'NA(possibly not installed)' - Dist::Zilla::Role::Bootstrap: 0.1.0 + Dist::Zilla::PluginBundle::Author::KENTNL::Lite: 1.7.2 + Dist::Zilla::Role::Bootstrap: 0.2.1 File::Copy::Recursive: 0.38 - IO::Handle: 1.34 - IPC::Open3: 1.13 + File::Spec: 3.44 + IO::Handle: 1.35 + IPC::Open3: 1.15 Module::Build: 0.4007 Moose: 2.1005 - Path::FindDev: 0.2.0 - Path::Tiny: 0.031 + Path::FindDev: 0.3.1 + Path::Tiny: 0.035 Pod::Coverage::TrustPod: 0.100002 Test::CPAN::Changes: 0.23 Test::CPAN::Meta: 0.23 + Test::DZil: 4.300039 + Test::Fatal: 0.013 Test::Kwalitee: 1.14 Test::More: 0.98 Test::Pod: 1.48 Test::Pod::Coverage: 1.08 perl: 'NA(skipped: perl)' - strict: 1.07 + strict: 1.08 version: 0.9904 warnings: 1.18 perl: - original: v5.18.0 + original: v5.19.3 qv: 1 version: - 5 - - 18 - - 0 + - 19 + - 3 perl-config: gccversion: 4.7.2 myarchname: x86_64-linux osname: linux platform: linux - uname: 'Linux 3.10.9-gentoo x86_64 GenuineIntel GNU/Linux' + uname: 'Linux 3.11.1-gentoo x86_64 GenuineIntel GNU/Linux' x_Dist_Zilla: perl: - version: 5.018000 + version: 5.019003 plugins: - class: Dist::Zilla::Plugin::Bootstrap::lib @@ -85,6 +89,7 @@ x_Dist_Zilla: distname: Dist-Zilla-Plugin-Bootstrap-lib fallback: 1 try_built: ~ + try_built_method: mtime name: Bootstrap::lib version: 0.04000000 - @@ -94,15 +99,25 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::KENTNL/MetaConfig' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::KENTNL/GithubMeta' - version: 0.34 + version: 0.38 + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM' + version: 4.300039 - class: Dist::Zilla::Plugin::MetaProvides::Package + config: + Dist::Zilla::Plugin::MetaProvides::Package: {} + Dist::Zilla::Role::MetaProvider::Provider: + inherit_missing: 1 + inherit_version: 1 + meta_noindex: 1 name: '@Author::KENTNL/MetaProvides::Package' - version: 1.14000003 + version: 1.15000000 - class: Dist::Zilla::Plugin::MetaData::BuiltWith config: @@ -127,31 +142,31 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::License name: '@Author::KENTNL/License' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::KENTNL/MetaJSON' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::KENTNL/MetaYAML' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Manifest name: '@Author::KENTNL/Manifest' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::KENTNL/MetaTests' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::KENTNL/PodCoverageTests' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::KENTNL/PodSyntaxTests' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::ReportVersions::Tiny name: '@Author::KENTNL/ReportVersions::Tiny' @@ -177,7 +192,7 @@ x_Dist_Zilla: script_finder: - ':ExecFiles' name: '@Author::KENTNL/Test::Compile' - version: 2.025 + version: 2.033 - class: Dist::Zilla::Plugin::Test::Perl::Critic name: '@Author::KENTNL/Test::Perl::Critic' @@ -185,15 +200,15 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::KENTNL/PruneCruft' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::KENTNL/ManifestSkip' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::KENTNL/PkgVersion' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::PodWeaver name: '@Author::KENTNL/PodWeaver' @@ -201,11 +216,11 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::NextRelease name: '@Author::KENTNL/NextRelease' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::KENTNL/AutoPrereqs' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: @@ -213,7 +228,7 @@ x_Dist_Zilla: phase: develop type: requires name: '@Author::KENTNL/Prereqs/BundleDevelNeeds' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: @@ -221,7 +236,7 @@ x_Dist_Zilla: phase: develop type: recommends name: '@Author::KENTNL/Prereqs/BundleDevelRecommends' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: @@ -229,7 +244,7 @@ x_Dist_Zilla: phase: develop type: suggests name: '@Author::KENTNL/Prereqs/BundleDevelSuggests' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl name: '@Author::KENTNL/Author::KENTNL::MinimumPerl' @@ -237,11 +252,11 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::Authority name: '@Author::KENTNL/Authority' - version: 1.007 + version: 1.006 - class: Dist::Zilla::Plugin::ModuleBuild name: '@Author::KENTNL/ModuleBuild' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::ReadmeFromPod name: '@Author::KENTNL/ReadmeFromPod' @@ -261,11 +276,11 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::TestRelease name: '@Author::KENTNL/TestRelease' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::KENTNL/ConfirmRelease' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::KENTNL/Git::Check' @@ -289,7 +304,7 @@ x_Dist_Zilla: - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::KENTNL/UploadToCPAN' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::Twitter name: '@Author::KENTNL/Twitter' @@ -330,41 +345,33 @@ x_Dist_Zilla: - Dist::Zilla::PluginBundle::Author::KENTNL name: '@Author::KENTNL/Prereqs::MatchInstalled' version: 0.1.2 - - - class: Dist::Zilla::Plugin::Prereqs - config: - Dist::Zilla::Plugin::Prereqs: - phase: test - type: requires - name: TestRequires - version: 4.300037 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' - version: 4.300037 + version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' - version: 4.300037 + version: 4.300039 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 - version: 4.300037 + version: 4.300039 x_authority: cpan:KENTNL diff --git a/README b/README index f0ef9f5..2e4a8e9 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME Dist::Zilla Plug-ins. VERSION - version 0.04000000 + version 0.04000001 SYNOPSIS [Bootstrap::lib] diff --git a/corpus/fake_dist_06/E-0.01/META.json b/corpus/fake_dist_06/E-0.01/META.json new file mode 100644 index 0000000..6bc92f0 --- /dev/null +++ b/corpus/fake_dist_06/E-0.01/META.json @@ -0,0 +1,102 @@ +{ + "abstract" : "Fake dist stub", + "author" : [ + "Kent Fredric" + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "E", + "prereqs" : {}, + "release_status" : "stable", + "version" : "0.01", + "x_Dist_Zilla" : { + "perl" : { + "version" : "5.019003" + }, + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::Bootstrap::lib", + "config" : { + "Dist::Zilla::Role::Bootstrap" : { + "distname" : "E", + "fallback" : "0", + "try_built" : "1", + "try_built_method" : "mtime" + } + }, + "name" : "Bootstrap::lib", + "version" : "0.04000000" + }, + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "MetaConfig", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "MetaJSON", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::GatherDir", + "name" : "GatherDir", + "version" : "4.300039" + }, + { + "class" : "E", + "name" : "=E", + "version" : null + }, + { + "class" : "Dist::Zilla::Plugin::PruneCruft", + "name" : "PruneCruft", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "4.300039" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : "0" + }, + "version" : "4.300039" + } + } +} + diff --git a/corpus/fake_dist_06/E-0.01/dist.ini b/corpus/fake_dist_06/E-0.01/dist.ini new file mode 100644 index 0000000..a9bf229 --- /dev/null +++ b/corpus/fake_dist_06/E-0.01/dist.ini @@ -0,0 +1,15 @@ +name = E +version = 0.01 +author = Kent Fredric +license = Perl_5 +copyright_holder = Kent Fredric + +[Bootstrap::lib] +try_built = 1 +fallback = 0 + +[MetaConfig] +[MetaJSON] +[GatherDir] +[=E] +[PruneCruft] diff --git a/corpus/fake_dist_06/E-0.01/lib/E.pm b/corpus/fake_dist_06/E-0.01/lib/E.pm new file mode 100644 index 0000000..f91b2b0 --- /dev/null +++ b/corpus/fake_dist_06/E-0.01/lib/E.pm @@ -0,0 +1,13 @@ + +use strict; +use warnings; + +package E; + +# ABSTRACT: Fake dist stub + +use Moose; +with 'Dist::Zilla::Role::Plugin'; + +1; + diff --git a/corpus/fake_dist_06/E-0.02/META.json b/corpus/fake_dist_06/E-0.02/META.json new file mode 100644 index 0000000..12e4ab4 --- /dev/null +++ b/corpus/fake_dist_06/E-0.02/META.json @@ -0,0 +1,102 @@ +{ + "abstract" : "Fake dist stub", + "author" : [ + "Kent Fredric" + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "E", + "prereqs" : {}, + "release_status" : "stable", + "version" : "0.02", + "x_Dist_Zilla" : { + "perl" : { + "version" : "5.019003" + }, + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::Bootstrap::lib", + "config" : { + "Dist::Zilla::Role::Bootstrap" : { + "distname" : "E", + "fallback" : "0", + "try_built" : "1", + "try_built_method" : "mtime" + } + }, + "name" : "Bootstrap::lib", + "version" : "0.04000000" + }, + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "MetaConfig", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "MetaJSON", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::GatherDir", + "name" : "GatherDir", + "version" : "4.300039" + }, + { + "class" : "E", + "name" : "=E", + "version" : null + }, + { + "class" : "Dist::Zilla::Plugin::PruneCruft", + "name" : "PruneCruft", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "4.300039" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "4.300039" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : "0" + }, + "version" : "4.300039" + } + } +} + diff --git a/corpus/fake_dist_06/E-0.02/dist.ini b/corpus/fake_dist_06/E-0.02/dist.ini new file mode 100644 index 0000000..ec075c6 --- /dev/null +++ b/corpus/fake_dist_06/E-0.02/dist.ini @@ -0,0 +1,15 @@ +name = E +version = 0.02 +author = Kent Fredric +license = Perl_5 +copyright_holder = Kent Fredric + +[Bootstrap::lib] +try_built = 1 +fallback = 0 + +[MetaConfig] +[MetaJSON] +[GatherDir] +[=E] +[PruneCruft] diff --git a/corpus/fake_dist_06/E-0.02/lib/E.pm b/corpus/fake_dist_06/E-0.02/lib/E.pm new file mode 100644 index 0000000..f91b2b0 --- /dev/null +++ b/corpus/fake_dist_06/E-0.02/lib/E.pm @@ -0,0 +1,13 @@ + +use strict; +use warnings; + +package E; + +# ABSTRACT: Fake dist stub + +use Moose; +with 'Dist::Zilla::Role::Plugin'; + +1; + diff --git a/corpus/fake_dist_06/dist.ini b/corpus/fake_dist_06/dist.ini new file mode 100644 index 0000000..947eef5 --- /dev/null +++ b/corpus/fake_dist_06/dist.ini @@ -0,0 +1,16 @@ +name = E +version = 0.02 +author = Kent Fredric +license = Perl_5 +copyright_holder = Kent Fredric + +[Bootstrap::lib] +try_built = 1 +fallback = 0 +try_built_method = parseversion + +[MetaConfig] +[MetaJSON] +[GatherDir] +[=E] +[PruneCruft] diff --git a/corpus/fake_dist_06/lib/E.pm b/corpus/fake_dist_06/lib/E.pm new file mode 100644 index 0000000..f91b2b0 --- /dev/null +++ b/corpus/fake_dist_06/lib/E.pm @@ -0,0 +1,13 @@ + +use strict; +use warnings; + +package E; + +# ABSTRACT: Fake dist stub + +use Moose; +with 'Dist::Zilla::Role::Plugin'; + +1; + diff --git a/dist.ini b/dist.ini index b93005a..c07e275 100644 --- a/dist.ini +++ b/dist.ini @@ -18,7 +18,3 @@ twitter_hash_tags = #perl #cpan ;version_rel_day = 17 ;version_rel_hour = 3 ;version_rel_time_zone = Pacific/Auckland - - -[Prereqs / TestRequires ] -Dist::Zilla = 0 diff --git a/lib/Dist/Zilla/Plugin/Bootstrap/lib.pm b/lib/Dist/Zilla/Plugin/Bootstrap/lib.pm index 5bc147d..cde5670 100644 --- a/lib/Dist/Zilla/Plugin/Bootstrap/lib.pm +++ b/lib/Dist/Zilla/Plugin/Bootstrap/lib.pm @@ -7,7 +7,7 @@ BEGIN { $Dist::Zilla::Plugin::Bootstrap::lib::AUTHORITY = 'cpan:KENTNL'; } { - $Dist::Zilla::Plugin::Bootstrap::lib::VERSION = '0.04000000'; + $Dist::Zilla::Plugin::Bootstrap::lib::VERSION = '0.04000001'; } ## use critic; @@ -61,7 +61,7 @@ Dist::Zilla::Plugin::Bootstrap::lib - A minimal boot-strapping for Dist::Zilla P =head1 VERSION -version 0.04000000 +version 0.04000001 =head1 SYNOPSIS diff --git a/maint-travis-ci/README.mkdn b/maint-travis-ci/README.mkdn new file mode 100644 index 0000000..80d1add --- /dev/null +++ b/maint-travis-ci/README.mkdn @@ -0,0 +1,53 @@ +# ABOUT + +This repository contains a directory full of utilities to bolt on +to CPAN-targeting distributions, to add useful `travis-ci` features to those dists. + +# PREREQS + +All that is needed at present to get started, is a copy of `git` that provides `git subtree`, and a copy of `Path::FindDev` from `CPAN`. + +You don't need `Path::FindDev` during deployment, its just used to streamline +automated patching. + +# INSTALLING + +First, check out a copy of these scripts, it can be a temporary directory, +and you'll only need to do this once. + +```shell +$ mkdir /tmp/tci-scripts +$ cd /tmp/tci-scripts +$ git clone https://github.com/kentfredric/travis-scripts.git +``` + +Then, chdir to the root of your project + +```shell +$ chdir $PROJECT +``` + +And lastly, execute the installer + +```shell +$ /tmp/tci-scripts/sync_tree.pl +``` + +This will create the folder called `maint-travis-ci` within your distribution, +with a tree installed by `git subtree`, which will track this distribution. + +To update your copy of `/maint-travis-ci` to the latest, simply execute + +```shell +$ $PROJECT/maint-travis-ci/sync_tree.pl +``` + +While somewhere in your project. + +# CAVEATS + +Note, this tool uses `Path::FindDev`, and by proxy, `Path::IsDev` to find a development +root directory somewhere in the ancestry of `$CWD`. + +As such, you will likely need to appease `Path::IsDev` by having a file of some description that +marks the root of the development tree. diff --git a/maint-travis-ci/merge_travis_yml.pl b/maint-travis-ci/merge_travis_yml.pl new file mode 100644 index 0000000..fc33dca --- /dev/null +++ b/maint-travis-ci/merge_travis_yml.pl @@ -0,0 +1,31 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use utf8; + +use Path::FindDev qw( find_dev ); + +my $hashref = {}; + +my $template = find_dev('./')->child('.travis-template.yml'); +my $target = find_dev('./')->child('.travis.yml'); + +if ( -f -e $template ) { + require YAML::Loader; + my $loader = YAML::Loader->new(); + $hashref = $loader->load( $template->slurp ); +} + +if ( not exists $hashref->{language} ) { + $hashref->{language} = 'perl'; +} +if ( not exists $hashref->{perl} ) { + $hashref->{perl} = [ '5.18', '5.19' ]; +} + +use Data::Dump qw(pp); +pp($hashref); +require YAML::Dumper; +my $dumper = YAML::Dumper->new(); +$target->spew( $dumper->dump($hashref) ); diff --git a/maint-travis-ci/sterilize_env.pl b/maint-travis-ci/sterilize_env.pl new file mode 100644 index 0000000..df4c9de --- /dev/null +++ b/maint-travis-ci/sterilize_env.pl @@ -0,0 +1,31 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use utf8; + +sub diag { + print STDERR @_; + print STDERR "\n"; +} + +if ( not exists $ENV{STERILIZE_ENV} ) { + diag('STERILIZE_ENV unset'); + exit 0; +} +if ( $ENV{STERILIZE_ENV} < 1 ) { + diag('STERLIZIE_ENV < 1, Not Sterilizing'); + exit 0; +} +if ( not exists $ENV{TRAVIS} ) { + diag('Is not running under travis!'); + exit 1; +} +for my $i (@INC) { + next if $i !~ /site/; + next if $i eq '.'; + diag( 'Sterilizing files in ' . $i ); + system( 'find', $i, '-type', 'f', '-delete' ); + diag( 'Sterilizing dirs in ' . $i ); + system( 'find', $i, '-depth', '-type', 'd', '-delete' ); +} + diff --git a/maint-travis-ci/sync_tree.pl b/maint-travis-ci/sync_tree.pl new file mode 100755 index 0000000..542d325 --- /dev/null +++ b/maint-travis-ci/sync_tree.pl @@ -0,0 +1,24 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use utf8; + +use Path::FindDev qw( find_dev ); +my $root = find_dev('./'); + +chdir "$root"; + +sub git_subtree { + system( 'git', 'subtree', @_ ) == 0 or die "Git subtree had nonzero exit"; +} + +my $travis = 'https://github.com/kentfredric/travis-scripts.git'; +my $prefix = 'maint-travis-ci'; + +if ( not -d -e $root->child($prefix) ) { + git_subtree( 'add', '--prefix=' . $prefix, $travis, 'master' ); +} +else { + git_subtree( 'pull', '-m', 'Synchronise git subtree maint-travis-ci', '--prefix=' . $prefix, $travis, 'master' ); +} + diff --git a/maint-travis-ci/yamls/sterile.yaml b/maint-travis-ci/yamls/sterile.yaml new file mode 100644 index 0000000..df1af65 --- /dev/null +++ b/maint-travis-ci/yamls/sterile.yaml @@ -0,0 +1,17 @@ +language: perl +perl: + - "5.16" + - "5.14" + - "5.18" + - "5.19" +env: + matrix: + - STERILIZE_ENV=0 + - STERILIZE_ENV=1 +before_install: + - perl ./maint-travis-ci/sterilize_env.pl +branches: + only: + - "build/master" + - "releases" + diff --git a/t/00-compile.t b/t/00-compile.t index 340ef7e..3e55ee7 100644 --- a/t/00-compile.t +++ b/t/00-compile.t @@ -1,7 +1,7 @@ use strict; use warnings; -# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.025 +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033 use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); @@ -15,6 +15,7 @@ my @module_files = ( # no fake home requested +use File::Spec; use IPC::Open3; use IO::Handle; @@ -22,14 +23,16 @@ my @warnings; for my $lib (@module_files) { # see L - my $stdin = ''; # converted to a gensym by open3 + open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; - my $pid = open3($stdin, '>&STDERR', $stderr, qq{$^X -Mblib -e"require q[$lib]"}); + my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]"); + binmode $stderr, ':crlf' if $^O eq 'MSWin32'; + my @_warnings = <$stderr>; waitpid($pid, 0); is($? >> 8, 0, "$lib loaded ok"); - if (my @_warnings = <$stderr>) + if (@_warnings) { warn @_warnings; push @warnings, @_warnings; diff --git a/t/000-report-versions-tiny.t b/t/000-report-versions-tiny.t index d2574dc..0c661ca 100644 --- a/t/000-report-versions-tiny.t +++ b/t/000-report-versions-tiny.t @@ -49,11 +49,11 @@ sub pmver { } eval { $v .= pmver('Cwd','any version') }; -eval { $v .= pmver('Dist::Zilla','any version') }; eval { $v .= pmver('Dist::Zilla::PluginBundle::Author::KENTNL','v1.8.3') }; eval { $v .= pmver('Dist::Zilla::PluginBundle::Author::KENTNL::Lite','v1.3.0') }; eval { $v .= pmver('Dist::Zilla::Role::Bootstrap','any version') }; eval { $v .= pmver('File::Copy::Recursive','any version') }; +eval { $v .= pmver('File::Spec','any version') }; eval { $v .= pmver('IO::Handle','any version') }; eval { $v .= pmver('IPC::Open3','any version') }; eval { $v .= pmver('Module::Build','0.4007') }; @@ -63,6 +63,8 @@ eval { $v .= pmver('Path::Tiny','any version') }; eval { $v .= pmver('Pod::Coverage::TrustPod','any version') }; eval { $v .= pmver('Test::CPAN::Changes','0.19') }; eval { $v .= pmver('Test::CPAN::Meta','any version') }; +eval { $v .= pmver('Test::DZil','any version') }; +eval { $v .= pmver('Test::Fatal','any version') }; eval { $v .= pmver('Test::Kwalitee','1.08') }; eval { $v .= pmver('Test::More','0.98') }; eval { $v .= pmver('Test::Pod','1.41') }; diff --git a/t/01-basic.t b/t/01-basic.t index e0586eb..1780b81 100644 --- a/t/01-basic.t +++ b/t/01-basic.t @@ -6,20 +6,30 @@ use Path::FindDev qw( find_dev ); use Path::Tiny; use Cwd qw( cwd ); use File::Copy::Recursive qw( rcopy ); +use Test::DZil; +use Test::Fatal; -my $source = find_dev('./')->child('corpus')->child('fake_dist_01'); +my $dist = 'fake_dist_01'; + +my $source = find_dev('./')->child('corpus')->child($dist); my $tempdir = Path::Tiny->tempdir; rcopy( "$source", "$tempdir" ); BAIL_OUT("test setup failed to copy to tempdir") if not -e -f $tempdir->child("dist.ini"); -my $cwd = cwd(); -chdir "$tempdir"; - -is( system( "dzil", "build" ), 0, "dzil build ran ok" ); - -chdir $cwd; +is( + exception { + my $builder = Builder->from_config( + { + dist_root => "$tempdir" + } + ); + $builder->build; + }, + undef, + 'can build dist ' . $dist +); done_testing; diff --git a/t/02-try_built.t b/t/02-try_built.t index f59dae2..501039e 100644 --- a/t/02-try_built.t +++ b/t/02-try_built.t @@ -6,20 +6,30 @@ use Path::FindDev qw( find_dev ); use Path::Tiny; use Cwd qw( cwd ); use File::Copy::Recursive qw( rcopy ); +use Test::DZil; +use Test::Fatal; -my $source = find_dev('./')->child('corpus')->child('fake_dist_02'); +my $dist = 'fake_dist_02'; + +my $source = find_dev('./')->child('corpus')->child($dist); my $tempdir = Path::Tiny->tempdir; rcopy( "$source", "$tempdir" ); BAIL_OUT("test setup failed to copy to tempdir") if not -e -f $tempdir->child("dist.ini"); -my $cwd = cwd(); -chdir "$tempdir"; - -is( system( "dzil", "build" ), 0, "dzil build ran ok" ); - -chdir $cwd; +is( + exception { + my $builder = Builder->from_config( + { + dist_root => "$tempdir" + } + ); + $builder->build; + }, + undef, + 'can build dist ' . $dist +); done_testing; diff --git a/t/03-try_built-pass2.t b/t/03-try_built-pass2.t index 283aa60..04b27a7 100644 --- a/t/03-try_built-pass2.t +++ b/t/03-try_built-pass2.t @@ -6,20 +6,30 @@ use Path::FindDev qw( find_dev ); use Path::Tiny; use Cwd qw( cwd ); use File::Copy::Recursive qw( rcopy ); +use Test::DZil; +use Test::Fatal; -my $source = find_dev('./')->child('corpus')->child('fake_dist_03'); +my $dist = 'fake_dist_03'; + +my $source = find_dev('./')->child('corpus')->child($dist); my $tempdir = Path::Tiny->tempdir; rcopy( "$source", "$tempdir" ); BAIL_OUT("test setup failed to copy to tempdir") if not -e -f $tempdir->child("dist.ini"); -my $cwd = cwd(); -chdir "$tempdir"; - -is( system( "dzil", "build" ), 0, "dzil build ran ok" ); - -chdir $cwd; +is( + exception { + my $builder = Builder->from_config( + { + dist_root => "$tempdir" + } + ); + $builder->build; + }, + undef, + 'can build dist ' . $dist +); done_testing; diff --git a/t/04-try_built_nofallback.t b/t/04-try_built_nofallback.t index 41960c4..ae47d20 100644 --- a/t/04-try_built_nofallback.t +++ b/t/04-try_built_nofallback.t @@ -6,21 +6,30 @@ use Path::FindDev qw( find_dev ); use Path::Tiny; use Cwd qw( cwd ); use File::Copy::Recursive qw( rcopy ); +use Test::DZil; +use Test::Fatal; -my $source = find_dev('./')->child('corpus')->child('fake_dist_04'); +my $dist = 'fake_dist_04'; + +my $source = find_dev('./')->child('corpus')->child($dist); my $tempdir = Path::Tiny->tempdir; rcopy( "$source", "$tempdir" ); BAIL_OUT("test setup failed to copy to tempdir") if not -e -f $tempdir->child("dist.ini"); -my $cwd = cwd(); -chdir "$tempdir"; -diag "You can ignore the warning about dzil authordeps here"; - -isnt( system( "dzil", "build" ), 0, "dzil building a no-fallback dist that isnt installed fails" ); - -chdir $cwd; +isnt( + exception { + my $builder = Builder->from_config( + { + dist_root => "$tempdir" + } + ); + $builder->build; + }, + undef, + 'cant build dist ' . $dist +); done_testing; diff --git a/t/05-try_built_nofallback-pass2.t b/t/05-try_built_nofallback-pass2.t index dcce193..a9c4e57 100644 --- a/t/05-try_built_nofallback-pass2.t +++ b/t/05-try_built_nofallback-pass2.t @@ -6,20 +6,30 @@ use Path::FindDev qw( find_dev ); use Path::Tiny; use Cwd qw( cwd ); use File::Copy::Recursive qw( rcopy ); +use Test::DZil; +use Test::Fatal; -my $source = find_dev('./')->child('corpus')->child('fake_dist_05'); +my $dist = 'fake_dist_05'; + +my $source = find_dev('./')->child('corpus')->child($dist); my $tempdir = Path::Tiny->tempdir; rcopy( "$source", "$tempdir" ); BAIL_OUT("test setup failed to copy to tempdir") if not -e -f $tempdir->child("dist.ini"); -my $cwd = cwd(); -chdir "$tempdir"; - -is( system( "dzil", "build" ), 0, "dzil building a no-fallback dist a second time is ok" ); - -chdir $cwd; +is( + exception { + my $builder = Builder->from_config( + { + dist_root => "$tempdir" + } + ); + $builder->build; + }, + undef, + 'can build dist ' . $dist +); done_testing; diff --git a/t/06-try_built_nofallback-pass3.t b/t/06-try_built_nofallback-pass3.t new file mode 100644 index 0000000..281102c --- /dev/null +++ b/t/06-try_built_nofallback-pass3.t @@ -0,0 +1,35 @@ +use strict; +use warnings; + +use Test::More; +use Path::FindDev qw( find_dev ); +use Path::Tiny; +use Cwd qw( cwd ); +use File::Copy::Recursive qw( rcopy ); +use Test::DZil; +use Test::Fatal; + +my $dist = 'fake_dist_06'; + +my $source = find_dev('./')->child('corpus')->child($dist); +my $tempdir = Path::Tiny->tempdir; + +rcopy( "$source", "$tempdir" ); + +BAIL_OUT("test setup failed to copy to tempdir") if not -e -f $tempdir->child("dist.ini"); + +is( + exception { + my $builder = Builder->from_config( + { + dist_root => "$tempdir" + } + ); + $builder->build; + }, + undef, + 'can build dist ' . $dist +); + +done_testing; +