Skip to content

Commit

Permalink
Issue #14 [BuildQueue] - added remaining methods. still untested.
Browse files Browse the repository at this point in the history
  • Loading branch information
arangamani committed Jan 26, 2013
1 parent ccdac8f commit 9226519
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions lib/jenkins_api_client/build_queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,30 @@ def get_params(task_name)
end

def is_buildable?(task_name)

buildable = nil
details = get_details(task_name)
unless details.empty?
buildable = details["buildable"] == "true" ? true : false
end
buildable
end

def is_blocked?(task_name)

blocked = nil
details = get_details(task_name)
unless details.empty?
blocked = details["blocked"] == "true" ? true : false
end
blocked
end

def is_stuck?(task_name)

stuck = nil
details = get_details(task_name)
unless details.empty?
stuck = details["stuck"] == "true" ? true : false
end
stuck
end

end
Expand Down

0 comments on commit 9226519

Please sign in to comment.