Class: TFS::Builds

Inherits:
Queryable show all
Defined in:
lib/tfs/builds.rb

Constant Summary collapse

STATES =
%w(All
Failed
InProgress
None
NotStarted
PartiallySucceeded
Stopped
Succeeded)

Constants inherited from Queryable

Queryable::RecordNotFound

Constants included from ClassHelpers

ClassHelpers::SPECIAL_CASES

Class Method Summary collapse

Methods inherited from Queryable

all, inherited, odata_query

Methods included from ClassHelpers

#base_class, #method_name_from_class, #odata_class_from_method_name

Class Method Details

.find(definition, project, number) ⇒ Object

To do an explicit build find, the API requires the definiton the build is from, the project it exists within, and the build number.

TFS::Builds.find("DevBuild", "My New Project", 'DevBuild.3')


24
25
26
27
28
29
30
# File 'lib/tfs/builds.rb', line 24

def find(definition, project, number)
  begin
    TFS.builds(definition: definition, project: project, number: number).run.first
  rescue RestClient::ResourceNotFound => e
    raise Queryable::RecordNotFound, "No record found for '#{definition}', '#{project}', #{number}"
  end
end