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   975 use 5.006;
  1         4  
4 1     1   6 use strict;
  1         2  
  1         21  
5 1     1   4 use warnings;
  1         2  
  1         45  
6              
7             our $VERSION = '0.031';
8              
9 1     1   6 use Moose 0.99;
  1         14  
  1         7  
10              
11 1     1   5916 use Dist::Zilla::Plugin::Author::SKIRMESS::RepositoryBase;
  1         2  
  1         28  
12              
13 1     1   5 use namespace::autoclean 0.09;
  1         25  
  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             # Output a LICENSE file
228             'License',
229              
230             # Build an INSTALL file
231             [
232             'InstallGuide',
233             {
234             ':version' => '1.200007',
235             },
236             ],
237              
238             # Install a directory's contents as executables
239             'ExecDir',
240              
241             # Install a directory's contents as "ShareDir" content
242             'ShareDir',
243              
244             # Build a Makefile.PL that uses ExtUtils::MakeMaker
245             'MakeMaker',
246              
247             # Build a MANIFEST file
248             'Manifest',
249              
250             # Copy (or move) specific files after building (for SCM inclusion, etc.)
251             [
252             'CopyFilesFromBuild',
253             {
254             copy => [qw( cpanfile INSTALL LICENSE Makefile.PL META.json META.yml )],
255             },
256             ],
257              
258             # Check that you're on the correct branch before release
259             'Git::CheckFor::CorrectBranch',
260              
261             # Check your repo for merge-conflicted files
262             'Git::CheckFor::MergeConflicts',
263              
264             # Ensure META includes resources
265             'CheckMetaResources',
266              
267             # Prevent a release if you have prereqs not found on CPAN
268             'CheckPrereqsIndexed',
269              
270             # Ensure Changes has content before releasing
271             'CheckChangesHasContent',
272              
273             # Check if your distribution declares a dependency on itself
274             'CheckSelfDependency',
275              
276             # BeforeRelease plugin to check for a strict version number
277             [
278             'CheckStrictVersion',
279             {
280             decimal_only => 1,
281             },
282             ],
283              
284             # Support running xt tests via dzil test
285             'RunExtraTests',
286              
287             # Extract archive and run tests before releasing the dist
288             'TestRelease',
289              
290             # Retrieve count of outstanding RT and github issues for your distribution
291             'CheckIssues',
292              
293             # Prompt for confirmation before releasing
294             'ConfirmRelease',
295              
296             # Upload the dist to CPAN
297             'UploadToCPAN',
298              
299             # Copy files from a release (for SCM inclusion, etc.)
300             [
301             'CopyFilesFromRelease',
302             {
303             match => [qw( \.pm$ ^bin/ )],
304             },
305             ],
306              
307             # Commit dirty files
308             [
309             'Git::Commit',
310             {
311             commit_msg => '%v',
312             allow_dirty => [ qw(Changes cpanfile dist.ini INSTALL LICENSE Makefile.PL META.json META.yml README.md), @generated_files ],
313             allow_dirty_match => [qw( \.pm$ ^bin/ )],
314             },
315             ],
316              
317             # Tag the new version
318             [
319             'Git::Tag',
320             {
321             tag_format => '%v',
322             tag_message => q{},
323             },
324             ],
325              
326             # Push current branch
327             'Git::Push',
328              
329             # Compare data and files at different phases of the distribution build process
330             'VerifyPhases',
331             );
332              
333 0           return;
334             }
335              
336             __PACKAGE__->meta->make_immutable;
337              
338             1;
339              
340             __END__
341              
342             =pod
343              
344             =encoding UTF-8
345              
346             =head1 NAME
347              
348             Dist::Zilla::PluginBundle::Author::SKIRMESS - Dist::Zilla configuration the way SKIRMESS does it
349              
350             =head1 VERSION
351              
352             Version 0.031
353              
354             =head1 SYNOPSIS
355              
356             # in dist.ini
357             [@Author::SKIRMESS]
358              
359             =head1 DESCRIPTION
360              
361             This is a L<Dist::Zilla|Dist::Zilla> PluginBundle.
362              
363             =head1 USAGE
364              
365             To use this PluginBundle, just add it to your dist.ini. You can provide the
366             following options:
367              
368             =over 4
369              
370             =item *
371              
372             C<set_script_shebang> - this indicates whether C<SetScriptShebang> should be used or not
373              
374             =back
375              
376             =head1 SUPPORT
377              
378             =head2 Bugs / Feature Requests
379              
380             Please report any bugs or feature requests through the issue tracker
381             at L<https://github.com/skirmess/Dist-Zilla-PluginBundle-Author-SKIRMESS/issues>.
382             You will be notified automatically of any progress on your issue.
383              
384             =head2 Source Code
385              
386             This is open source software. The code repository is available for
387             public review and contribution under the terms of the license.
388              
389             L<https://github.com/skirmess/Dist-Zilla-PluginBundle-Author-SKIRMESS>
390              
391             git clone https://github.com/skirmess/Dist-Zilla-PluginBundle-Author-SKIRMESS.git
392              
393             =head1 AUTHOR
394              
395             Sven Kirmess <sven.kirmess@kzone.ch>
396              
397             =head1 COPYRIGHT AND LICENSE
398              
399             This software is Copyright (c) 2017 by Sven Kirmess.
400              
401             This is free software, licensed under:
402              
403             The (two-clause) FreeBSD License
404              
405             =head1 SEE ALSO
406              
407             L<Dist::Zilla::PluginBundle::Author::ETHER|Dist::Zilla::PluginBundle::Author::ETHER>,
408             L<Dist::Zilla::PluginBundle::DAGOLDEN|Dist::Zilla::PluginBundle::DAGOLDEN>,
409             L<Dist::Zilla::PluginBundle::Milla|Dist::Zilla::PluginBundle::Milla>,
410             L<Dist::Milla|Dist::Milla>
411              
412             =cut
413              
414             # vim: ts=4 sts=4 sw=4 et: syntax=perl