File Coverage

lib/Dist/Zilla/PluginBundle/Author/SKIRMESS.pm
Criterion Covered Total %
statement 17 21 80.9
branch 0 2 0.0
condition n/a
subroutine 6 7 85.7
pod 0 1 0.0
total 23 31 74.1


line stmt bran cond sub pod time code
1             package Dist::Zilla::PluginBundle::Author::SKIRMESS;
2              
3 1     1   1009 use 5.006;
  1         3  
4 1     1   5 use strict;
  1         2  
  1         21  
5 1     1   4 use warnings;
  1         1  
  1         42  
6              
7             our $VERSION = '0.030';
8              
9 1     1   5 use Moose 0.99;
  1         13  
  1         6  
10              
11 1     1   5653 use Dist::Zilla::Plugin::Author::SKIRMESS::RepositoryBase;
  1         2  
  1         31  
12              
13 1     1   5 use namespace::autoclean 0.09;
  1         17  
  1         7  
14              
15             with qw(
16             Dist::Zilla::Role::PluginBundle::Easy
17             Dist::Zilla::Role::PluginBundle::Config::Slicer
18             );
19              
20             has set_script_shebang => (
21             is => 'ro',
22             isa => 'Bool',
23             lazy => 1,
24             default => sub {
25             exists $_[0]->payload->{set_script_shebang} ? $_[0]->payload->{set_script_shebang} : 1;
26             },
27             );
28              
29             sub configure {
30 0     0 0   my ($self) = @_;
31              
32 0           my @generated_files = Dist::Zilla::Plugin::Author::SKIRMESS::RepositoryBase->files();
33              
34 0 0         $self->add_plugins(
35              
36             # Check at build/release time if modules are out of date
37             [
38             'PromptIfStale', 'stale modules, build',
39             {
40             phase => 'build',
41             module => [ $self->meta->name ],
42             },
43             ],
44              
45             # Check at build/release time if modules are out of date
46             [
47             'PromptIfStale', 'stale modules, release',
48             {
49             phase => 'release',
50             check_all_plugins => 1,
51             check_all_prereqs => 1,
52             },
53             ],
54              
55             # Add contributor names from git to your distribution
56             'Git::Contributors',
57              
58             # Gather all tracked files in a Git working directory
59             [
60             'Git::GatherDir',
61             {
62             ':version' => '2.016',
63             exclude_filename => [qw( cpanfile dist.ini INSTALL LICENSE Makefile.PL META.json META.yml README.md )],
64             include_dotfiles => 1,
65             },
66             ],
67              
68             # Set the distribution version from your main module's $VERSION
69             'VersionFromMainModule',
70              
71             # Bump and reversion $VERSION on release
72             [
73             'ReversionOnRelease',
74             {
75             prompt => 1,
76             },
77             ],
78              
79             # Must run after ReversionOnRelease because it adds the version of
80             # the bundle to the generated files
81             'Author::SKIRMESS::RepositoryBase',
82              
83             'Author::SKIRMESS::InsertVersion',
84              
85             'Git::FilePermissions',
86              
87             'Git::RequireUnixEOL',
88              
89             # Update the next release number in your changelog
90             [
91             'NextRelease',
92             {
93             format => '%v %{yyyy-MM-dd HH:mm:ss VVV}d',
94             time_zone => 'UTC',
95             },
96             ],
97              
98             # Check your git repository before releasing
99             [
100             'Git::Check',
101             {
102             allow_dirty => [ qw( Changes cpanfile dist.ini Makefile.PL META.json META.yml README.md ), @generated_files ],
103             },
104             ],
105              
106             # Ensure no pending commits on a remote branch before release
107             [
108             'Git::Remote::Check',
109             {
110             do_update => 0,
111             },
112             ],
113              
114             # Prune stuff that you probably don't mean to include
115             [
116             'PruneCruft',
117             {
118             except => [qw( \.perlcriticrc \.perltidyrc )],
119             },
120             ],
121              
122             # Decline to build files that appear in a MANIFEST.SKIP-like file
123             'ManifestSkip',
124              
125             # automatically extract prereqs from your modules
126             [
127             'AutoPrereqs',
128             {
129             skip => [qw( ^t::lib )],
130             },
131             ],
132              
133             # automatically extract Perl::Critic policy prereqs
134             'AutoPrereqs::Perl::Critic',
135              
136             # Set script shebang to #!perl
137             ( $self->set_script_shebang ? 'SetScriptShebang' : () ),
138              
139             # Add the $AUTHORITY variable and metadata to your distribution
140             [
141             'Authority',
142             {
143             ':version' => '1.009',
144             authority => 'cpan:SKIRMESS',
145             do_munging => '0',
146             },
147             ],
148              
149             # Detects the minimum version of Perl required for your dist
150             [
151             'MinimumPerl',
152             {
153             ':version' => '1.006',
154             },
155             ],
156              
157             # Stop CPAN from indexing stuff
158             [
159             'MetaNoIndex',
160             {
161             directory => [qw( corpus examples t xt )],
162             },
163             ],
164              
165             # Automatically include GitHub meta information in META.yml
166             [
167             'GithubMeta',
168             {
169             issues => 1,
170             },
171             ],
172              
173             # Automatically convert POD to a README in any format for Dist::Zilla
174             [
175             'ReadmeAnyFromPod',
176             {
177             type => 'markdown',
178             filename => 'README.md',
179             location => 'root',
180             },
181             ],
182              
183             # Extract namespaces/version from traditional packages for provides
184             [
185             'MetaProvides::Package',
186             {
187             meta_noindex => 1,
188             },
189             ],
190              
191             # Extract namespaces/version from traditional packages for provides
192             #
193             # This adds packages found in scripts under bin which are skipped
194             # by the default finder of MetaProvides::Package above.
195             [
196             'MetaProvides::Package', 'MetaProvides::Package/ExecFiles',
197             {
198             meta_noindex => 1,
199             finder => ':ExecFiles',
200             },
201             ],
202              
203             # Summarize Dist::Zilla configuration into distmeta
204             'MetaConfig',
205              
206             # Report what versions of things your distribution was built against
207             [
208             'MetaData::BuiltWith',
209             {
210             show_config => 1,
211             show_uname => 1,
212             },
213             ],
214              
215             # Produce a META.yml
216             'MetaYAML',
217              
218             # Produce a META.json
219             'MetaJSON',
220              
221             # Produce a cpanfile prereqs file
222             'CPANFile',
223              
224             # Automatically convert POD to a README in any format for Dist::Zilla
225             [ 'ReadmeAnyFromPod', 'ReadmeAnyFromPod/ReadmeTextInBuild' ],
226              
227             # Set copyright year from git
228             'CopyrightYearFromGit',
229              
230             # Output a LICENSE file
231             'License',
232              
233             # Build an INSTALL file
234             [
235             'InstallGuide',
236             {
237             ':version' => '1.200007',
238             },
239             ],
240              
241             # Install a directory's contents as executables
242             'ExecDir',
243              
244             # Install a directory's contents as "ShareDir" content
245             'ShareDir',
246              
247             # Build a Makefile.PL that uses ExtUtils::MakeMaker
248             'MakeMaker',
249              
250             # Build a MANIFEST file
251             'Manifest',
252              
253             # Copy (or move) specific files after building (for SCM inclusion, etc.)
254             [
255             'CopyFilesFromBuild',
256             {
257             copy => [qw( cpanfile INSTALL LICENSE Makefile.PL META.json META.yml )],
258             },
259             ],
260              
261             # Check that you're on the correct branch before release
262             'Git::CheckFor::CorrectBranch',
263              
264             # Check your repo for merge-conflicted files
265             'Git::CheckFor::MergeConflicts',
266              
267             # Ensure META includes resources
268             'CheckMetaResources',
269              
270             # Prevent a release if you have prereqs not found on CPAN
271             'CheckPrereqsIndexed',
272              
273             # Ensure Changes has content before releasing
274             'CheckChangesHasContent',
275              
276             # Check if your distribution declares a dependency on itself
277             'CheckSelfDependency',
278              
279             # BeforeRelease plugin to check for a strict version number
280             [
281             'CheckStrictVersion',
282             {
283             decimal_only => 1,
284             },
285             ],
286              
287             # Support running xt tests via dzil test
288             'RunExtraTests',
289              
290             # Extract archive and run tests before releasing the dist
291             'TestRelease',
292              
293             # Retrieve count of outstanding RT and github issues for your distribution
294             'CheckIssues',
295              
296             # Prompt for confirmation before releasing
297             'ConfirmRelease',
298              
299             # Upload the dist to CPAN
300             'UploadToCPAN',
301              
302             # Copy files from a release (for SCM inclusion, etc.)
303             [
304             'CopyFilesFromRelease',
305             {
306             match => [qw( \.pm$ ^bin/ )],
307             },
308             ],
309              
310             # Commit dirty files
311             [
312             'Git::Commit',
313             {
314             commit_msg => '%v',
315             allow_dirty => [ qw(Changes cpanfile dist.ini INSTALL LICENSE Makefile.PL META.json META.yml README.md), @generated_files ],
316             allow_dirty_match => [qw( \.pm$ ^bin/ )],
317             },
318             ],
319              
320             # Tag the new version
321             [
322             'Git::Tag',
323             {
324             tag_format => '%v',
325             tag_message => q{},
326             },
327             ],
328              
329             # Push current branch
330             'Git::Push',
331              
332             # Compare data and files at different phases of the distribution build process
333             'VerifyPhases',
334             );
335              
336 0           return;
337             }
338              
339             __PACKAGE__->meta->make_immutable;
340              
341             1;
342              
343             __END__
344              
345             =pod
346              
347             =encoding UTF-8
348              
349             =head1 NAME
350              
351             Dist::Zilla::PluginBundle::Author::SKIRMESS - Dist::Zilla configuration the way SKIRMESS does it
352              
353             =head1 VERSION
354              
355             Version 0.030
356              
357             =head1 SYNOPSIS
358              
359             # in dist.ini
360             [@Author::SKIRMESS]
361              
362             =head1 DESCRIPTION
363              
364             This is a L<Dist::Zilla|Dist::Zilla> PluginBundle.
365              
366             =head1 USAGE
367              
368             To use this PluginBundle, just add it to your dist.ini. You can provide the
369             following options:
370              
371             =over 4
372              
373             =item *
374              
375             C<set_script_shebang> - this indicates whether C<SetScriptShebang> should be used or not
376              
377             =back
378              
379             =head1 SUPPORT
380              
381             =head2 Bugs / Feature Requests
382              
383             Please report any bugs or feature requests through the issue tracker
384             at L<https://github.com/skirmess/Dist-Zilla-PluginBundle-Author-SKIRMESS/issues>.
385             You will be notified automatically of any progress on your issue.
386              
387             =head2 Source Code
388              
389             This is open source software. The code repository is available for
390             public review and contribution under the terms of the license.
391              
392             L<https://github.com/skirmess/Dist-Zilla-PluginBundle-Author-SKIRMESS>
393              
394             git clone https://github.com/skirmess/Dist-Zilla-PluginBundle-Author-SKIRMESS.git
395              
396             =head1 AUTHOR
397              
398             Sven Kirmess <sven.kirmess@kzone.ch>
399              
400             =head1 COPYRIGHT AND LICENSE
401              
402             This software is Copyright (c) 2017 by Sven Kirmess.
403              
404             This is free software, licensed under:
405              
406             The (two-clause) FreeBSD License
407              
408             =head1 SEE ALSO
409              
410             L<Dist::Zilla::PluginBundle::Author::ETHER|Dist::Zilla::PluginBundle::Author::ETHER>,
411             L<Dist::Zilla::PluginBundle::DAGOLDEN|Dist::Zilla::PluginBundle::DAGOLDEN>,
412             L<Dist::Zilla::PluginBundle::Milla|Dist::Zilla::PluginBundle::Milla>,
413             L<Dist::Milla|Dist::Milla>
414              
415             =cut
416              
417             # vim: ts=4 sts=4 sw=4 et: syntax=perl