Class: Artifactory::Resource::Build
- Defined in:
- lib/artifactory/resources/build.rb
Class Method Summary collapse
-
.all(options = {}) ⇒ Array<Resource::Build>
Search for all builds in the system.
Methods inherited from Base
attribute, attributes, #attributes, #client, #client=, #client?, #extract_client!, extract_client!, find_from_config, #format_repos!, format_repos!, from_hash, from_url, has_attribute?, #initialize, #inspect, list_from_config, #set, #to_hash, #to_json, #to_matrix_properties, #to_s, url_safe, #url_safe
Constructor Details
This class inherits a constructor from Artifactory::Resource::Base
Class Method Details
.all(options = {}) ⇒ Array<Resource::Build>
Search for all builds in the system.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/artifactory/resources/build.rb', line 16 def all( = {}) client = extract_client!() client.get('/api/build') rescue Error::HTTPError => e # Artifactory returns a 404 instead of an empty list when there are no # builds. Whoever decided that was a good idea clearly doesn't # understand the point of REST interfaces... raise unless e.code == 404 [] end |