summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-06-13 14:35:48 -0500
committerJesse Luehrs <doy@tozt.net>2010-06-13 14:35:48 -0500
commit651303c26d6978ceffca7e3cc99957eee46ef098 (patch)
tree9783f3f6b15c185208bee8e9d9353d3c16f36cd6 /lib
parentf972bb6debf7373438887a89cc6bd3130590239a (diff)
downloaddist-zilla-pluginbundle-doy-651303c26d6978ceffca7e3cc99957eee46ef098.tar.gz
dist-zilla-pluginbundle-doy-651303c26d6978ceffca7e3cc99957eee46ef098.zip
implementation0.01
Diffstat (limited to 'lib')
-rw-r--r--lib/Dist/Zilla/PluginBundle/DOY.pm154
1 files changed, 111 insertions, 43 deletions
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;