Release/RemoteManager.pm

filter: Statementstmt 36.3% 8 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 2 / 8 Podpod 0.0% 0 / 6 totaltotal 26.3% 10 / 38 CC 2 SCAR 9.8
CC
2
Cov
33%
origin
6.0
repo
2.0
add
2.0
CRAP 2.7
« Release/BranchManager.pm ↑ Summary Release/Config.pm »
1 package Git::Release::RemoteManager;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Git::Release::Remote;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 has manager => ( is => 'rw' );
6  
7 0 ▶sub repo { return $_[0]->manager->repo; }
Subroutine repo: not called CC=1 SCAR=6.9
Pod undocumented
8  
9 0 ▶sub add {
Subroutine add: not called CC=1 SCAR=6.9
Pod undocumented
10 0 my ($self,$name,$uri) = @_;
11 0 $self->manager->repo->command('remote','add',$name,$uri);
12 }
13  
14 0 ▶sub all {
Subroutine all: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my $self = shift;
16 # provide a list context to get remote names
17 0 return map { $self->get($_) } $self->list;
18 }
19  
20 0 ▶sub list {
Subroutine list: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my $self = shift;
22 0 my @remotes = $self->manager->repo->command('remote');
23 0 chomp(@remotes);
24 0 return @remotes;
25 }
26  
27 0 ▶sub get {
Subroutine get: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my ($self,$name) = @_;
29 0 return Git::Release::Remote->new( manager => $self->manager , name => $name );
30 }
31  
32 0 ▶sub origin {
Subroutine origin: not called CC=2 SCAR=17.9
Pod undocumented
33 0 my @r = grep /origin/,$_[0]->list;
34 0 ▶ return pop @r if @r;
Branch: 1 branch
BranchTrueFalseTotal
if @r 0 0 0
35 }
36  
37 1 1;
« Release/BranchManager.pm ↑ Summary Release/Config.pm »