Class: KPM::NexusFacade::Actions
- Inherits:
-
Object
- Object
- KPM::NexusFacade::Actions
- Defined in:
- lib/kpm/nexus_helper/actions.rb
Instance Attribute Summary collapse
-
#nexus_api_call ⇒ Object
readonly
Returns the value of attribute nexus_api_call.
Instance Method Summary collapse
- #get_artifact_info(coordinates) ⇒ Object
-
#initialize(overrides, ssl_verify, logger) ⇒ Actions
constructor
A new instance of Actions.
- #pull_artifact(coordinates, destination = nil) ⇒ Object
- #search_for_artifacts(coordinates) ⇒ Object
Constructor Details
#initialize(overrides, ssl_verify, logger) ⇒ Actions
Returns a new instance of Actions.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/kpm/nexus_helper/actions.rb', line 9 def initialize(overrides, ssl_verify, logger) overrides ||= {} overrides[:url] ||= 'https://oss.sonatype.org' overrides[:repository] ||= 'releases' #this is where the version is verified #example if #@nexus_api_call = overrides['version'] == '3' ? NexusApiCallsV3.new(overrides, ssl_verify) : NexusApiCallsV2.new(overrides, ssl_verify) @nexus_api_call = NexusApiCallsV2.new(overrides, ssl_verify, logger) end |
Instance Attribute Details
#nexus_api_call ⇒ Object (readonly)
Returns the value of attribute nexus_api_call.
7 8 9 |
# File 'lib/kpm/nexus_helper/actions.rb', line 7 def nexus_api_call @nexus_api_call end |
Instance Method Details
#get_artifact_info(coordinates) ⇒ Object
24 25 26 |
# File 'lib/kpm/nexus_helper/actions.rb', line 24 def get_artifact_info(coordinates) nexus_api_call.get_artifact_info(coordinates) end |
#pull_artifact(coordinates, destination = nil) ⇒ Object
20 21 22 |
# File 'lib/kpm/nexus_helper/actions.rb', line 20 def pull_artifact(coordinates, destination=nil) nexus_api_call.pull_artifact(coordinates, destination) end |
#search_for_artifacts(coordinates) ⇒ Object
28 29 30 |
# File 'lib/kpm/nexus_helper/actions.rb', line 28 def search_for_artifacts(coordinates) nexus_api_call.search_for_artifacts(coordinates) end |