| 1 | package Dist::Zilla::PluginBundle::INGY; | ||||||||||||
| 2 | { | ||||||||||||
| 3 | 1 | $Dist::Zilla::PluginBundle::INGY::VERSION = '0.0.4'; | |||||||||||
| 4 | } | ||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use Moose::Autobox; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 1 | ▶ | use Dist::Zilla 2.100922; # TestRelease | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 1 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||
| 10 | 1 | with 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; | |||||||||||
| 11 | |||||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | use Dist::Zilla::PluginBundle::Basic; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | 1 | ▶ | use Dist::Zilla::PluginBundle::Filter; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | 1 | ▶ | use Dist::Zilla::PluginBundle::Git; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | |||||||||||||
| 17 | has manual_version => ( | ||||||||||||
| 18 | is => 'ro', | ||||||||||||
| 19 | isa => 'Bool', | ||||||||||||
| 20 | lazy => 1, | ||||||||||||
| 21 | 0 | ▶ | default => sub { $_[0]->payload->{manual_version} }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 22 | 1 | ); | |||||||||||
| 23 | |||||||||||||
| 24 | has major_version => ( | ||||||||||||
| 25 | is => 'ro', | ||||||||||||
| 26 | isa => 'Int', | ||||||||||||
| 27 | lazy => 1, | ||||||||||||
| 28 | 0 | ▶ | default => sub { $_[0]->payload->{version} || 0 }, | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||
| 29 | 1 | ); | |||||||||||
| 30 | |||||||||||||
| 31 | has is_task => ( | ||||||||||||
| 32 | is => 'ro', | ||||||||||||
| 33 | isa => 'Bool', | ||||||||||||
| 34 | lazy => 1, | ||||||||||||
| 35 | 0 | ▶ | default => sub { $_[0]->payload->{task} }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 36 | 1 | ); | |||||||||||
| 37 | |||||||||||||
| 38 | has github_issues => ( | ||||||||||||
| 39 | is => 'ro', | ||||||||||||
| 40 | isa => 'Bool', | ||||||||||||
| 41 | lazy => 1, | ||||||||||||
| 42 | 0 | ▶ | default => sub { $_[0]->payload->{github_issues} }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 43 | 1 | ); | |||||||||||
| 44 | |||||||||||||
| 45 | 0 | ▶ | sub configure { | ||||||||||
|
Subroutine
configure: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||
| 46 | 0 | my ($self) = @_; | |||||||||||
| 47 | |||||||||||||
| 48 | 0 | $self->add_plugins('Git::GatherDir'); | |||||||||||
| 49 | 0 | $self->add_plugins('CheckPrereqsIndexed'); | |||||||||||
| 50 | 0 | $self->add_plugins('CheckExtraTests'); | |||||||||||
| 51 | 0 | $self->add_bundle('@Filter', { | |||||||||||
| 52 | '-bundle' => '@Basic', | ||||||||||||
| 53 | '-remove' => [ 'GatherDir', 'ExtraTests' ], | ||||||||||||
| 54 | }); | ||||||||||||
| 55 | |||||||||||||
| 56 | 0 | $self->add_plugins('AutoPrereqs'); | |||||||||||
| 57 | |||||||||||||
| 58 | 0 | ▶ | unless ($self->manual_version) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 59 | 0 | ▶ | if ($self->is_task) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 60 | my $v_format = q<{{cldr('yyyyMMdd')}}> | ||||||||||||
| 61 | 0 | ▶ | . sprintf('.%03u', ($ENV{N} || 0)); | ||||||||||
|
Condition0%0/2
$ENV{'N'} || 0
MC/DC0%0/1
$ENV{'N'} || 0
$ENV{'N'}
Truth table0%0/2
A
A= $ENV{'N'}
| |||||||||||||
| 62 | |||||||||||||
| 63 | 0 | $self->add_plugins([ | |||||||||||
| 64 | AutoVersion => { | ||||||||||||
| 65 | major => $self->major_version, | ||||||||||||
| 66 | format => $v_format, | ||||||||||||
| 67 | time_zone => 'America/New_York', | ||||||||||||
| 68 | } | ||||||||||||
| 69 | ]); | ||||||||||||
| 70 | } else { | ||||||||||||
| 71 | 0 | $self->add_plugins([ | |||||||||||
| 72 | 'Git::NextVersion' => { | ||||||||||||
| 73 | version_regexp => '^([0-9]+\.[0-9]+(?:\.[0-9]+)?)$', | ||||||||||||
| 74 | } | ||||||||||||
| 75 | ]); | ||||||||||||
| 76 | } | ||||||||||||
| 77 | } | ||||||||||||
| 78 | |||||||||||||
| 79 | 0 | $self->add_plugins(qw( | |||||||||||
| 80 | ReadmeFromPod | ||||||||||||
| 81 | PkgVersion | ||||||||||||
| 82 | MetaConfig | ||||||||||||
| 83 | MetaJSON | ||||||||||||
| 84 | NextRelease | ||||||||||||
| 85 | ), | ||||||||||||
| 86 | # XXX Fix for ingy style | ||||||||||||
| 87 | # Test::ChangesHasContent | ||||||||||||
| 88 | qw( | ||||||||||||
| 89 | PodSyntaxTests | ||||||||||||
| 90 | Test::Compile | ||||||||||||
| 91 | ReportVersions::Tiny | ||||||||||||
| 92 | )); | ||||||||||||
| 93 | |||||||||||||
| 94 | 0 | $self->add_plugins( | |||||||||||
| 95 | [ Prereqs => 'TestMoreWithSubtests' => { | ||||||||||||
| 96 | -phase => 'test', | ||||||||||||
| 97 | -type => 'requires', | ||||||||||||
| 98 | 'Test::More' => '0.96' | ||||||||||||
| 99 | } ], | ||||||||||||
| 100 | ); | ||||||||||||
| 101 | |||||||||||||
| 102 | 0 | $self->add_plugins( | |||||||||||
| 103 | [ GithubMeta => { | ||||||||||||
| 104 | user => 'ingydotnet', | ||||||||||||
| 105 | remote => [ qw(origin) ], | ||||||||||||
| 106 | issues => $self->github_issues, | ||||||||||||
| 107 | } ], | ||||||||||||
| 108 | ); | ||||||||||||
| 109 | |||||||||||||
| 110 | 0 | $self->add_bundle('@Git' => { | |||||||||||
| 111 | tag_format => '%v', | ||||||||||||
| 112 | remotes_must_exist => 0, | ||||||||||||
| 113 | push_to => [ | ||||||||||||
| 114 | 'origin :', | ||||||||||||
| 115 | ], | ||||||||||||
| 116 | }); | ||||||||||||
| 117 | } | ||||||||||||
| 118 | |||||||||||||
| 119 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 120 | 1 | ▶ | no Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 121 | |||||||||||||
| 122 | 1 | 1; | |||||||||||
| 123 | |||||||||||||
| 124 | =encoding utf8 | ||||||||||||
| 125 | |||||||||||||
| 126 | =head1 NAME | ||||||||||||
| 127 | |||||||||||||
| 128 | Dist::Zilla::PluginBundle::INGY - BeLike::INGY when you build your dists | ||||||||||||
| 129 | |||||||||||||
| 130 | =head1 SYNOPSIS | ||||||||||||
| 131 | |||||||||||||
| 132 | In your F<dist.ini>: | ||||||||||||
| 133 | |||||||||||||
| 134 | [@INGY] | ||||||||||||
| 135 | |||||||||||||
| 136 | =head1 DESCRIPTION | ||||||||||||
| 137 | |||||||||||||
| 138 | This is the plugin bundle that INGY uses. It is more or less equivalent to: | ||||||||||||
| 139 | |||||||||||||
| 140 | [Git::GatherDir] | ||||||||||||
| 141 | [@Basic] | ||||||||||||
| 142 | ; ...but without GatherDir and ExtraTests | ||||||||||||
| 143 | |||||||||||||
| 144 | [AutoPrereqs] | ||||||||||||
| 145 | [Git::NextVersion] | ||||||||||||
| 146 | [PkgVersion] | ||||||||||||
| 147 | [MetaConfig] | ||||||||||||
| 148 | [MetaJSON] | ||||||||||||
| 149 | [NextRelease] | ||||||||||||
| 150 | |||||||||||||
| 151 | [Test::ChangesHasContent] | ||||||||||||
| 152 | [PodSyntaxTests] | ||||||||||||
| 153 | [Test::Compile] | ||||||||||||
| 154 | [ReportVersions::Tiny] | ||||||||||||
| 155 | |||||||||||||
| 156 | [GithubMeta] | ||||||||||||
| 157 | user = INGY | ||||||||||||
| 158 | remote = origin | ||||||||||||
| 159 | |||||||||||||
| 160 | [@Git] | ||||||||||||
| 161 | tag_format = %v | ||||||||||||
| 162 | |||||||||||||
| 163 | =head1 AUTHOR | ||||||||||||
| 164 | |||||||||||||
| 165 | Ingy döt Net <ingy@cpan.org> | ||||||||||||
| 166 | |||||||||||||
| 167 | =head1 COPYRIGHT AND LICENSE | ||||||||||||
| 168 | |||||||||||||
| 169 | Copyright (c) 2013. Ingy döt Net. | ||||||||||||
| 170 | |||||||||||||
| 171 | This program is free software; you can redistribute it and/or modify it | ||||||||||||
| 172 | under the same terms as Perl itself. | ||||||||||||
| 173 | |||||||||||||
| 174 | See http://www.perl.com/perl/misc/Artistic.html | ||||||||||||
| 175 | |||||||||||||
| 176 | =cut | ||||||||||||