Module: ArtRest
- Defined in:
- lib/artrest.rb,
lib/artrest/build.rb,
lib/artrest/builds.rb,
lib/artrest/system.rb,
lib/artrest/version.rb,
lib/artrest/resource.rb,
lib/artrest/dir_entry.rb,
lib/artrest/resources.rb,
lib/artrest/repository.rb,
lib/artrest/buildnumber.rb,
lib/artrest/repositories.rb,
lib/artrest/system_general_configuration.rb
Defined Under Namespace
Modules: DirEntry Classes: Artifact, Build, Buildnumber, Builds, Folder, Repositories, Repository, Resource, Resources, System
Constant Summary collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
-
.builds ⇒ Object
Return the ArtRest::Builds resource.
-
.connect(base_url, user, password, options = {}) ⇒ Object
Cache supplied
base_url
,username
andpassword
prior to using this API. -
.system ⇒ Object
Return the ArtRest::System resource.
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
23 24 25 |
# File 'lib/artrest.rb', line 23 def @options end |
Class Method Details
.builds ⇒ Object
Return the ArtRest::Builds resource.
-
Returns :
-
The ArtRest::Builds resource
-
-
Raises :
-
RuntimeException
-> If you didn’t call ::connect prior to calling this method
-
71 72 73 74 |
# File 'lib/artrest.rb', line 71 def self.builds self.check_connected Builds.get(self.[:base_url], self.) end |
.connect(base_url, user, password, options = {}) ⇒ Object
Cache supplied base_url
, username
and password
prior to using this API.
-
Args :
-
base_url
-> Our Artifactory server’s URL, typically localhost:8081/artifactory -
username
-> Username used when connecting to Artifactory -
password
-> Password used when connecting to Artifactory -
options
-> Additional connections parameters, currently unused
-
-
Raises :
-
ArgumentError
-> If one of the parameters isnil
-
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/artrest.rb', line 38 def self.connect(base_url, user, password, = {}) raise ArgumentError.new "Must pass base_url" unless base_url raise ArgumentError.new "Must pass user" unless user raise ArgumentError.new "Must pass password" unless password self. = { :base_url => base_url, :user => user, :password => password } self..merge!() end |
.system ⇒ Object
Return the ArtRest::System resource.
-
Returns :
-
The ArtRest::System resource
-
-
Raises :
-
RuntimeException
-> If you didn’t call ::connect prior to calling this method
-
58 59 60 61 |
# File 'lib/artrest.rb', line 58 def self.system self.check_connected System.get(self.[:base_url], self.) end |