Sha256: 7cc4ce6b0608bd74f6f82aace51a2609bb6c0168b510c44b4db6e0655464d90b

Contents?: true

Size: 1006 Bytes

Versions: 9

Compression:

Stored size: 1006 Bytes

Contents

require_relative 'nexus_api_calls_v2'
#require_relative 'nexus_api_calls_v3'

module KPM
  module NexusFacade
    class Actions
      attr_reader :nexus_api_call

      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

      def pull_artifact(coordinates, destination=nil)
        nexus_api_call.pull_artifact(coordinates, destination)
      end

      def get_artifact_info(coordinates)
        nexus_api_call.get_artifact_info(coordinates)
      end

      def search_for_artifacts(coordinates)
        nexus_api_call.search_for_artifacts(coordinates)
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kpm-0.7.2 lib/kpm/nexus_helper/actions.rb
kpm-0.7.1 lib/kpm/nexus_helper/actions.rb
kpm-0.7.0 lib/kpm/nexus_helper/actions.rb
kpm-0.6.5 lib/kpm/nexus_helper/actions.rb
kpm-0.6.4 lib/kpm/nexus_helper/actions.rb
kpm-0.6.3 lib/kpm/nexus_helper/actions.rb
kpm-0.6.2 lib/kpm/nexus_helper/actions.rb
kpm-0.6.1 lib/kpm/nexus_helper/actions.rb
kpm-0.6.0 lib/kpm/nexus_helper/actions.rb