blib/lib/Net/Jenkins/Job/QueueItem.pm

filter: Statementstmt 76.9% 20 / 26 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 3 / 5 Podpod 50.0% 1 / 2 totaltotal 60.0% 24 / 40 CC 3 SCAR 17.7
CC
3
Cov
65%
BUILDARGS
12.0
to_hashref
2.0
BEGIN
1.0
CRAP 5.9
↑ Summary blib/lib/Net/Jenkins.pm »
1 package Net::Jenkins::Job::QueueItem;
2 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use methods;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Net::Jenkins::Job;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 has id => ( is => 'rw' );
7  
8 2 has why => ( is => 'rw' );
9  
10 2 has stuck => ( is => 'rw' );
11  
12 2 has buildable => ( is => 'rw' );
13  
14 2 has inQueueSince => ( is => 'rw' );
15  
16 2 has params => ( is => 'rw' );
17  
18 2 has timestamp => ( is => 'rw' );
19  
20 2 has blocked => ( is => 'rw' );
21  
22 2 has job => ( is => 'rw' );
23  
24 2 has _api => ( is => 'rw' , isa => 'Net::Jenkins' );
25  
26 0 ▶sub BUILDARGS {
Subroutine BUILDARGS: not called CC=3 SCAR=24.8
Pod documented
27 0 my ($self,%args) = @_;
28 0 ▶ $args{job} = Net::Jenkins::Job->new( %{ $args{task} } , $args{_api} ) if $args{task} && ! $args{job};
Branch: 1 branch
BranchTrueFalseTotal
if $args{"task"} and not $args{"job"} 0 0 0
Condition0%0/3
$args{"task"} and not $args{"job"}
!ll&&!rl&&r
000
MC/DC0%0/2
$args{"task"} and not $args{"job"}
$args{"task"} not $args{"job"}
Truth table0%0/3
A and not(B)
A= $args{"task"}B= not $args{"job"}
ABresult
0X0
100
111
29 0 return \%args;
30 }
31  
32 0 ▶sub to_hashref {
Subroutine to_hashref: not called CC=1 SCAR=6.9
Pod undocumented
33 0 my ($self,$with_details) = @_;
34 return {
35 0 id => $self->id,
36 why => $self->why,
37 stuck => $self->stuck,
38 params => $self->params,
39 buildable => $self->buildable,
40 blocked => $self->blocked,
41 timestamp => $self->timestamp,
42 inQueueSince => $self->inQueueSince,
43 };
44 }
45  
46 =pod
47  
48 {
49 'stuck' => $VAR1->{'concurrentBuild'},
50 'buildable' => $VAR1->{'concurrentBuild'},
51 'task' => {
52 'url' => 'http://localhost:8080/job/Phifty/',
53 'name' => 'Phifty'
54 },
55 'inQueueSince' => '1337737814477',
56 'params' => '',
57 'timestamp' => '1337737819477',
58 'blocked' => $VAR1->{'concurrentBuild'},
59 'id' => 35,
60 'why' => 'In the quiet period. Expires in 4.9 sec'
61 },
62  
63 =cut
64  
65 2 1;
↑ Summary blib/lib/Net/Jenkins.pm »