diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Changes | 6 | ||||
-rw-r--r-- | dist.ini | 12 | ||||
-rw-r--r-- | lib/Dist/Zilla/PluginBundle/DOY.pm | 154 | ||||
-rw-r--r-- | t/000-load.t | 8 | ||||
-rw-r--r-- | weaver.ini | 36 |
6 files changed, 160 insertions, 57 deletions
@@ -9,3 +9,4 @@ Makefile.old nytprof.out MANIFEST.bak *.sw[po] +Dist-Zilla-PluginBundle-DOY-* @@ -1,4 +1,4 @@ -Revision history for Dist::Zilla::PluginBundle::DOY +Revision history for Dist-Zilla-PluginBundle-DOY -0.01 - Initial release +{{$NEXT}} + - Initial release @@ -1,10 +1,16 @@ name = Dist-Zilla-PluginBundle-DOY -version = 0.01 author = Jesse Luehrs <doy at tozt dot net> license = Perl_5 copyright_holder = Jesse Luehrs -abstract = -[@Classic] +[@DOY] +dist = Dist-Zilla-PluginBundle-DOY [Prereq] +Dist::Zilla::Plugin::BumpVersionFromGit = 0 +Dist::Zilla::Plugin::CompileTests = 0 +Dist::Zilla::Plugin::EOLTests = 0 +Dist::Zilla::Plugin::Git = 0 +Dist::Zilla::Plugin::NoTabsTests = 0 +Dist::Zilla::Plugin::PodWeaver = 0 +Dist::Zilla::Plugin::Repository = 0.12 diff --git a/lib/Dist/Zilla/PluginBundle/DOY.pm b/lib/Dist/Zilla/PluginBundle/DOY.pm index 061e3dc..8fbecfd 100644 --- a/lib/Dist/Zilla/PluginBundle/DOY.pm +++ b/lib/Dist/Zilla/PluginBundle/DOY.pm @@ -1,71 +1,139 @@ package Dist::Zilla::PluginBundle::DOY; use Moose; +# ABSTRACT: Dist::Zilla plugins for me -=head1 NAME - -Dist::Zilla::PluginBundle::DOY - +use Dist::Zilla; +with 'Dist::Zilla::Role::PluginBundle::Easy'; =head1 SYNOPSIS + # dist.ini + [@DOY] + dist = Dist-Zilla-PluginBundle-DOY =head1 DESCRIPTION +My plugin bundle. Roughly equivalent to: -=cut - -__PACKAGE__->meta->make_immutable; -no Moose; - -=head1 BUGS - -No known bugs. - -Please report any bugs through RT: email -C<bug-dist-zilla-pluginbundle-doy at rt.cpan.org>, or browse to -L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dist-Zilla-PluginBundle-DOY>. - -=head1 SEE ALSO - + [@Basic] -=head1 SUPPORT + [MetaConfig] + [MetaJSON] -You can find this documentation for this module with the perldoc command. + [NextRelease] + format = %-5v %{yyyy-MM-dd}d - perldoc Dist::Zilla::PluginBundle::DOY + [PkgVersion] -You can also look for information at: + [PodCoverageTests] + [PodSyntaxTests] + [NoTabsTests] + [EOLTests] + [CompileTests] -=over 4 + [Repository] + git_remote = git://github.com/doy/${lowercase_dist} + github_http = 0 -=item * AnnoCPAN: Annotated CPAN documentation + [Git::Check] + allow_dirty = + [Git::Tag] + tag_format = %v + tag_message = + [BumpVersionFromGit] + version_regexp = \d+\.\d+ + first_version = 0.01 -L<http://annocpan.org/dist/Dist-Zilla-PluginBundle-DOY> + [PodWeaver] -=item * CPAN Ratings - -L<http://cpanratings.perl.org/d/Dist-Zilla-PluginBundle-DOY> - -=item * RT: CPAN's request tracker - -L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-Zilla-PluginBundle-DOY> - -=item * Search CPAN - -L<http://search.cpan.org/dist/Dist-Zilla-PluginBundle-DOY> +=cut -=back +has dist => ( + is => 'ro', + isa => 'Str', + required => 1, +); + +has is_task => ( + is => 'ro', + isa => 'Bool', + lazy => 1, + default => sub { shift->dist =~ /^Task-/ ? 1 : 0 }, +); + +has is_test_dist => ( + is => 'ro', + isa => 'Bool', + lazy => 1, + default => sub { shift->dist =~ /^Foo-/ ? 1 : 0 }, +); + +has github_url => ( + is => 'ro', + isa => 'Str', + lazy => 1, + default => sub { + my $self = shift; + my $dist = $self->dist; + $dist = lc($dist); + "git://github.com/doy/$dist.git"; + }, +); + +around BUILDARGS => sub { + my $orig = shift; + my $class = shift; + my $args = $class->$orig(@_); + return { %{ $args->{payload} }, %{ $args } }; +}; + +sub configure { + my $self = shift; + + if ($self->is_test_dist) { + $self->add_bundle( + '@Filter' => { bundle => '@Basic', remove => ['UploadToCPAN'] } + ); + $self->add_plugins('FakeRelease'); + } + else { + $self->add_bundle('@Basic'); + } + + $self->add_plugins( + 'MetaConfig', + 'MetaJSON', + ['NextRelease' => { format => '%-5v %{yyyy-MM-dd}d' }], + 'PkgVersion', + 'PodCoverageTests', + 'PodSyntaxTests', + 'NoTabsTests', + 'EOLTests', + 'CompileTests', + ['Repository' => { git_remote => $self->github_url, github_http => 0 }], + ['Git::Check' => { allow_dirty => '' }], + ['Git::Tag' => { tag_format => '%v', tag_message => '' }], + ['BumpVersionFromGit' => { version_regexp => '\d+\.\d+', first_version => '0.01'}], + 'PodWeaver', + ); + + $self->add_plugins('TaskWeaver') if $self->is_task; +} -=head1 AUTHOR +=head1 SEE ALSO - Jesse Luehrs <doy at tozt dot net> +L<Dist::Zilla> +L<Task::BeLike::DOY> -=head1 COPYRIGHT AND LICENSE +=begin Pod::Coverage -This software is copyright (c) 2010 by Jesse Luehrs. + configure -This is free software; you can redistribute it and/or modify it under -the same terms as perl itself. +=end Pod::Coverage =cut +__PACKAGE__->meta->make_immutable; +no Moose; + 1; diff --git a/t/000-load.t b/t/000-load.t deleted file mode 100644 index acb06bd..0000000 --- a/t/000-load.t +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More tests => 1; - -package Foo; -::use_ok('Dist::Zilla::PluginBundle::DOY') - or ::BAIL_OUT("couldn't load Dist::Zilla::PluginBundle::DOY"); diff --git a/weaver.ini b/weaver.ini new file mode 100644 index 0000000..219a165 --- /dev/null +++ b/weaver.ini @@ -0,0 +1,36 @@ +[@CorePrep] + +[Name] +[Version] + +[Region / prelude] + +[Generic / SYNOPSIS] +[Generic / DESCRIPTION] +[Generic / OVERVIEW] + +[Collect / ATTRIBUTES] +command = attr + +[Collect / METHODS] +command = method + +[Collect / FUNCTIONS] +command = func + +[Leftovers] + +[Region / postlude] + +[Template / BUGS] +template = ~/.dzil/pod_templates/bugs.section +main_module_only = 1 + +[SeeAlso] + +[Template / SUPPORT] +template = ~/.dzil/pod_templates/support.section +main_module_only = 1 + +[Authors] +[Legal] |