This is an automated email from the git hooks/post-receive script. abe pushed a commit to annotated tag 0.1.0 in repository libdist-zilla-role-bootstrap-perl.
commit cdd2d18df25171dd876f3b42e62ba6e2d0c5c233 Author: Kent Fredric <kentfred...@gmail.com> Date: Wed Sep 4 23:25:49 2013 +1200 Build results of 342f98e (on master) --- .perltidyrc | 2 + .travis.yml | 11 + Build.PL | 67 +++++ Changes | 5 + LICENSE | 379 +++++++++++++++++++++++++ MANIFEST | 26 ++ META.json | 506 ++++++++++++++++++++++++++++++++++ META.yml | 373 +++++++++++++++++++++++++ README | 48 ++++ corpus/fake_dist_01/lib/E.pm | 0 corpus/fake_dist_01/t/placeholder.txt | 0 dist.ini | 24 ++ lib/Dist/Zilla/Role/Bootstrap.pm | 203 ++++++++++++++ perlcritic.rc | 23 ++ t/00-compile.t | 43 +++ t/000-report-versions-tiny.t | 97 +++++++ t/01-basic.t | 69 +++++ weaver.ini | 54 ++++ xt/author/critic.t | 12 + xt/release/cpan-changes.t | 11 + xt/release/distmeta.t | 7 + xt/release/eol.t | 8 + xt/release/kwalitee.t | 4 + xt/release/minimum-version.t | 8 + xt/release/pod-coverage.t | 13 + xt/release/pod-syntax.t | 7 + 26 files changed, 2000 insertions(+) diff --git a/.perltidyrc b/.perltidyrc new file mode 100644 index 0000000..3af28b5 --- /dev/null +++ b/.perltidyrc @@ -0,0 +1,2 @@ +-i 2 +-l 130 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..481c4de --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: perl +perl: + - "5.16" + - "5.14" + - "5.18" + - "5.19" +branches: + only: + - "build/master" + - "releases" + diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..33027ac --- /dev/null +++ b/Build.PL @@ -0,0 +1,67 @@ + +use strict; +use warnings; + +use Module::Build 0.3601; + + +my %module_build_args = ( + "build_requires" => { + "Module::Build" => "0.4007" + }, + "configure_requires" => { + "Module::Build" => "0.4007" + }, + "dist_abstract" => "Shared logic for bootstrap things.", + "dist_author" => [ + "Kent Fredric <kentfredric\@gmail.com>" + ], + "dist_name" => "Dist-Zilla-Role-Bootstrap", + "dist_version" => "0.1.0", + "license" => "perl", + "module_name" => "Dist::Zilla::Role::Bootstrap", + "recommends" => {}, + "recursive_test_files" => 1, + "requires" => { + "Carp" => 0, + "Cwd" => 0, + "Dist::Zilla::Role::Plugin" => 0, + "Moose::Role" => 0, + "MooseX::AttributeShortcuts" => 0, + "Path::Tiny" => 0, + "lib" => 0, + "perl" => "v5.10.0", + "strict" => 0, + "warnings" => 0 + }, + "script_files" => [], + "test_requires" => { + "Dist::Zilla::Chrome::Test" => 0, + "Dist::Zilla::Dist::Builder" => 0, + "Dist::Zilla::MVP::Assembler::Zilla" => 0, + "Dist::Zilla::MVP::Section" => 0, + "IO::Handle" => 0, + "IPC::Open3" => 0, + "Moose" => 0, + "Path::FindDev" => 0, + "Test::More" => "0.98" + } +); + + +unless ( eval { Module::Build->VERSION(0.4004) } ) { + my $tr = delete $module_build_args{test_requires}; + my $br = $module_build_args{build_requires}; + for my $mod ( keys %$tr ) { + if ( exists $br->{$mod} ) { + $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; + } + else { + $br->{$mod} = $tr->{$mod}; + } + } +} + +my $build = Module::Build->new(%module_build_args); + +$build->create_build_script; diff --git a/Changes b/Changes new file mode 100644 index 0000000..48fea49 --- /dev/null +++ b/Changes @@ -0,0 +1,5 @@ +Release history for Dist-Zilla-Role-Bootstrap + +0.1.0 2013-09-04T11:24:24Z + - First version. + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..648d54d --- /dev/null +++ b/LICENSE @@ -0,0 +1,379 @@ +This software is copyright (c) 2013 by Kent Fredric <kentfred...@gmail.com>. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +Terms of the Perl programming language system itself + +a) the GNU General Public License as published by the Free + Software Foundation; either version 1, or (at your option) any + later version, or +b) the "Artistic License" + +--- The GNU General Public License, Version 1, February 1989 --- + +This software is Copyright (c) 2013 by Kent Fredric <kentfred...@gmail.com>. + +This is free software, licensed under: + + The GNU General Public License, Version 1, February 1989 + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! + + +--- The Artistic License 1.0 --- + +This software is Copyright (c) 2013 by Kent Fredric <kentfred...@gmail.com>. + +This is free software, licensed under: + + The Artistic License 1.0 + +The Artistic License + +Preamble + +The intent of this document is to state the conditions under which a Package +may be copied, such that the Copyright Holder maintains some semblance of +artistic control over the development of the package, while giving the users of +the package the right to use and distribute the Package in a more-or-less +customary fashion, plus the right to make reasonable modifications. + +Definitions: + + - "Package" refers to the collection of files distributed by the Copyright + Holder, and derivatives of that collection of files created through + textual modification. + - "Standard Version" refers to such a Package if it has not been modified, + or has been modified in accordance with the wishes of the Copyright + Holder. + - "Copyright Holder" is whoever is named in the copyright or copyrights for + the package. + - "You" is you, if you're thinking about copying or distributing this Package. + - "Reasonable copying fee" is whatever you can justify on the basis of media + cost, duplication charges, time of people involved, and so on. (You will + not be required to justify it to the Copyright Holder, but only to the + computing community at large as a market that must bear the fee.) + - "Freely Available" means that no fee is charged for the item itself, though + there may be fees involved in handling the item. It also means that + recipients of the item may redistribute it under the same conditions they + received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications derived +from the Public Domain or from the Copyright Holder. A Package modified in such +a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided that +you insert a prominent notice in each changed file stating how and when you +changed that file, and provided that you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or an + equivalent medium, or placing the modifications on a major archive site + such as ftp.uu.net, or by allowing the Copyright Holder to include your + modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict with + standard executables, which must also be provided, and provide a separate + manual page for each non-standard executable that clearly documents how it + differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or executable +form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where to + get the Standard Version. + + b) accompany the distribution with the machine-readable source of the Package + with your modifications. + + c) accompany any non-standard executables with their corresponding Standard + Version executables, giving the non-standard executables non-standard + names, and clearly documenting the differences in manual pages (or + equivalent), together with instructions on where to get the Standard + Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this Package. You +may not charge a fee for this Package itself. However, you may distribute this +Package in aggregate with other (possibly commercial) programs as part of a +larger (possibly commercial) software distribution provided that you do not +advertise this Package as a product of your own. + +6. The scripts and library files supplied as input to or produced as output +from the programs of this Package do not automatically fall under the copyright +of this Package, but belong to whomever generated them, and may be sold +commercially, and may be aggregated with this Package. + +7. C or perl subroutines supplied by you and linked into this Package shall not +be considered part of this Package. + +8. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End + diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..495683c --- /dev/null +++ b/MANIFEST @@ -0,0 +1,26 @@ +.perltidyrc +.travis.yml +Build.PL +Changes +LICENSE +MANIFEST +META.json +META.yml +README +corpus/fake_dist_01/lib/E.pm +corpus/fake_dist_01/t/placeholder.txt +dist.ini +lib/Dist/Zilla/Role/Bootstrap.pm +perlcritic.rc +t/00-compile.t +t/000-report-versions-tiny.t +t/01-basic.t +weaver.ini +xt/author/critic.t +xt/release/cpan-changes.t +xt/release/distmeta.t +xt/release/eol.t +xt/release/kwalitee.t +xt/release/minimum-version.t +xt/release/pod-coverage.t +xt/release/pod-syntax.t diff --git a/META.json b/META.json new file mode 100644 index 0000000..3e6904e --- /dev/null +++ b/META.json @@ -0,0 +1,506 @@ +{ + "abstract" : "Shared logic for bootstrap things.", + "author" : [ + "Kent Fredric <kentfred...@gmail.com>" + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.132140", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Dist-Zilla-Role-Bootstrap", + "prereqs" : { + "build" : { + "requires" : { + "Module::Build" : "0.4007" + } + }, + "configure" : { + "requires" : { + "Module::Build" : "0.4007" + } + }, + "develop" : { + "recommends" : { + "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "v1.3.0" + }, + "requires" : { + "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "0", + "Pod::Coverage::TrustPod" : "0", + "Test::CPAN::Changes" : "0.19", + "Test::CPAN::Meta" : "0", + "Test::Kwalitee" : "1.08", + "Test::Pod" : "1.41", + "Test::Pod::Coverage" : "1.08", + "version" : "0.9901" + }, + "suggests" : { + "Dist::Zilla::PluginBundle::Author::KENTNL" : "v1.8.3" + } + }, + "runtime" : { + "requires" : { + "Carp" : "0", + "Cwd" : "0", + "Dist::Zilla::Role::Plugin" : "0", + "Moose::Role" : "0", + "MooseX::AttributeShortcuts" : "0", + "Path::Tiny" : "0", + "lib" : "0", + "perl" : "v5.10.0", + "strict" : "0", + "warnings" : "0" + } + }, + "test" : { + "requires" : { + "Dist::Zilla::Chrome::Test" : "0", + "Dist::Zilla::Dist::Builder" : "0", + "Dist::Zilla::MVP::Assembler::Zilla" : "0", + "Dist::Zilla::MVP::Section" : "0", + "IO::Handle" : "0", + "IPC::Open3" : "0", + "Moose" : "0", + "Path::FindDev" : "0", + "Test::More" : "0.98" + } + } + }, + "provides" : { + "Dist::Zilla::Role::Bootstrap" : { + "file" : "lib/Dist/Zilla/Role/Bootstrap.pm", + "version" : "v0.1.0" + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "web" : "https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap/issues" + }, + "homepage" : "https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap", + "repository" : { + "type" : "git", + "url" : "https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap.git", + "web" : "https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap" + } + }, + "version" : "0.1.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", + "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", + "Module::Build" : "0.4007", + "Moose" : "2.1005", + "Moose::Role" : "2.1005", + "MooseX::AttributeShortcuts" : "0.020", + "Path::FindDev" : "0.2.0", + "Path::Tiny" : "0.031", + "Pod::Coverage::TrustPod" : "0.100002", + "Test::CPAN::Changes" : "0.23", + "Test::CPAN::Meta" : "0.23", + "Test::Kwalitee" : "1.13", + "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", + "warnings" : "1.18" + }, + "perl" : { + "original" : "v5.18.0", + "qv" : 1, + "version" : [ + 5, + 18, + 0 + ] + }, + "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" + }, + "x_Dist_Zilla" : { + "perl" : { + "version" : "5.018000" + }, + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::Git::NextVersion", + "name" : "@Author::KENTNL/Git::NextVersion", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "@Author::KENTNL/MetaConfig", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::GithubMeta", + "name" : "@Author::KENTNL/GithubMeta", + "version" : "0.32" + }, + { + "class" : "Dist::Zilla::Plugin::MetaProvides::Package", + "name" : "@Author::KENTNL/MetaProvides::Package", + "version" : "1.14000003" + }, + { + "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith", + "config" : { + "Dist::Zilla::Plugin::MetaData::BuiltWith" : { + "_stash_key" : "x_BuiltWith", + "show_config" : "1", + "show_uname" : "1", + "uname" : { + "uname_args" : [ + "-s", + "-o", + "-r", + "-m", + "-i" + ], + "uname_call" : "uname" + } + } + }, + "name" : "@Author::KENTNL/MetaData::BuiltWith", + "version" : "0.03000100" + }, + { + "class" : "Dist::Zilla::Plugin::Git::GatherDir", + "name" : "@Author::KENTNL/Git::GatherDir", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::License", + "name" : "@Author::KENTNL/License", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "@Author::KENTNL/MetaJSON", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::MetaYAML", + "name" : "@Author::KENTNL/MetaYAML", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Manifest", + "name" : "@Author::KENTNL/Manifest", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::MetaTests", + "name" : "@Author::KENTNL/MetaTests", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::PodCoverageTests", + "name" : "@Author::KENTNL/PodCoverageTests", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::PodSyntaxTests", + "name" : "@Author::KENTNL/PodSyntaxTests", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", + "name" : "@Author::KENTNL/ReportVersions::Tiny", + "version" : "1.09" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Kwalitee", + "name" : "@Author::KENTNL/Test::Kwalitee", + "version" : "2.06" + }, + { + "class" : "Dist::Zilla::Plugin::EOLTests", + "name" : "@Author::KENTNL/EOLTests", + "version" : "0.02" + }, + { + "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", + "name" : "@Author::KENTNL/Test::MinimumVersion", + "version" : "2.000005" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Compile", + "config" : { + "Dist::Zilla::Plugin::Test::Compile" : { + "module_finder" : [ + ":InstallModules" + ], + "script_finder" : [ + ":ExecFiles" + ] + } + }, + "name" : "@Author::KENTNL/Test::Compile", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", + "name" : "@Author::KENTNL/Test::Perl::Critic", + "version" : "2.112410" + }, + { + "class" : "Dist::Zilla::Plugin::PruneCruft", + "name" : "@Author::KENTNL/PruneCruft", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::ManifestSkip", + "name" : "@Author::KENTNL/ManifestSkip", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::PkgVersion", + "name" : "@Author::KENTNL/PkgVersion", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::PodWeaver", + "name" : "@Author::KENTNL/PodWeaver", + "version" : "3.101642" + }, + { + "class" : "Dist::Zilla::Plugin::NextRelease", + "name" : "@Author::KENTNL/NextRelease", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::AutoPrereqs", + "name" : "@Author::KENTNL/AutoPrereqs", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "requires" + } + }, + "name" : "@Author::KENTNL/Prereqs/BundleDevelNeeds", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "recommends" + } + }, + "name" : "@Author::KENTNL/Prereqs/BundleDevelRecommends", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "suggests" + } + }, + "name" : "@Author::KENTNL/Prereqs/BundleDevelSuggests", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl", + "name" : "@Author::KENTNL/Author::KENTNL::MinimumPerl", + "version" : "1.8.3" + }, + { + "class" : "Dist::Zilla::Plugin::Authority", + "name" : "@Author::KENTNL/Authority", + "version" : "1.007" + }, + { + "class" : "Dist::Zilla::Plugin::ModuleBuild", + "name" : "@Author::KENTNL/ModuleBuild", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeFromPod", + "name" : "@Author::KENTNL/ReadmeFromPod", + "version" : "0.18" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "name" : "@Author::KENTNL/ReadmeAnyFromPod", + "version" : "0.131500" + }, + { + "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", + "name" : "@Author::KENTNL/Test::CPAN::Changes", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::CheckExtraTests", + "name" : "@Author::KENTNL/CheckExtraTests", + "version" : "0.011" + }, + { + "class" : "Dist::Zilla::Plugin::TestRelease", + "name" : "@Author::KENTNL/TestRelease", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::ConfirmRelease", + "name" : "@Author::KENTNL/ConfirmRelease", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Check", + "name" : "@Author::KENTNL/Git::Check", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Tag", + "name" : "@Author::KENTNL/Git::Tag/tag_master", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Commit", + "name" : "@Author::KENTNL/Git::Commit", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CommitBuild", + "name" : "@Author::KENTNL/Git::CommitBuild", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Tag", + "name" : "@Author::KENTNL/Git::Tag/tag_release", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::UploadToCPAN", + "name" : "@Author::KENTNL/UploadToCPAN", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::Twitter", + "name" : "@Author::KENTNL/Twitter", + "version" : "0.021" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs::MatchInstalled", + "config" : { + "Dist::Zilla::Plugin::Prereqs::MatchInstalled" : { + "applyto" : [ + "build.requires", + "build.recommends", + "build.suggests", + "test.requires", + "test.recommends", + "test.suggests", + "runtime.requires", + "runtime.recommends", + "runtime.suggests", + "configure.requires", + "configure.recommends", + "configure.suggests", + "develop.requires", + "develop.recommends", + "develop.suggests" + ], + "applyto_phase" : [ + "build", + "test", + "runtime", + "configure", + "develop" + ], + "applyto_relation" : [ + "requires", + "recommends", + "suggests" + ], + "modules" : [ + "Module::Build", + "Test::More", + "Dist::Zilla::PluginBundle::Author::KENTNL" + ] + } + }, + "name" : "@Author::KENTNL/Prereqs::MatchInstalled", + "version" : "0.1.1" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "runtime", + "type" : "requires" + } + }, + "name" : "Prereqs", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "4.300037" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "4.300037" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : "0" + }, + "version" : "4.300037" + } + }, + "x_authority" : "cpan:KENTNL" +} + diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..765dacf --- /dev/null +++ b/META.yml @@ -0,0 +1,373 @@ +--- +abstract: 'Shared logic for bootstrap things.' +author: + - 'Kent Fredric <kentfred...@gmail.com>' +build_requires: + Dist::Zilla::Chrome::Test: 0 + Dist::Zilla::Dist::Builder: 0 + Dist::Zilla::MVP::Assembler::Zilla: 0 + Dist::Zilla::MVP::Section: 0 + IO::Handle: 0 + IPC::Open3: 0 + Module::Build: 0.4007 + Moose: 0 + Path::FindDev: 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' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Dist-Zilla-Role-Bootstrap +provides: + Dist::Zilla::Role::Bootstrap: + file: lib/Dist/Zilla/Role/Bootstrap.pm + version: v0.1.0 +requires: + Carp: 0 + Cwd: 0 + Dist::Zilla::Role::Plugin: 0 + Moose::Role: 0 + MooseX::AttributeShortcuts: 0 + Path::Tiny: 0 + lib: 0 + perl: v5.10.0 + strict: 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 +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 + 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 + Module::Build: 0.4007 + Moose: 2.1005 + Moose::Role: 2.1005 + MooseX::AttributeShortcuts: 0.020 + Path::FindDev: 0.2.0 + Path::Tiny: 0.031 + Pod::Coverage::TrustPod: 0.100002 + Test::CPAN::Changes: 0.23 + Test::CPAN::Meta: 0.23 + Test::Kwalitee: 1.13 + 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 + warnings: 1.18 + perl: + original: v5.18.0 + qv: 1 + version: + - 5 + - 18 + - 0 + 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' +x_Dist_Zilla: + perl: + version: 5.018000 + plugins: + - + class: Dist::Zilla::Plugin::Git::NextVersion + name: '@Author::KENTNL/Git::NextVersion' + version: 2.014 + - + class: Dist::Zilla::Plugin::MetaConfig + name: '@Author::KENTNL/MetaConfig' + version: 4.300037 + - + class: Dist::Zilla::Plugin::GithubMeta + name: '@Author::KENTNL/GithubMeta' + version: 0.32 + - + class: Dist::Zilla::Plugin::MetaProvides::Package + name: '@Author::KENTNL/MetaProvides::Package' + version: 1.14000003 + - + class: Dist::Zilla::Plugin::MetaData::BuiltWith + config: + Dist::Zilla::Plugin::MetaData::BuiltWith: + _stash_key: x_BuiltWith + show_config: 1 + show_uname: 1 + uname: + uname_args: + - '-s' + - '-o' + - '-r' + - '-m' + - '-i' + uname_call: uname + name: '@Author::KENTNL/MetaData::BuiltWith' + version: 0.03000100 + - + class: Dist::Zilla::Plugin::Git::GatherDir + name: '@Author::KENTNL/Git::GatherDir' + version: 2.014 + - + class: Dist::Zilla::Plugin::License + name: '@Author::KENTNL/License' + version: 4.300037 + - + class: Dist::Zilla::Plugin::MetaJSON + name: '@Author::KENTNL/MetaJSON' + version: 4.300037 + - + class: Dist::Zilla::Plugin::MetaYAML + name: '@Author::KENTNL/MetaYAML' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Manifest + name: '@Author::KENTNL/Manifest' + version: 4.300037 + - + class: Dist::Zilla::Plugin::MetaTests + name: '@Author::KENTNL/MetaTests' + version: 4.300037 + - + class: Dist::Zilla::Plugin::PodCoverageTests + name: '@Author::KENTNL/PodCoverageTests' + version: 4.300037 + - + class: Dist::Zilla::Plugin::PodSyntaxTests + name: '@Author::KENTNL/PodSyntaxTests' + version: 4.300037 + - + class: Dist::Zilla::Plugin::ReportVersions::Tiny + name: '@Author::KENTNL/ReportVersions::Tiny' + version: 1.09 + - + class: Dist::Zilla::Plugin::Test::Kwalitee + name: '@Author::KENTNL/Test::Kwalitee' + version: 2.06 + - + class: Dist::Zilla::Plugin::EOLTests + name: '@Author::KENTNL/EOLTests' + version: 0.02 + - + class: Dist::Zilla::Plugin::Test::MinimumVersion + name: '@Author::KENTNL/Test::MinimumVersion' + version: 2.000005 + - + class: Dist::Zilla::Plugin::Test::Compile + config: + Dist::Zilla::Plugin::Test::Compile: + module_finder: + - ':InstallModules' + script_finder: + - ':ExecFiles' + name: '@Author::KENTNL/Test::Compile' + version: 2.023 + - + class: Dist::Zilla::Plugin::Test::Perl::Critic + name: '@Author::KENTNL/Test::Perl::Critic' + version: 2.112410 + - + class: Dist::Zilla::Plugin::PruneCruft + name: '@Author::KENTNL/PruneCruft' + version: 4.300037 + - + class: Dist::Zilla::Plugin::ManifestSkip + name: '@Author::KENTNL/ManifestSkip' + version: 4.300037 + - + class: Dist::Zilla::Plugin::PkgVersion + name: '@Author::KENTNL/PkgVersion' + version: 4.300037 + - + class: Dist::Zilla::Plugin::PodWeaver + name: '@Author::KENTNL/PodWeaver' + version: 3.101642 + - + class: Dist::Zilla::Plugin::NextRelease + name: '@Author::KENTNL/NextRelease' + version: 4.300037 + - + class: Dist::Zilla::Plugin::AutoPrereqs + name: '@Author::KENTNL/AutoPrereqs' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: requires + name: '@Author::KENTNL/Prereqs/BundleDevelNeeds' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: recommends + name: '@Author::KENTNL/Prereqs/BundleDevelRecommends' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: suggests + name: '@Author::KENTNL/Prereqs/BundleDevelSuggests' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl + name: '@Author::KENTNL/Author::KENTNL::MinimumPerl' + version: 1.8.3 + - + class: Dist::Zilla::Plugin::Authority + name: '@Author::KENTNL/Authority' + version: 1.007 + - + class: Dist::Zilla::Plugin::ModuleBuild + name: '@Author::KENTNL/ModuleBuild' + version: 4.300037 + - + class: Dist::Zilla::Plugin::ReadmeFromPod + name: '@Author::KENTNL/ReadmeFromPod' + version: 0.18 + - + class: Dist::Zilla::Plugin::ReadmeAnyFromPod + name: '@Author::KENTNL/ReadmeAnyFromPod' + version: 0.131500 + - + class: Dist::Zilla::Plugin::Test::CPAN::Changes + name: '@Author::KENTNL/Test::CPAN::Changes' + version: 0.008 + - + class: Dist::Zilla::Plugin::CheckExtraTests + name: '@Author::KENTNL/CheckExtraTests' + version: 0.011 + - + class: Dist::Zilla::Plugin::TestRelease + name: '@Author::KENTNL/TestRelease' + version: 4.300037 + - + class: Dist::Zilla::Plugin::ConfirmRelease + name: '@Author::KENTNL/ConfirmRelease' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Git::Check + name: '@Author::KENTNL/Git::Check' + version: 2.014 + - + class: Dist::Zilla::Plugin::Git::Tag + name: '@Author::KENTNL/Git::Tag/tag_master' + version: 2.014 + - + class: Dist::Zilla::Plugin::Git::Commit + name: '@Author::KENTNL/Git::Commit' + version: 2.014 + - + class: Dist::Zilla::Plugin::Git::CommitBuild + name: '@Author::KENTNL/Git::CommitBuild' + version: 2.014 + - + class: Dist::Zilla::Plugin::Git::Tag + name: '@Author::KENTNL/Git::Tag/tag_release' + version: 2.014 + - + class: Dist::Zilla::Plugin::UploadToCPAN + name: '@Author::KENTNL/UploadToCPAN' + version: 4.300037 + - + class: Dist::Zilla::Plugin::Twitter + name: '@Author::KENTNL/Twitter' + version: 0.021 + - + class: Dist::Zilla::Plugin::Prereqs::MatchInstalled + config: + Dist::Zilla::Plugin::Prereqs::MatchInstalled: + applyto: + - build.requires + - build.recommends + - build.suggests + - test.requires + - test.recommends + - test.suggests + - runtime.requires + - runtime.recommends + - runtime.suggests + - configure.requires + - configure.recommends + - configure.suggests + - develop.requires + - develop.recommends + - develop.suggests + applyto_phase: + - build + - test + - runtime + - configure + - develop + applyto_relation: + - requires + - recommends + - suggests + modules: + - Module::Build + - Test::More + - Dist::Zilla::PluginBundle::Author::KENTNL + name: '@Author::KENTNL/Prereqs::MatchInstalled' + version: 0.1.1 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: runtime + type: requires + name: Prereqs + version: 4.300037 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':InstallModules' + version: 4.300037 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':IncModules' + version: 4.300037 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':TestFiles' + version: 4.300037 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ExecFiles' + version: 4.300037 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ShareFiles' + version: 4.300037 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':MainModule' + version: 4.300037 + zilla: + class: Dist::Zilla::Dist::Builder + config: + is_trial: 0 + version: 4.300037 +x_authority: cpan:KENTNL diff --git a/README b/README new file mode 100644 index 0000000..7c1b58b --- /dev/null +++ b/README @@ -0,0 +1,48 @@ +NAME + Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things. + +VERSION + version 0.1.0 + +SYNOPSIS + For consuming plugins: + + use Moose; + with 'Dist::Zilla::Role::Bootstrap'; + + sub bootstrap { + my $bootstrap_root = $_[0]->_bootstrap_root; + # Do the actual bootstrap work here + $_[0]->_add_inc('./some/path/here'); + } + + For users of plugins: + + [Some::Plugin::Name] + try_built = 0 ; # use / as the root to bootstrap + try_built = 1 ; # try to use /Dist-Name-.*/ instead of / + + fallback = 0 ; # don't bootstrap at all if /Dist-Name-.*/ matches != 1 things + fallback = 1 ; # fallback to / if /Dist-Name-.*/ matches != 1 things + +REQUIRED METHODS + "bootstrap" +ATTRIBUTES + "distname" + "try_built" + "fallback" +PRIVATE ATTRIBUTES + "_cwd" + "_bootstrap_root" +PRIVATE METHODS + "_add_inc" +AUTHOR + Kent Fredric <kentfred...@gmail.com> + +COPYRIGHT AND LICENSE + This software is copyright (c) 2013 by Kent Fredric + <kentfred...@gmail.com>. + + This is free software; you can redistribute it and/or modify it under + the same terms as the Perl 5 programming language system itself. + diff --git a/corpus/fake_dist_01/lib/E.pm b/corpus/fake_dist_01/lib/E.pm new file mode 100644 index 0000000..e69de29 diff --git a/corpus/fake_dist_01/t/placeholder.txt b/corpus/fake_dist_01/t/placeholder.txt new file mode 100644 index 0000000..e69de29 diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..e4bab41 --- /dev/null +++ b/dist.ini @@ -0,0 +1,24 @@ +; Generated by Dist::Zilla::Plugin::Author::KENTNL::DistINI version 1.8.3 at Wed Sep 4 19:44:54 2013 +name = Dist-Zilla-Role-Bootstrap +author = Kent Fredric <kentfred...@gmail.com> +license = Perl_5 +copyright_holder = Kent Fredric <kentfred...@gmail.com> + +; Uncomment this to bootstrap via self +; [Bootstrap::lib] + +[@Author::KENTNL] +:version = 1.2.0 +git_versions = 1 +; version_major = 0 +; version_minor = 1 +; the following data denotes when this minor was minted +; version_rel_year = 2013 +; version_rel_month = 9 +; version_rel_day = 4 +; version_rel_hour = 19 +; version_rel_time_zone = Pacific/Auckland +twitter_hash_tags = #perl #cpan +; auto_prereqs_skip = File::Find + +[Prereqs] diff --git a/lib/Dist/Zilla/Role/Bootstrap.pm b/lib/Dist/Zilla/Role/Bootstrap.pm new file mode 100644 index 0000000..8478e53 --- /dev/null +++ b/lib/Dist/Zilla/Role/Bootstrap.pm @@ -0,0 +1,203 @@ +use strict; +use warnings; + +package Dist::Zilla::Role::Bootstrap; +BEGIN { + $Dist::Zilla::Role::Bootstrap::AUTHORITY = 'cpan:KENTNL'; +} +{ + $Dist::Zilla::Role::Bootstrap::VERSION = '0.1.0'; +} + +# ABSTRACT: Shared logic for bootstrap things. + +use Moose::Role; +use MooseX::AttributeShortcuts; + + + +with 'Dist::Zilla::Role::Plugin'; + +around 'dump_config' => sub { + my ( $orig, $self, @args ) = @_; + my $config = $self->$orig(@args); + my $localconf = {}; + for my $var (qw( try_built fallback distname )) { + my $pred = 'has_' . $var; + if ( $self->can($pred) ) { + next unless $self->$pred(); + } + if ( $self->can($var) ) { + $localconf->{$var} = $self->$var(); + } + } + $config->{ q{} . __PACKAGE__ } = $localconf; + return $config; +}; + + +has distname => ( isa => 'Str', is => ro =>, lazy => 1, builder => sub { $_[0]->zilla->name; }, ); + + +has _cwd => ( + is => ro =>, + lazy => 1, + builder => sub { + require Path::Tiny; + require Cwd; + return Path::Tiny::path( Cwd::cwd() ); + }, +); + + +has try_built => ( + isa => 'Bool', + is => ro =>, + lazy => 1, + builder => sub { return }, +); + + +has fallback => ( + isa => 'Bool', + is => ro =>, + lazy => 1, + builder => sub { return 1 }, +); + + +has _bootstrap_root => ( + is => ro =>, + lazy => 1, + builder => sub { + my ($self) = @_; + if ( not $self->try_built ) { + 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; + } + + $self->log( [ 'candidates for bootstrap (%s) != 1, fallback to boostrapping <distname>/', 0 + @candidates ] ); + return $self->_cwd; + }, +); + + +sub _add_inc { + my ( $self, $import ) = @_; + if ( not ref $import ) { + require lib; + return lib->import($import); + } + require Carp; + return Carp::croak('At this time, _add_inc(arg) only supports scalar values of arg'); +} + + +requires 'bootstrap'; + +around plugin_from_config => sub { + my ( $orig, $plugin_class, $name, $payload, $section ) = @_; + + my $instance = $plugin_class->$orig( $name, $payload, $section ); + + $instance->bootstrap; + + return $instance; +}; + +no Moose::Role; + +1; + +__END__ + +=pod + +=encoding utf-8 + +=head1 NAME + +Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things. + +=head1 VERSION + +version 0.1.0 + +=head1 SYNOPSIS + +For consuming plugins: + + use Moose; + with 'Dist::Zilla::Role::Bootstrap'; + + sub bootstrap { + my $bootstrap_root = $_[0]->_bootstrap_root; + # Do the actual bootstrap work here + $_[0]->_add_inc('./some/path/here'); + } + +For users of plugins: + + [Some::Plugin::Name] + try_built = 0 ; # use / as the root to bootstrap + try_built = 1 ; # try to use /Dist-Name-.*/ instead of / + + fallback = 0 ; # don't bootstrap at all if /Dist-Name-.*/ matches != 1 things + fallback = 1 ; # fallback to / if /Dist-Name-.*/ matches != 1 things + +=head1 REQUIRED METHODS + +=head2 C<bootstrap> + +=head1 ATTRIBUTES + +=head2 C<distname> + +=head2 C<try_built> + +=head2 C<fallback> + +=head1 PRIVATE ATTRIBUTES + +=head2 C<_cwd> + +=head2 C<_bootstrap_root> + +=head1 PRIVATE METHODS + +=head2 C<_add_inc> + +=begin MetaPOD::JSON v1.1.0 + +{ + "namespace":"Dist::Zilla::Role::Bootstrap", + "interface":"role", + "does":"Dist::Zilla::Role::Plugin" +} + + +=end MetaPOD::JSON + +=head1 AUTHOR + +Kent Fredric <kentfred...@gmail.com> + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2013 by Kent Fredric <kentfred...@gmail.com>. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff --git a/perlcritic.rc b/perlcritic.rc new file mode 100644 index 0000000..8c0d884 --- /dev/null +++ b/perlcritic.rc @@ -0,0 +1,23 @@ +severity = 1 +exclude = RequireTidyCode RequirePodSections ProhibitPostfixControls RequireRcsKeywords RequireExplicitPackage +include = Moose::ProhibitMultipleWiths Moose::ProhibitNewMethod Moose::RequireCleanNamespace Moose::RequireMakeImmutable +color = 1 +verbose = 9 + +[BuiltinFunctions::ProhibitStringyEval] +allow_includes = 1 + +[CodeLayout::ProhibitTrailingWhitespace] + +[Documentation::PodSpelling] +stop_words = + +[Subroutines::ProhibitUnusedPrivateSubroutines] +private_name_regex = _(?!build_)\w + +[TestingAndDebugging::RequireUseStrict] +equivalent_modules = Moose + +[TestingAndDebugging::RequireUseWarnings] +equivalent_modules = Moose + diff --git a/t/00-compile.t b/t/00-compile.t new file mode 100644 index 0000000..bda2a3f --- /dev/null +++ b/t/00-compile.t @@ -0,0 +1,43 @@ +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.023 + +use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); + + + +my @module_files = ( + 'Dist/Zilla/Role/Bootstrap.pm' +); + + + +# no fake home requested + +use IPC::Open3; +use IO::Handle; + +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 + my $stderr = IO::Handle->new; + + my $pid = open3($stdin, '>&STDERR', $stderr, qq{$^X -Mblib -e"require q[$lib]"}); + waitpid($pid, 0); + is($? >> 8, 0, "$lib loaded ok"); + + if (my @_warnings = <$stderr>) + { + warn @_warnings; + push @warnings, @_warnings; + } +} + + + +is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; + + diff --git a/t/000-report-versions-tiny.t b/t/000-report-versions-tiny.t new file mode 100644 index 0000000..b810946 --- /dev/null +++ b/t/000-report-versions-tiny.t @@ -0,0 +1,97 @@ +use strict; +use warnings; +use Test::More 0.88; +# This is a relatively nice way to avoid Test::NoWarnings breaking our +# expectations by adding extra tests, without using no_plan. It also helps +# avoid any other test module that feels introducing random tests, or even +# test plans, is a nice idea. +our $success = 0; +END { $success && done_testing; } + +# List our own version used to generate this +my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.09\n"; + +eval { # no excuses! + # report our Perl details + my $want = 'v5.10.0'; + $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; +}; +defined($@) and diag("$@"); + +# Now, our module version dependencies: +sub pmver { + my ($module, $wanted) = @_; + $wanted = " (want $wanted)"; + my $pmver; + eval "require $module;"; + if ($@) { + if ($@ =~ m/Can't locate .* in \@INC/) { + $pmver = 'module not found.'; + } else { + diag("${module}: $@"); + $pmver = 'died during require.'; + } + } else { + my $version; + eval { $version = $module->VERSION; }; + if ($@) { + diag("${module}: $@"); + $pmver = 'died during VERSION check.'; + } elsif (defined $version) { + $pmver = "$version"; + } else { + $pmver = '<undef>'; + } + } + + # So, we should be good, right? + return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); +} + +eval { $v .= pmver('Carp','any version') }; +eval { $v .= pmver('Cwd','any version') }; +eval { $v .= pmver('Dist::Zilla::Chrome::Test','any version') }; +eval { $v .= pmver('Dist::Zilla::Dist::Builder','any version') }; +eval { $v .= pmver('Dist::Zilla::MVP::Assembler::Zilla','any version') }; +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('IO::Handle','any version') }; +eval { $v .= pmver('IPC::Open3','any version') }; +eval { $v .= pmver('Module::Build','0.4007') }; +eval { $v .= pmver('Moose','any version') }; +eval { $v .= pmver('Moose::Role','any version') }; +eval { $v .= pmver('MooseX::AttributeShortcuts','any version') }; +eval { $v .= pmver('Path::FindDev','any version') }; +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::Kwalitee','1.08') }; +eval { $v .= pmver('Test::More','0.98') }; +eval { $v .= pmver('Test::Pod','1.41') }; +eval { $v .= pmver('Test::Pod::Coverage','1.08') }; +eval { $v .= pmver('lib','any version') }; +eval { $v .= pmver('strict','any version') }; +eval { $v .= pmver('version','0.9901') }; +eval { $v .= pmver('warnings','any version') }; + + +# All done. +$v .= <<'EOT'; + +Thanks for using my code. I hope it works for you. +If not, please try and include this output in the bug report. +That will help me reproduce the issue and solve your problem. + +EOT + +diag($v); +ok(1, "we really didn't test anything, just reporting data"); +$success = 1; + +# Work around another nasty module on CPAN. :/ +no warnings 'once'; +$Template::Test::NO_FLUSH = 1; +exit 0; diff --git a/t/01-basic.t b/t/01-basic.t new file mode 100644 index 0000000..4e7a8a5 --- /dev/null +++ b/t/01-basic.t @@ -0,0 +1,69 @@ + +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 $scratch = find_dev('./')->child('corpus')->child('fake_dist_01'); + +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', {}, $section ); + +is_deeply( + $instance->dump_config, + { + 'Dist::Zilla::Role::Bootstrap' => { + distname => 'Example', + fallback => 1, + try_built => undef, + } + }, + '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' ); +ok( $instance->can('_add_inc'), '_add_inc method exists' ); + +done_testing; diff --git a/weaver.ini b/weaver.ini new file mode 100644 index 0000000..735607b --- /dev/null +++ b/weaver.ini @@ -0,0 +1,54 @@ +[@CorePrep] +[-Encoding] + +[Name] +[Version] + +[Region / prelude] + +[Generic / SYNOPSIS] +[Generic / DESCRIPTION] +[Generic / OVERVIEW] + +;[Generic / METHODS] +;[Collect / METHODS] + +[Collect / REQUIRES] +command = requires +header = REQUIRED METHODS + +[Collect / METHODS] +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 + +[Collect / PRIVATE_METHODS] +header = PRIVATE METHODS +command = p_method + +[Leftovers] + +[Region / postlude] + +[Authors] +[Legal] + + diff --git a/xt/author/critic.t b/xt/author/critic.t new file mode 100644 index 0000000..d5b4c96 --- /dev/null +++ b/xt/author/critic.t @@ -0,0 +1,12 @@ +#!perl + +use strict; +use warnings; + +use Test::More; +use English qw(-no_match_vars); + +eval "use Test::Perl::Critic"; +plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; +Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; +all_critic_ok(); diff --git a/xt/release/cpan-changes.t b/xt/release/cpan-changes.t new file mode 100644 index 0000000..8e6e413 --- /dev/null +++ b/xt/release/cpan-changes.t @@ -0,0 +1,11 @@ +#!perl + +use strict; +use warnings; + +use Test::More 0.96 tests => 2; +use_ok('Test::CPAN::Changes'); +subtest 'changes_ok' => sub { + changes_file_ok('Changes'); +}; +done_testing(); diff --git a/xt/release/distmeta.t b/xt/release/distmeta.t new file mode 100644 index 0000000..b46c7fc --- /dev/null +++ b/xt/release/distmeta.t @@ -0,0 +1,7 @@ +#!perl + +use Test::More; + +eval "use Test::CPAN::Meta"; +plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; +meta_yaml_ok(); diff --git a/xt/release/eol.t b/xt/release/eol.t new file mode 100644 index 0000000..d13c49d --- /dev/null +++ b/xt/release/eol.t @@ -0,0 +1,8 @@ +use strict; +use warnings; +use Test::More; + +eval 'use Test::EOL'; +plan skip_all => 'Test::EOL required' if $@; + +all_perl_files_ok({ trailing_whitespace => 1 }); diff --git a/xt/release/kwalitee.t b/xt/release/kwalitee.t new file mode 100644 index 0000000..0b20dc1 --- /dev/null +++ b/xt/release/kwalitee.t @@ -0,0 +1,4 @@ +# This test is generated by Dist::Zilla::Plugin::Test::Kwalitee +use strict; +use warnings; +use Test::Kwalitee; diff --git a/xt/release/minimum-version.t b/xt/release/minimum-version.t new file mode 100644 index 0000000..d108c79 --- /dev/null +++ b/xt/release/minimum-version.t @@ -0,0 +1,8 @@ +#!perl + +use Test::More; + +eval "use Test::MinimumVersion"; +plan skip_all => "Test::MinimumVersion required for testing minimum versions" + if $@; +all_minimum_version_from_metayml_ok(); diff --git a/xt/release/pod-coverage.t b/xt/release/pod-coverage.t new file mode 100644 index 0000000..b52218b --- /dev/null +++ b/xt/release/pod-coverage.t @@ -0,0 +1,13 @@ +#!perl + +use Test::More; + +eval "use Test::Pod::Coverage 1.08"; +plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" + if $@; + +eval "use Pod::Coverage::TrustPod"; +plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" + if $@; + +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff --git a/xt/release/pod-syntax.t b/xt/release/pod-syntax.t new file mode 100644 index 0000000..8a22900 --- /dev/null +++ b/xt/release/pod-syntax.t @@ -0,0 +1,7 @@ +#!perl +use Test::More; + +eval "use Test::Pod 1.41"; +plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; + +all_pod_files_ok(); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-role-bootstrap-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits