[libdist-zilla-role-bootstrap-perl] 01/01: Build results of af61a0b (on master)
Axel Beckert
abe at deuxchevaux.org
Sat Aug 8 11:58:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to annotated tag 0.2.0
in repository libdist-zilla-role-bootstrap-perl.
commit 09c88d089bcc20ab23c5684dbf0bd78f0acd9377
Author: Kent Fredric <kentfredric at gmail.com>
Date: Sun Sep 22 00:40:24 2013 +1200
Build results of af61a0b (on master)
---
Build.PL | 6 +-
Changes | 15 ++
MANIFEST | 2 +
META.json | 134 ++++++++++--------
META.yml | 131 ++++++++++--------
README | 99 ++++++++++++-
dist.ini | 3 +-
lib/Dist/Zilla/Role/Bootstrap.pm | 191 ++++++++++++++++++++++++--
perlcritic.rc | 4 +-
t/00-compile.t | 11 +-
t/000-report-versions-tiny.t | 3 +
t/01-basic.t | 7 +-
t/02-try-built-mtime.t | 90 ++++++++++++
t/{01-basic.t => 03-try-built-parseversion.t} | 42 ++++--
weaver.ini | 16 +--
15 files changed, 595 insertions(+), 159 deletions(-)
diff --git a/Build.PL b/Build.PL
index 33027ac..e2e3742 100644
--- a/Build.PL
+++ b/Build.PL
@@ -17,7 +17,7 @@ my %module_build_args = (
"Kent Fredric <kentfredric\@gmail.com>"
],
"dist_name" => "Dist-Zilla-Role-Bootstrap",
- "dist_version" => "0.1.0",
+ "dist_version" => "0.2.0",
"license" => "perl",
"module_name" => "Dist::Zilla::Role::Bootstrap",
"recommends" => {},
@@ -26,12 +26,14 @@ my %module_build_args = (
"Carp" => 0,
"Cwd" => 0,
"Dist::Zilla::Role::Plugin" => 0,
+ "List::UtilsBy" => 0,
"Moose::Role" => 0,
"MooseX::AttributeShortcuts" => 0,
"Path::Tiny" => 0,
"lib" => 0,
"perl" => "v5.10.0",
"strict" => 0,
+ "version" => 0,
"warnings" => 0
},
"script_files" => [],
@@ -40,6 +42,8 @@ my %module_build_args = (
"Dist::Zilla::Dist::Builder" => 0,
"Dist::Zilla::MVP::Assembler::Zilla" => 0,
"Dist::Zilla::MVP::Section" => 0,
+ "File::Copy::Recursive" => 0,
+ "File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Moose" => 0,
diff --git a/Changes b/Changes
index 48fea49..941127c 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,20 @@
Release history for Dist-Zilla-Role-Bootstrap
+0.2.0 2013-09-21T12:39:54Z
+ [00 Major - try_built_method]
+ - New mechanisms for try_built if there is >1 build trees
+ - Default mechanism 'mtime' picks built dir with the most recent mtime
+ - Alternative mechanism attempts to parse versions out of build dirs and
+ use the latest
+
+ [Dependencies::Added / runtime requires]
+ - List::UtilsBy
+ - version
+
+ [Dependencies::Added / test requires]
+ - File::Copy::Recursive
+ - File::Spec
+
0.1.0 2013-09-04T11:24:24Z
- First version.
diff --git a/MANIFEST b/MANIFEST
index 495683c..2229f5b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -15,6 +15,8 @@ perlcritic.rc
t/00-compile.t
t/000-report-versions-tiny.t
t/01-basic.t
+t/02-try-built-mtime.t
+t/03-try-built-parseversion.t
weaver.ini
xt/author/critic.t
xt/release/cpan-changes.t
diff --git a/META.json b/META.json
index 3e6904e..9d3f3ba 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
"Kent Fredric <kentfredric at gmail.com>"
],
"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.132620",
"license" : [
"perl_5"
],
@@ -47,12 +47,14 @@
"Carp" : "0",
"Cwd" : "0",
"Dist::Zilla::Role::Plugin" : "0",
+ "List::UtilsBy" : "0",
"Moose::Role" : "0",
"MooseX::AttributeShortcuts" : "0",
"Path::Tiny" : "0",
"lib" : "0",
"perl" : "v5.10.0",
"strict" : "0",
+ "version" : "0",
"warnings" : "0"
}
},
@@ -62,6 +64,8 @@
"Dist::Zilla::Dist::Builder" : "0",
"Dist::Zilla::MVP::Assembler::Zilla" : "0",
"Dist::Zilla::MVP::Section" : "0",
+ "File::Copy::Recursive" : "0",
+ "File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Moose" : "0",
@@ -73,7 +77,7 @@
"provides" : {
"Dist::Zilla::Role::Bootstrap" : {
"file" : "lib/Dist/Zilla/Role/Bootstrap.pm",
- "version" : "v0.1.0"
+ "version" : "v0.2.0"
}
},
"release_status" : "stable",
@@ -88,46 +92,49 @@
"web" : "https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap"
}
},
- "version" : "0.1.0",
+ "version" : "0.2.0",
"x_BuiltWith" : {
"modules" : {
- "Carp" : "1.29",
- "Cwd" : "3.40",
- "Dist::Zilla::Chrome::Test" : "4.300037",
- "Dist::Zilla::Dist::Builder" : "4.300037",
- "Dist::Zilla::MVP::Assembler::Zilla" : "4.300037",
- "Dist::Zilla::MVP::Section" : "4.300037",
+ "Carp" : "1.32",
+ "Cwd" : "3.44",
+ "Dist::Zilla::Chrome::Test" : "4.300039",
+ "Dist::Zilla::Dist::Builder" : "4.300039",
+ "Dist::Zilla::MVP::Assembler::Zilla" : "4.300039",
+ "Dist::Zilla::MVP::Section" : "4.300039",
"Dist::Zilla::PluginBundle::Author::KENTNL" : "1.8.3",
- "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "NA(possibly not installed)",
- "Dist::Zilla::Role::Plugin" : "4.300037",
- "IO::Handle" : "1.34",
- "IPC::Open3" : "1.13",
+ "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "1.7.2",
+ "Dist::Zilla::Role::Plugin" : "4.300039",
+ "File::Copy::Recursive" : "0.38",
+ "File::Spec" : "3.44",
+ "IO::Handle" : "1.35",
+ "IPC::Open3" : "1.15",
+ "List::UtilsBy" : "0.09",
"Module::Build" : "0.4007",
"Moose" : "2.1005",
"Moose::Role" : "2.1005",
- "MooseX::AttributeShortcuts" : "0.020",
- "Path::FindDev" : "0.2.0",
- "Path::Tiny" : "0.031",
+ "MooseX::AttributeShortcuts" : "0.021",
+ "Path::FindDev" : "0.3.1",
+ "Path::Tiny" : "0.033",
"Pod::Coverage::TrustPod" : "0.100002",
"Test::CPAN::Changes" : "0.23",
"Test::CPAN::Meta" : "0.23",
- "Test::Kwalitee" : "1.13",
+ "Test::Kwalitee" : "1.14",
"Test::More" : "0.98",
"Test::Pod" : "1.48",
"Test::Pod::Coverage" : "1.08",
"lib" : "0.63",
"perl" : "NA(skipped: perl)",
- "strict" : "1.07",
- "version" : "0.9903",
+ "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" : {
@@ -136,11 +143,11 @@
"osname" : "linux"
},
"platform" : "linux",
- "uname" : "Linux 3.10.9-gentoo x86_64 GenuineIntel GNU/Linux"
+ "uname" : "Linux 3.11.0-gentoo x86_64 GenuineIntel GNU/Linux"
},
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.018000"
+ "version" : "5.019003"
},
"plugins" : [
{
@@ -151,17 +158,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.32"
+ "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 +213,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 +278,7 @@
}
},
"name" : "@Author::KENTNL/Test::Compile",
- "version" : "2.023"
+ "version" : "2.033"
},
{
"class" : "Dist::Zilla::Plugin::Test::Perl::Critic",
@@ -268,17 +288,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 +308,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 +324,7 @@
}
},
"name" : "@Author::KENTNL/Prereqs/BundleDevelNeeds",
- "version" : "4.300037"
+ "version" : "4.300039"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -315,7 +335,7 @@
}
},
"name" : "@Author::KENTNL/Prereqs/BundleDevelRecommends",
- "version" : "4.300037"
+ "version" : "4.300039"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -326,7 +346,7 @@
}
},
"name" : "@Author::KENTNL/Prereqs/BundleDevelSuggests",
- "version" : "4.300037"
+ "version" : "4.300039"
},
{
"class" : "Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl",
@@ -336,12 +356,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 +386,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 +421,7 @@
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::KENTNL/UploadToCPAN",
- "version" : "4.300037"
+ "version" : "4.300039"
},
{
"class" : "Dist::Zilla::Plugin::Twitter",
@@ -449,7 +469,7 @@
}
},
"name" : "@Author::KENTNL/Prereqs::MatchInstalled",
- "version" : "0.1.1"
+ "version" : "0.1.2"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -460,37 +480,37 @@
}
},
"name" : "Prereqs",
- "version" : "4.300037"
+ "version" : "4.300039"
},
{
"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 +518,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "4.300037"
+ "version" : "4.300039"
}
},
"x_authority" : "cpan:KENTNL"
diff --git a/META.yml b/META.yml
index 765dacf..f241740 100644
--- a/META.yml
+++ b/META.yml
@@ -7,6 +7,8 @@ build_requires:
Dist::Zilla::Dist::Builder: 0
Dist::Zilla::MVP::Assembler::Zilla: 0
Dist::Zilla::MVP::Section: 0
+ File::Copy::Recursive: 0
+ File::Spec: 0
IO::Handle: 0
IPC::Open3: 0
Module::Build: 0.4007
@@ -16,7 +18,7 @@ build_requires:
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.132620'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,70 +27,75 @@ name: Dist-Zilla-Role-Bootstrap
provides:
Dist::Zilla::Role::Bootstrap:
file: lib/Dist/Zilla/Role/Bootstrap.pm
- version: v0.1.0
+ version: v0.2.0
requires:
Carp: 0
Cwd: 0
Dist::Zilla::Role::Plugin: 0
+ List::UtilsBy: 0
Moose::Role: 0
MooseX::AttributeShortcuts: 0
Path::Tiny: 0
lib: 0
perl: v5.10.0
strict: 0
+ version: 0
warnings: 0
resources:
bugtracker: https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap/issues
homepage: https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap
repository: https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap.git
-version: 0.1.0
+version: 0.2.0
x_BuiltWith:
modules:
- Carp: 1.29
- Cwd: 3.40
- Dist::Zilla::Chrome::Test: 4.300037
- Dist::Zilla::Dist::Builder: 4.300037
- Dist::Zilla::MVP::Assembler::Zilla: 4.300037
- Dist::Zilla::MVP::Section: 4.300037
+ Carp: 1.32
+ Cwd: 3.44
+ Dist::Zilla::Chrome::Test: 4.300039
+ Dist::Zilla::Dist::Builder: 4.300039
+ Dist::Zilla::MVP::Assembler::Zilla: 4.300039
+ Dist::Zilla::MVP::Section: 4.300039
Dist::Zilla::PluginBundle::Author::KENTNL: 1.8.3
- Dist::Zilla::PluginBundle::Author::KENTNL::Lite: 'NA(possibly not installed)'
- Dist::Zilla::Role::Plugin: 4.300037
- IO::Handle: 1.34
- IPC::Open3: 1.13
+ Dist::Zilla::PluginBundle::Author::KENTNL::Lite: 1.7.2
+ Dist::Zilla::Role::Plugin: 4.300039
+ File::Copy::Recursive: 0.38
+ File::Spec: 3.44
+ IO::Handle: 1.35
+ IPC::Open3: 1.15
+ List::UtilsBy: 0.09
Module::Build: 0.4007
Moose: 2.1005
Moose::Role: 2.1005
- MooseX::AttributeShortcuts: 0.020
- Path::FindDev: 0.2.0
- Path::Tiny: 0.031
+ MooseX::AttributeShortcuts: 0.021
+ Path::FindDev: 0.3.1
+ Path::Tiny: 0.033
Pod::Coverage::TrustPod: 0.100002
Test::CPAN::Changes: 0.23
Test::CPAN::Meta: 0.23
- Test::Kwalitee: 1.13
+ Test::Kwalitee: 1.14
Test::More: 0.98
Test::Pod: 1.48
Test::Pod::Coverage: 1.08
lib: 0.63
perl: 'NA(skipped: perl)'
- strict: 1.07
- version: 0.9903
+ 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.0-gentoo x86_64 GenuineIntel GNU/Linux'
x_Dist_Zilla:
perl:
- version: 5.018000
+ version: 5.019003
plugins:
-
class: Dist::Zilla::Plugin::Git::NextVersion
@@ -97,15 +104,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.32
+ 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:
@@ -130,31 +147,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'
@@ -180,7 +197,7 @@ x_Dist_Zilla:
script_finder:
- ':ExecFiles'
name: '@Author::KENTNL/Test::Compile'
- version: 2.023
+ version: 2.033
-
class: Dist::Zilla::Plugin::Test::Perl::Critic
name: '@Author::KENTNL/Test::Perl::Critic'
@@ -188,15 +205,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'
@@ -204,11 +221,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:
@@ -216,7 +233,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:
@@ -224,7 +241,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:
@@ -232,7 +249,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'
@@ -240,11 +257,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'
@@ -264,11 +281,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'
@@ -292,7 +309,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'
@@ -332,7 +349,7 @@ x_Dist_Zilla:
- Test::More
- Dist::Zilla::PluginBundle::Author::KENTNL
name: '@Author::KENTNL/Prereqs::MatchInstalled'
- version: 0.1.1
+ version: 0.1.2
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -340,34 +357,34 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
- version: 4.300037
+ version: 4.300039
-
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 7c1b58b..1f8037e 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.
VERSION
- version 0.1.0
+ version 0.2.0
SYNOPSIS
For consuming plugins:
@@ -27,15 +27,112 @@ SYNOPSIS
REQUIRED METHODS
"bootstrap"
+ Any user specified "bootstrap" method will be invoked during
+ "plugin_from_config".
+
+ This is AFTER "->new", AFTER "->BUILD", and AFTER "dzil"'s internal
+ "plugin_from_config" steps.
+
+ This occurs within the "register_component" phase of the plug-in loading
+ and configuration.
+
+ This also occurs BEFORE "Dist::Zilla" attaches the plug-in into the
+ plug-in stash.
+
ATTRIBUTES
"distname"
+ The name of the distribution.
+
+ This value is vivified by asking "zilla->name".
+
+ Usually this value is populated by "dist.ini" in the property "name"
+
+ However, occasionally, this value is discovered by a "plugin".
+
+ In such a case, that plugin cannot be bootstrapped, because that plugin
+ MUST be loaded prior to bootstrap.
+
"try_built"
+ This attribute controls how the consuming "plugin" behaves.
+
+ * false (default) : bootstrapping is only done to "PROJECTROOT/lib"
+
+ * true : bootstrap attempts to try
+ "PROJECTROOT/<distname>-<version>/lib"
+
"fallback"
+ This attribute is for use in conjunction with "try_built"
+
+ * "false" : When "PROJECTROOT/<distname>-<version>" does not exist,
+ don't perform any bootstrapping
+
+ * "true" (default) : When "PROJECTROOT/<distname>-<version>" does not
+ exist, bootstrap to "PROJECTROOT/lib"
+
+ "try_built_method"
+ This attribute controls how "try_built" behaves when multiple
+ directories exist that match "PROJECTROOT/<distname>-.*"
+
+ Two valid options at this time:
+
+ * "mtime" (default) : Pick the directory with the most recent "mtime"
+
+ * "parseversion" : Attempt to parse versions on all candidate
+ directories and use the one with the largest version.
+
+ Prior to 0.2.0 this property did not exist, and default behaviour was to
+ assume "0 Candidates" and "2 or more Candidates" were the same problem.
+
PRIVATE ATTRIBUTES
"_cwd"
"_bootstrap_root"
+ Internal: This is the real legwork, and resolves the base directory
+ using the bootstrap resolution protocol.
+
+ It should always return a project root of some kind, whether it be a
+ source tree, or built source tree.
+
+ It can also return "undef" if discovery concludes that no bootstrap can
+ or should be performed.
+
PRIVATE METHODS
+ "_pick_latest_mtime"
+ "Latest" "mtime" candidate selector
+
+ my $directory = $self->_pick_latest_mtime(@directory_objects)
+
+ "_get_candidate_version"
+ Attempt to resolve a version from a directory name
+
+ my $version = $self->_get_candidate_version($directory_object)
+
+ NOTE: At this time, the presence of "-TRIAL" is simply stripped and
+ ignored
+
+ "_pick_latest_parseversion"
+ "Latest" "version" candidate selector
+
+ my $directory = $self->_pick_latest_parseversion(@directory_objects)
+
+ "_pick_candidate"
+ Pick a directory from a list of candidates using the method described by
+ "try_built_method"
+
+ my $directory = $self->_pick_candidate( @directory_objects );
+
"_add_inc"
+ Internal: Used to perform the final step of injecting library paths into
+ @INC
+
+ $self->_add_inc("$libraryPath");
+
+PRIVATE FUNCTIONS
+ "_max_by"
+ Proxy for "List::UtilsBy::max_by"
+
+ "_nmax_by"
+ Proxy for "List::UtilsBy::nmax_by"
+
AUTHOR
Kent Fredric <kentfredric at gmail.com>
diff --git a/dist.ini b/dist.ini
index e4bab41..12df089 100644
--- a/dist.ini
+++ b/dist.ini
@@ -4,8 +4,9 @@ author = Kent Fredric <kentfredric at gmail.com>
license = Perl_5
copyright_holder = Kent Fredric <kentfredric at gmail.com>
-; Uncomment this to bootstrap via self
+; Uncomment this to bootstrap via self
; [Bootstrap::lib]
+; try_built = 1
[@Author::KENTNL]
:version = 1.2.0
diff --git a/lib/Dist/Zilla/Role/Bootstrap.pm b/lib/Dist/Zilla/Role/Bootstrap.pm
index 8478e53..346cdd9 100644
--- a/lib/Dist/Zilla/Role/Bootstrap.pm
+++ b/lib/Dist/Zilla/Role/Bootstrap.pm
@@ -6,7 +6,7 @@ BEGIN {
$Dist::Zilla::Role::Bootstrap::AUTHORITY = 'cpan:KENTNL';
}
{
- $Dist::Zilla::Role::Bootstrap::VERSION = '0.1.0';
+ $Dist::Zilla::Role::Bootstrap::VERSION = '0.2.0';
}
# ABSTRACT: Shared logic for bootstrap things.
@@ -18,11 +18,27 @@ use MooseX::AttributeShortcuts;
with 'Dist::Zilla::Role::Plugin';
+
+sub _max_by(&@) {
+ no warnings 'redefine';
+ require List::UtilsBy;
+ *_max_by = \&List::UtilsBy::max_by;
+ goto &List::UtilsBy::max_by;
+}
+
+
+sub _nmax_by(&@) {
+ no warnings 'redefine';
+ require List::UtilsBy;
+ *_nmax_by = \&List::UtilsBy::nmax_by;
+ goto &List::UtilsBy::nmax_by;
+}
+
around 'dump_config' => sub {
my ( $orig, $self, @args ) = @_;
my $config = $self->$orig(@args);
my $localconf = {};
- for my $var (qw( try_built fallback distname )) {
+ for my $var (qw( try_built try_built_method fallback distname )) {
my $pred = 'has_' . $var;
if ( $self->can($pred) ) {
next unless $self->$pred();
@@ -66,6 +82,55 @@ has fallback => (
);
+has try_built_method => (
+ isa => 'Str',
+ is => ro =>,
+ lazy => 1,
+ builder => sub { return 'mtime' },
+);
+
+
+sub _pick_latest_mtime {
+ my ( $self, @candidates ) = @_;
+ return _max_by { $_->stat->mtime } @candidates;
+}
+
+
+sub _get_candidate_version {
+ my ( $self, $candidate ) = @_;
+ my $distname = $self->distname;
+ if ( $candidate->basename =~ /\A\Q$distname\E-(.+\z)/msx ) {
+ my $version = $1;
+ $version =~ s/-TRIAL\z//msx;
+ require version;
+ return version->parse($version);
+ }
+}
+
+
+sub _pick_latest_parseversion {
+ my ( $self, @candidates ) = @_;
+ return _max_by { $self->_get_candidate_version($_) } @candidates;
+}
+
+my (%methods) = (
+ mtime => _pick_latest_mtime =>,
+ parseversion => _pick_latest_parseversion =>,
+);
+
+
+sub _pick_candidate {
+ my ( $self, @candidates ) = @_;
+ my $method = $self->try_built_method;
+ if ( not exists $methods{$method} ) {
+ require Carp;
+ Carp::croak("No such candidate picking method $method");
+ }
+ $method = $methods{$method};
+ return $self->$method(@candidates);
+}
+
+
has _bootstrap_root => (
is => ro =>,
lazy => 1,
@@ -75,20 +140,26 @@ has _bootstrap_root => (
return $self->_cwd;
}
my $distname = $self->distname;
+
my (@candidates) = grep { $_->basename =~ /\A\Q$distname\E-/msx } grep { $_->is_dir } $self->_cwd->children;
if ( scalar @candidates == 1 ) {
return $candidates[0];
}
- $self->log_debug( [ 'candidate: %s', $_->basename ] ) for @candidates;
-
- if ( not $self->fallback ) {
- $self->log( [ 'candidates for bootstrap (%s) != 1, and fallback disabled. not bootstrapping', 0 + @candidates ] );
- return;
+ if ( scalar @candidates < 1 ) {
+ if ( not $self->fallback ) {
+ $self->log( [ 'candidates for bootstrap (%s) == 0, and fallback disabled. not bootstrapping', 0 + @candidates ] );
+ return;
+ }
+ else {
+ $self->log( [ 'candidates for bootstrap (%s) == 0, fallback to boostrapping <distname>/', 0 + @candidates ] );
+ return $self->_cwd;
+ }
}
- $self->log( [ 'candidates for bootstrap (%s) != 1, fallback to boostrapping <distname>/', 0 + @candidates ] );
- return $self->_cwd;
+ $self->log_debug( [ '>1 candidates, picking one by method %s', $self->try_built_method ] );
+ return $self->_pick_candidate(@candidates);
+
},
);
@@ -132,7 +203,7 @@ Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.
=head1 VERSION
-version 0.1.0
+version 0.2.0
=head1 SYNOPSIS
@@ -160,24 +231,124 @@ For users of plugins:
=head2 C<bootstrap>
+Any user specified C<bootstrap> method will be invoked during C<plugin_from_config>.
+
+This is B<AFTER> C<< ->new >>, B<AFTER> C<< ->BUILD >>, and B<AFTER> C<dzil>'s internal C<plugin_from_config> steps.
+
+This occurs within the C<register_component> phase of the plug-in loading and configuration.
+
+This also occurs B<BEFORE> C<Dist::Zilla> attaches the plug-in into the plug-in stash.
+
=head1 ATTRIBUTES
=head2 C<distname>
+The name of the distribution.
+
+This value is vivified by asking C<< zilla->name >>.
+
+Usually this value is populated by C<dist.ini> in the property C<name>
+
+However, occasionally, this value is discovered by a C<plugin>.
+
+In such a case, that plugin cannot be bootstrapped, because that plugin B<MUST> be loaded prior to bootstrap.
+
=head2 C<try_built>
+This attribute controls how the consuming C<plugin> behaves.
+
+=over 4
+
+=item * false B<(default)> : bootstrapping is only done to C<PROJECTROOT/lib>
+
+=item * true : bootstrap attempts to try C<< PROJECTROOT/<distname>-<version>/lib >>
+
+=back
+
=head2 C<fallback>
+This attribute is for use in conjunction with C<try_built>
+
+=over 4
+
+=item * C<false> : When C<< PROJECTROOT/<distname>-<version> >> does not exist, don't perform any bootstrapping
+
+=item * C<true> B<(default)> : When C<< PROJECTROOT/<distname>-<version> >> does not exist, bootstrap to C<< PROJECTROOT/lib >>
+
+=back
+
+=head2 C<try_built_method>
+
+This attribute controls how C<try_built> behaves when multiple directories exist that match C<< PROJECTROOT/<distname>-.* >>
+
+Two valid options at this time:
+
+=over 4
+
+=item * C<mtime> B<(default)> : Pick the directory with the most recent C<mtime>
+
+=item * C<parseversion> : Attempt to parse versions on all candidate directories and use the one with the largest version.
+
+=back
+
+Prior to C<0.2.0> this property did not exist, and default behaviour was to assume C<0 Candidates> and C<2 or more Candidates> were the same problem.
+
=head1 PRIVATE ATTRIBUTES
=head2 C<_cwd>
=head2 C<_bootstrap_root>
+Internal: This is the real legwork, and resolves the base directory using the bootstrap resolution protocol.
+
+It should always return a project root of some kind, whether it be a source tree, or built source tree.
+
+It can also return C<undef> if discovery concludes that no bootstrap can or should be performed.
+
=head1 PRIVATE METHODS
+=head2 C<_pick_latest_mtime>
+
+"Latest" C<mtime> candidate selector
+
+ my $directory = $self->_pick_latest_mtime(@directory_objects)
+
+=head2 C<_get_candidate_version>
+
+Attempt to resolve a version from a directory name
+
+ my $version = $self->_get_candidate_version($directory_object)
+
+B<NOTE:> At this time, the presence of C<-TRIAL> is simply stripped and ignored
+
+=head2 C<_pick_latest_parseversion>
+
+"Latest" C<version> candidate selector
+
+ my $directory = $self->_pick_latest_parseversion(@directory_objects)
+
+=head2 C<_pick_candidate>
+
+Pick a directory from a list of candidates using the method described by C<try_built_method>
+
+ my $directory = $self->_pick_candidate( @directory_objects );
+
=head2 C<_add_inc>
+Internal: Used to perform the final step of injecting library paths into C<@INC>
+
+ $self->_add_inc("$libraryPath");
+
+=head1 PRIVATE FUNCTIONS
+
+=head2 C<_max_by>
+
+Proxy for L<< C<List::UtilsBy::B<max_by>>|List::UtilsBy/max_by >>
+
+=head2 C<_nmax_by>
+
+Proxy for L<< C<List::UtilsBy::B<nmax_by>>|List::UtilsBy/nmax_by >>
+
=begin MetaPOD::JSON v1.1.0
{
diff --git a/perlcritic.rc b/perlcritic.rc
index 8c0d884..a59e977 100644
--- a/perlcritic.rc
+++ b/perlcritic.rc
@@ -1,5 +1,5 @@
severity = 1
-exclude = RequireTidyCode RequirePodSections ProhibitPostfixControls RequireRcsKeywords RequireExplicitPackage
+exclude = RequireTidyCode RequirePodSections ProhibitPostfixControls RequireRcsKeywords RequireExplicitPackage ProhibitNoWarnings ProhibitSubroutinePrototypes
include = Moose::ProhibitMultipleWiths Moose::ProhibitNewMethod Moose::RequireCleanNamespace Moose::RequireMakeImmutable
color = 1
verbose = 9
@@ -10,7 +10,7 @@ allow_includes = 1
[CodeLayout::ProhibitTrailingWhitespace]
[Documentation::PodSpelling]
-stop_words =
+stop_words = behaviour
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build_)\w
diff --git a/t/00-compile.t b/t/00-compile.t
index bda2a3f..ddbcada 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.023
+# 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<perlfaq8/How can I capture STDERR from an external command?>
- 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 b810946..be641fb 100644
--- a/t/000-report-versions-tiny.t
+++ b/t/000-report-versions-tiny.t
@@ -57,8 +57,11 @@ eval { $v .= pmver('Dist::Zilla::MVP::Section','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::Plugin','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('List::UtilsBy','any version') };
eval { $v .= pmver('Module::Build','0.4007') };
eval { $v .= pmver('Moose','any version') };
eval { $v .= pmver('Moose::Role','any version') };
diff --git a/t/01-basic.t b/t/01-basic.t
index 4e7a8a5..1c718b4 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -51,9 +51,10 @@ is_deeply(
$instance->dump_config,
{
'Dist::Zilla::Role::Bootstrap' => {
- distname => 'Example',
- fallback => 1,
- try_built => undef,
+ distname => 'Example',
+ fallback => 1,
+ try_built => undef,
+ try_built_method => 'mtime',
}
},
'dump_config is expected'
diff --git a/t/02-try-built-mtime.t b/t/02-try-built-mtime.t
new file mode 100644
index 0000000..34b1f79
--- /dev/null
+++ b/t/02-try-built-mtime.t
@@ -0,0 +1,90 @@
+
+use strict;
+use warnings;
+
+use Test::More;
+
+{
+
+ package Example;
+ use Moose;
+ with 'Dist::Zilla::Role::Bootstrap';
+
+ sub bootstrap {
+ 1;
+ }
+
+ __PACKAGE__->meta->make_immutable;
+ 1;
+}
+
+pass("Role Composition Check Ok");
+ok( Example->bootstrap, 'invoke basic method on composed class' );
+
+require Dist::Zilla::Chrome::Test;
+require Dist::Zilla::MVP::Section;
+require Dist::Zilla::Dist::Builder;
+require Dist::Zilla::MVP::Assembler::Zilla;
+
+my $chrome = Dist::Zilla::Chrome::Test->new();
+my $section = Dist::Zilla::MVP::Assembler::Zilla->new(
+ chrome => $chrome,
+ zilla_class => 'Dist::Zilla::Dist::Builder',
+ section_class => 'Dist::Zilla::MVP::Section',
+);
+use Path::FindDev qw( find_dev );
+use Path::Tiny qw( path );
+
+my $cwd = path('./')->absolute;
+my $source = find_dev('./')->child('corpus')->child('fake_dist_01');
+
+my $scratch = Path::Tiny->tempdir;
+use File::Copy::Recursive qw(rcopy);
+
+rcopy "$source", "$scratch";
+
+$scratch->child("Example-0.01")->child('lib')->mkpath;
+sleep 2;
+$scratch->child("Example-0.10")->child('lib')->mkpath;
+sleep 2;
+$scratch->child("Example-0.05")->child('lib')->mkpath;
+
+chdir $scratch->stringify;
+
+$section->current_section->payload->{chrome} = $chrome;
+$section->current_section->payload->{root} = $scratch->stringify;
+$section->current_section->payload->{name} = 'Example';
+$section->finalize;
+
+my $instance = Example->plugin_from_config(
+ 'testing',
+ {
+ try_built => 1,
+ try_built_method => 'mtime'
+ },
+ $section
+);
+
+is_deeply(
+ $instance->dump_config,
+ {
+ 'Dist::Zilla::Role::Bootstrap' => {
+ distname => 'Example',
+ fallback => 1,
+ try_built => 1,
+ try_built_method => 'mtime',
+ }
+ },
+ 'dump_config is expected'
+);
+
+is( $instance->distname, 'Example', 'distname is Example' );
+is( $instance->_cwd, $scratch, 'cwd is project root/' );
+is( $instance->try_built, 1, 'try_built is on' );
+is( $instance->try_built_method, 'mtime', 'try_built_method is mtime' );
+is( $instance->fallback, 1, 'fallback is on' );
+is( $instance->_bootstrap_root, $scratch->child('Example-0.05'), '_bootstrap_root == _cwd' );
+ok( $instance->can('_add_inc'), '_add_inc method exists' );
+
+chdir $cwd->stringify;
+done_testing;
diff --git a/t/01-basic.t b/t/03-try-built-parseversion.t
similarity index 51%
copy from t/01-basic.t
copy to t/03-try-built-parseversion.t
index 4e7a8a5..9ed6800 100644
--- a/t/01-basic.t
+++ b/t/03-try-built-parseversion.t
@@ -35,8 +35,17 @@ my $section = Dist::Zilla::MVP::Assembler::Zilla->new(
use Path::FindDev qw( find_dev );
use Path::Tiny qw( path );
-my $cwd = path('./')->absolute;
-my $scratch = find_dev('./')->child('corpus')->child('fake_dist_01');
+my $cwd = path('./')->absolute;
+my $source = find_dev('./')->child('corpus')->child('fake_dist_01');
+
+my $scratch = Path::Tiny->tempdir;
+use File::Copy::Recursive qw(rcopy);
+
+rcopy "$source", "$scratch";
+
+$scratch->child("Example-0.01")->child('lib')->mkpath;
+$scratch->child("Example-0.10")->child('lib')->mkpath;
+$scratch->child("Example-0.05")->child('lib')->mkpath;
chdir $scratch->stringify;
@@ -45,25 +54,36 @@ $section->current_section->payload->{root} = $scratch->stringify;
$section->current_section->payload->{name} = 'Example';
$section->finalize;
-my $instance = Example->plugin_from_config( 'testing', {}, $section );
+my $instance = Example->plugin_from_config(
+ 'testing',
+ {
+ try_built => 1,
+ try_built_method => 'parseversion'
+ },
+ $section
+);
is_deeply(
$instance->dump_config,
{
'Dist::Zilla::Role::Bootstrap' => {
- distname => 'Example',
- fallback => 1,
- try_built => undef,
+ distname => 'Example',
+ fallback => 1,
+ try_built => 1,
+ try_built_method => 'parseversion',
}
},
'dump_config is expected'
);
-is( $instance->distname, 'Example', 'distname is Example' );
-is( $instance->_cwd, $scratch, 'cwd is project root/' );
-is( $instance->try_built, undef, 'try_built is off' );
-is( $instance->fallback, 1, 'fallback is on' );
-is( $instance->_bootstrap_root, $scratch, '_bootstrap_root == _cwd' );
+is( $instance->distname, 'Example', 'distname is Example' );
+is( $instance->_cwd, $scratch, 'cwd is project root/' );
+is( $instance->try_built, 1, 'try_built is on' );
+is( $instance->try_built_method, 'parseversion', 'try_built_method is parseversion' );
+
+is( $instance->fallback, 1, 'fallback is on' );
+is( $instance->_bootstrap_root, $scratch->child('Example-0.10'), '_bootstrap_root == _cwd' );
ok( $instance->can('_add_inc'), '_add_inc method exists' );
+chdir $cwd->stringify;
done_testing;
diff --git a/weaver.ini b/weaver.ini
index 735607b..55ce96e 100644
--- a/weaver.ini
+++ b/weaver.ini
@@ -24,18 +24,6 @@ command = method
[Collect / ATTRIBUTES]
command = attr
-;[Collect / FILTER_METHODS]
-;header = FILTER METHODS
-;command = filter
-
-;[Collect / TERMINATOR_LIST_METHODS]
-;header = TERMINATOR LIST METHODS
-;command = terminator
-
-;[Collect / MIRROR_LIST_METHODS]
-;header = MIRROR LIST METHODS
-;command = mirrorlist
-
[Collect / PRIVATE_ATTRIBUTES]
header = PRIVATE ATTRIBUTES
command = p_attr
@@ -44,6 +32,10 @@ command = p_attr
header = PRIVATE METHODS
command = p_method
+[Collect / PRIVATE_FUNCTIONS]
+header = PRIVATE FUNCTIONS
+command = p_func
+
[Leftovers]
[Region / postlude]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-role-bootstrap-perl.git
More information about the Pkg-perl-cvs-commits
mailing list