| 1 | package Dist::Zilla::PluginBundle::Author::JACQUESG; | ||||||||||||
| 2 | 1 | $Dist::Zilla::PluginBundle::Author::JACQUESG::VERSION = '0.02'; | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use Dist::Zilla; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||
| 10 | |||||||||||||
| 11 | has 'repo' => ( | ||||||||||||
| 12 | is => 'ro', | ||||||||||||
| 13 | isa => 'Maybe[Str]', | ||||||||||||
| 14 | lazy => 1, | ||||||||||||
| 15 | default => sub | ||||||||||||
| 16 | 0 | ▶ | { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 17 | 0 | $_[0]->payload->{repo}; | |||||||||||
| 18 | } | ||||||||||||
| 19 | 1 | ); | |||||||||||
| 20 | |||||||||||||
| 21 | has 'fake_release' => ( | ||||||||||||
| 22 | is => 'ro', | ||||||||||||
| 23 | isa => 'Bool', | ||||||||||||
| 24 | lazy => 1, | ||||||||||||
| 25 | default => sub | ||||||||||||
| 26 | 0 | ▶ | { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 27 | 0 | ▶ | $_[0]->payload->{fake_release} // 0; | ||||||||||
|
Condition0%0/2
$_[0]->payload->{"fake_release"} // 0
MC/DC0%0/1
$_[0]->payload->{"fake_release"} // 0
$_[0]->payload->{"fake_release"}
Truth table0%0/2
A
A= $_[0]->payload->{"fake_release"}
| |||||||||||||
| 28 | } | ||||||||||||
| 29 | 1 | ); | |||||||||||
| 30 | |||||||||||||
| 31 | has 'pod_coverage' => ( | ||||||||||||
| 32 | is => 'ro', | ||||||||||||
| 33 | isa => 'Bool', | ||||||||||||
| 34 | lazy => 1, | ||||||||||||
| 35 | default => sub | ||||||||||||
| 36 | 0 | ▶ | { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 37 | 0 | ▶ | $_[0]->payload->{pod_coverage} // 1; | ||||||||||
|
Condition0%0/2
$_[0]->payload->{"pod_coverage"} // 1
MC/DC0%0/1
$_[0]->payload->{"pod_coverage"} // 1
$_[0]->payload->{"pod_coverage"}
Truth table0%0/2
A
A= $_[0]->payload->{"pod_coverage"}
| |||||||||||||
| 38 | } | ||||||||||||
| 39 | 1 | ); | |||||||||||
| 40 | |||||||||||||
| 41 | has 'git_push' => ( | ||||||||||||
| 42 | is => 'ro', | ||||||||||||
| 43 | isa => 'Bool', | ||||||||||||
| 44 | lazy => 1, | ||||||||||||
| 45 | default => sub | ||||||||||||
| 46 | 0 | ▶ | { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 47 | 0 | ▶ | $_[0]->payload->{git_push} // 1; | ||||||||||
|
Condition0%0/2
$_[0]->payload->{"git_push"} // 1
MC/DC0%0/1
$_[0]->payload->{"git_push"} // 1
$_[0]->payload->{"git_push"}
Truth table0%0/2
A
A= $_[0]->payload->{"git_push"}
| |||||||||||||
| 48 | } | ||||||||||||
| 49 | 1 | ); | |||||||||||
| 50 | |||||||||||||
| 51 | has 'github' => ( | ||||||||||||
| 52 | is => 'ro', | ||||||||||||
| 53 | isa => 'Bool', | ||||||||||||
| 54 | lazy => 1, | ||||||||||||
| 55 | default => sub | ||||||||||||
| 56 | 0 | ▶ | { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 57 | 0 | ▶ | $_[0]->payload->{github} // 1; | ||||||||||
|
Condition0%0/2
$_[0]->payload->{"github"} // 1
MC/DC0%0/1
$_[0]->payload->{"github"} // 1
$_[0]->payload->{"github"}
Truth table0%0/2
A
A= $_[0]->payload->{"github"}
| |||||||||||||
| 58 | } | ||||||||||||
| 59 | 1 | ); | |||||||||||
| 60 | |||||||||||||
| 61 | =head1 NAME | ||||||||||||
| 62 | |||||||||||||
| 63 | Dist::Zilla::PluginBundle::Author::JACQUESG - Plugin bundle used by JACQUESG | ||||||||||||
| 64 | |||||||||||||
| 65 | =head1 VERSION | ||||||||||||
| 66 | |||||||||||||
| 67 | version 0.02 | ||||||||||||
| 68 | |||||||||||||
| 69 | =head1 SYNOPSIS | ||||||||||||
| 70 | |||||||||||||
| 71 | In your dist.ini: | ||||||||||||
| 72 | |||||||||||||
| 73 | [@Author::JACQUESG] | ||||||||||||
| 74 | |||||||||||||
| 75 | =head1 DESCRIPTION | ||||||||||||
| 76 | |||||||||||||
| 77 | B<Dist::Zilla::PluginBundle::Author::JACQUESG> is the L<Dist::Zilla> plugin | ||||||||||||
| 78 | bundle used by JACQUESG. | ||||||||||||
| 79 | |||||||||||||
| 80 | It is equivalent to the following: | ||||||||||||
| 81 | |||||||||||||
| 82 | [@Basic] | ||||||||||||
| 83 | [@GitHub] | ||||||||||||
| 84 | |||||||||||||
| 85 | [MetaConfig] | ||||||||||||
| 86 | [MetaJSON] | ||||||||||||
| 87 | |||||||||||||
| 88 | [AutoPrereqs] | ||||||||||||
| 89 | |||||||||||||
| 90 | [Git::NextVersion] | ||||||||||||
| 91 | |||||||||||||
| 92 | [PodVersion] | ||||||||||||
| 93 | [PkgVersion] | ||||||||||||
| 94 | |||||||||||||
| 95 | [Test::Compile] | ||||||||||||
| 96 | [Test::CheckManifest] | ||||||||||||
| 97 | [PodSyntaxTests] | ||||||||||||
| 98 | [PodCoverageTests] | ||||||||||||
| 99 | |||||||||||||
| 100 | [NextRelease] | ||||||||||||
| 101 | |||||||||||||
| 102 | [Git::Commit] | ||||||||||||
| 103 | |||||||||||||
| 104 | [Git::Tag] | ||||||||||||
| 105 | tag_message = %N %v | ||||||||||||
| 106 | |||||||||||||
| 107 | [Git::Push] | ||||||||||||
| 108 | |||||||||||||
| 109 | [InstallRelease] | ||||||||||||
| 110 | install_command = cpanm . | ||||||||||||
| 111 | |||||||||||||
| 112 | [Clean] | ||||||||||||
| 113 | |||||||||||||
| 114 | =cut | ||||||||||||
| 115 | |||||||||||||
| 116 | |||||||||||||
| 117 | sub configure | ||||||||||||
| 118 | 0 | ▶ | { | ||||||||||
|
Subroutine
configure: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||
| 119 | 0 | my ($self) = @_; | |||||||||||
| 120 | |||||||||||||
| 121 | # @Basic plugins but MakeMaker and UploadToCPAN | ||||||||||||
| 122 | 0 | $self->add_plugins | |||||||||||
| 123 | ( | ||||||||||||
| 124 | 'GatherDir', | ||||||||||||
| 125 | 'PruneCruft', | ||||||||||||
| 126 | 'ManifestSkip', | ||||||||||||
| 127 | 'MetaYAML', | ||||||||||||
| 128 | 'License', | ||||||||||||
| 129 | 'Readme', | ||||||||||||
| 130 | 'ExtraTests', | ||||||||||||
| 131 | 'ExecDir', | ||||||||||||
| 132 | 'ShareDir', | ||||||||||||
| 133 | 'Manifest', | ||||||||||||
| 134 | 'TestRelease', | ||||||||||||
| 135 | 'ConfirmRelease', | ||||||||||||
| 136 | ); | ||||||||||||
| 137 | |||||||||||||
| 138 | # github bundle | ||||||||||||
| 139 | 0 | ▶ | if ($self->github) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 140 | { | ||||||||||||
| 141 | 0 | $self->add_bundle | |||||||||||
| 142 | ( | ||||||||||||
| 143 | 'GitHub' => | ||||||||||||
| 144 | { | ||||||||||||
| 145 | metacpan => 1, | ||||||||||||
| 146 | repo => $self -> repo | ||||||||||||
| 147 | } | ||||||||||||
| 148 | ); | ||||||||||||
| 149 | } | ||||||||||||
| 150 | |||||||||||||
| 151 | # bump version | ||||||||||||
| 152 | $self->add_plugins | ||||||||||||
| 153 | ( | ||||||||||||
| 154 | 0 | ['Git::NextVersion' => { first_version => 0.01 }], | |||||||||||
| 155 | ); | ||||||||||||
| 156 | |||||||||||||
| 157 | # core plugins | ||||||||||||
| 158 | 0 | $self->add_plugins | |||||||||||
| 159 | ( | ||||||||||||
| 160 | 'MetaConfig', | ||||||||||||
| 161 | 'MetaJSON', | ||||||||||||
| 162 | 'AutoPrereqs', | ||||||||||||
| 163 | 'PodVersion', | ||||||||||||
| 164 | 'PkgVersion' | ||||||||||||
| 165 | ); | ||||||||||||
| 166 | |||||||||||||
| 167 | 0 | $self->add_plugins ('NextRelease'); | |||||||||||
| 168 | |||||||||||||
| 169 | # test plugins | ||||||||||||
| 170 | 0 | $self->add_plugins | |||||||||||
| 171 | ( | ||||||||||||
| 172 | 'Test::Compile', | ||||||||||||
| 173 | 'Test::CheckManifest', | ||||||||||||
| 174 | 'PodSyntaxTests' | ||||||||||||
| 175 | ); | ||||||||||||
| 176 | |||||||||||||
| 177 | 0 | ▶ | if ($self->pod_coverage) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 178 | { | ||||||||||||
| 179 | 0 | $self->add_plugins ('PodCoverageTests'); | |||||||||||
| 180 | } | ||||||||||||
| 181 | |||||||||||||
| 182 | # release plugins | ||||||||||||
| 183 | 0 | ▶ | if ($self->fake_release) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 184 | { | ||||||||||||
| 185 | 0 | $self->add_plugins ('FakeRelease'); | |||||||||||
| 186 | } | ||||||||||||
| 187 | else | ||||||||||||
| 188 | { | ||||||||||||
| 189 | 0 | $self->add_plugins ('Git::Commit', ['Git::Tag' => { tag_message => '%N %v' }]); | |||||||||||
| 190 | 0 | ▶ | $self->add_plugins ('Git::Push') if ($self->git_push); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 191 | 0 | ▶ | $self->add_plugins (['UploadToCPAN' => { pause_cfg_file => $ENV{'ZILLA_PAUSE_CFG'} || '' }]); | ||||||||||
|
Condition0%0/2
$ENV{'ZILLA_PAUSE_CFG'} || ''
MC/DC0%0/1
$ENV{'ZILLA_PAUSE_CFG'} || ''
$ENV{'ZILLA_PAUSE_CFG'}
Truth table0%0/2
A
A= $ENV{'ZILLA_PAUSE_CFG'}
| |||||||||||||
| 192 | } | ||||||||||||
| 193 | |||||||||||||
| 194 | # after release | ||||||||||||
| 195 | 0 | $self->add_plugins (['InstallRelease' => { install_command => 'cpanm .' }], 'Clean'); | |||||||||||
| 196 | } | ||||||||||||
| 197 | |||||||||||||
| 198 | =head1 ATTRIBUTES | ||||||||||||
| 199 | |||||||||||||
| 200 | =over | ||||||||||||
| 201 | |||||||||||||
| 202 | =item C<fake_relase> | ||||||||||||
| 203 | |||||||||||||
| 204 | If set to '1', the release will be faked using the C<FakeRelease> plugin. | ||||||||||||
| 205 | |||||||||||||
| 206 | =item C<pod_coverage> | ||||||||||||
| 207 | |||||||||||||
| 208 | If set to '1' (default), the C<PodCoverageTest> plugin is used. | ||||||||||||
| 209 | |||||||||||||
| 210 | =item C<github> | ||||||||||||
| 211 | |||||||||||||
| 212 | If set to '1' (default), the C<GitHub> bundle is used. | ||||||||||||
| 213 | |||||||||||||
| 214 | =item C<git_push> | ||||||||||||
| 215 | |||||||||||||
| 216 | If set to '1' (default), the C<Git::Push> plugin is used. | ||||||||||||
| 217 | |||||||||||||
| 218 | =back | ||||||||||||
| 219 | |||||||||||||
| 220 | =head1 AUTHOR | ||||||||||||
| 221 | |||||||||||||
| 222 | Jacques Germishuys <jacquesg@cpan.org> | ||||||||||||
| 223 | |||||||||||||
| 224 | =head1 LICENSE AND COPYRIGHT | ||||||||||||
| 225 | |||||||||||||
| 226 | Copyright 2020 Jacques Germishuys. | ||||||||||||
| 227 | |||||||||||||
| 228 | This program is free software; you can redistribute it and/or modify it | ||||||||||||
| 229 | under the terms of either: the GNU General Public License as published | ||||||||||||
| 230 | by the Free Software Foundation; or the Artistic License. | ||||||||||||
| 231 | |||||||||||||
| 232 | See http://dev.perl.org/licenses/ for more information. | ||||||||||||
| 233 | |||||||||||||
| 234 | =cut | ||||||||||||
| 235 | |||||||||||||
| 236 | 1 | ▶ | no Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 237 | |||||||||||||
| 238 | 1 | __PACKAGE__ -> meta -> make_immutable; | |||||||||||
| 239 | |||||||||||||
| 240 | 1 | 1; # End of Dist::Zilla::PluginBundle::Author::JACQUESG | |||||||||||