Plugin/Author/VDB/Hg/Push.pm

filter: Statementstmt 66.6% 16 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 3 totaltotal 55.8% 19 / 34 CC 2 SCAR 9.7
CC
2
Cov
67%
after_release
6.0
__ANON__
2.0
mvp_aliases
2.0
CRAP 2.6
« Plugin/Author/VDB/Hg/Tag/Check.pm ↑ Summary Plugin/Author/VDB/Version/Read.pm »
1 # ---------------------------------------------------------------------- copyright and license ---
2 #
3 # file: lib/Dist/Zilla/Plugin/Author/VDB/Hg/Push.pm
4 #
5 # Copyright © 2015 Van de Bugger
6 #
7 # This file is part of perl-Dist-Zilla-PluginBundle-Author-VDB.
8 #
9 # perl-Dist-Zilla-PluginBundle-Author-VDB is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by the Free Software
11 # Foundation, either version 3 of the License, or (at your option) any later version.
12 #
13 # perl-Dist-Zilla-PluginBundle-Author-VDB is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 # PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License along with
18 # perl-Dist-Zilla-PluginBundle-Author-VDB. If not, see <http://www.gnu.org/licenses/>.
19 #
20 # ---------------------------------------------------------------------- copyright and license ---
21  
22 #pod =for test_synopsis BEGIN { die "SKIP: not a Perl code"; }
23 #pod
24 #pod =head1 SYNOPSIS
25 #pod
26 #pod F<dist.in> file:
27 #pod
28 #pod [Author::VDB::Hg::Push]
29 #pod repository = default ; This is default.
30 #pod repository = remote
31 #pod ...
32 #pod
33 #pod =head1 DESCRIPTION
34 #pod
35 #pod This plugin does C<AfterRelease> role. It pushes changes from the current repository to the
36 #pod (remote) repositories. Multiple repositories can be specified.
37 #pod
38 #pod =cut
39  
40 # --------------------------------------------------------------------------------------------------
41  
42 package Dist::Zilla::Plugin::Author::VDB::Hg::Push;
43  
44 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
46 1 ▶use version 0.77;
Subroutine BEGIN: called CC=1 SCAR=0.0
47  
48 # ABSTRACT: Push changes to (remote) repositories
49 1 our $VERSION = 'v0.11.3.1'; # TRIAL VERSION
50  
51 1 with 'Dist::Zilla::Role::AfterRelease';
52 1 with 'Dist::Zilla::Role::ErrorLogger';
53 1 with 'Dist::Zilla::Role::Author::VDB::HgRunner';
54  
55 #pod =option repository
56 #pod
57 #pod =option repositories
58 #pod
59 #pod (Remote) repository name to push changes to. May be repeated multiple times to push changes to
60 #pod several repositories.
61 #pod
62 #pod =cut
63  
64 has repositories => (
65 isa => 'ArrayRef[Str]',
66 is => 'ro',
67 0 ▶ default => sub { [ 'default' ] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
68 1 );
69  
70 # --------------------------------------------------------------------------------------------------
71  
72 #pod =for Pod::Coverage mvp_aliases mvp_multivalue_args
73 #pod
74 #pod =cut
75  
76 0 ▶sub mvp_aliases {
Subroutine mvp_aliases: not called CC=1 SCAR=6.9
Pod undocumented
77 return {
78 0 'repository' => 'repositories',
79 };
80 };
81  
82 0 ▶sub mvp_multivalue_args {
Subroutine mvp_multivalue_args: not called CC=1 SCAR=6.9
Pod undocumented
83 0 return qw{ repositories };
84 };
85  
86 # --------------------------------------------------------------------------------------------------
87  
88 #pod =for Pod::Coverage after_release
89 #pod
90 #pod =cut
91  
92 0 ▶sub after_release {
Subroutine after_release: not called CC=2 SCAR=17.9
Pod undocumented
93 0 my ( $self ) = @_;
94 0 for my $repo ( @{ $self->repositories } ) {
95 0 $self->run_hg( 'push', $repo );
96 };
97 0 return;
98 };
99  
100 # --------------------------------------------------------------------------------------------------
101  
102 1 __PACKAGE__->meta->make_immutable();
103  
104 1 1;
105  
106 # --------------------------------------------------------------------------------------------------
107  
108 #pod =head1 COPYRIGHT AND LICENSE
109 #pod
110 #pod Copyright (C) 2015 Van de Bugger
111 #pod
112 #pod License GPLv3+: The GNU General Public License version 3 or later
113 #pod <http://www.gnu.org/licenses/gpl-3.0.txt>.
114 #pod
115 #pod This is free software: you are free to change and redistribute it. There is
116 #pod NO WARRANTY, to the extent permitted by law.
117 #pod
118 #pod
119 #pod =cut
120  
121 # end of file #
122  
123 __END__
« Plugin/Author/VDB/Hg/Tag/Check.pm ↑ Summary Plugin/Author/VDB/Version/Read.pm »