Class: Yank::Nexus
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(artifact_name, repo, version) ⇒ Nexus
constructor
A new instance of Nexus.
- #install(dir) ⇒ Object
Methods included from Logging
configure_logger_for, #logger, logger_for
Constructor Details
#initialize(artifact_name, repo, version) ⇒ Nexus
Returns a new instance of Nexus.
10 11 12 13 14 15 16 17 18 |
# File 'lib/vcs/nexus.rb', line 10 def initialize(artifact_name, repo, version) @name = artifact_name @repo = repo @version = version logger.debug("nexus repo: #{@repo}") logger.debug("nexus artifact name: #{@name}") logger.debug("nexus artifact version: #{@version}") end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/vcs/nexus.rb', line 6 def name @name end |
Instance Method Details
#install(dir) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vcs/nexus.rb', line 20 def install(dir) logger.debug("Preparing nexus client download from #{@repo}...") client = ::Nexus::Client.new(@repo, nil, false, false, logger) if @version["type"] == "gav" client.download_gav("#{dir}/#{@name}", "#{@version["value"]}") else raise ::Yank::YankException.new("gav must be the version type with nexus specified.") end end |