Class: Bamboo::Client::Rest::QueuedBuild
- Inherits:
-
Object
- Object
- Bamboo::Client::Rest::QueuedBuild
- Defined in:
- lib/bamboo-client/rest.rb
Overview
Queue
Instance Method Summary collapse
- #build_number ⇒ Object
- #build_result_key ⇒ Object
- #changes ⇒ Object
-
#initialize(data, http) ⇒ QueuedBuild
constructor
A new instance of QueuedBuild.
- #plan_key ⇒ Object
- #trigger_reason ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(data, http) ⇒ QueuedBuild
Returns a new instance of QueuedBuild.
292 293 294 295 |
# File 'lib/bamboo-client/rest.rb', line 292 def initialize(data, http) @data = data @http = http end |
Instance Method Details
#build_number ⇒ Object
305 306 307 |
# File 'lib/bamboo-client/rest.rb', line 305 def build_number @data['buildNumber'] end |
#build_result_key ⇒ Object
313 314 315 |
# File 'lib/bamboo-client/rest.rb', line 313 def build_result_key @data['buildResultKey'] end |
#changes ⇒ Object
321 322 323 324 325 326 327 328 329 |
# File 'lib/bamboo-client/rest.rb', line 321 def changes @changes ||= ( unless @data['changes'] && @data['changes']['change'] @data = @http.get(URI.parse(url), {:expand => 'changes'}, @http.).data end @data.fetch('changes').fetch('change').map { |e| Change.new(e, @http) } ) end |
#plan_key ⇒ Object
309 310 311 |
# File 'lib/bamboo-client/rest.rb', line 309 def plan_key @data['planKey'] end |
#trigger_reason ⇒ Object
301 302 303 |
# File 'lib/bamboo-client/rest.rb', line 301 def trigger_reason @data['triggerReason'] end |
#url ⇒ Object
297 298 299 |
# File 'lib/bamboo-client/rest.rb', line 297 def url @data.fetch("link")['href'] end |