| 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
Condition0%0/3
$args{"task"} and not $args{"job"}
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"}
| |||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||