Sha256: d8b4c744deeaf09158383ac531a6bfdd70f98bd6c5737180853dac1321d85901

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

require 'httpclient'
require 'yaml'

module NexusCli
  class RemoteFactory 
    class << self
      attr_reader :configuration
      attr_reader :connection

      def create(overrides, ssl_verify=true)
        @configuration = Configuration::parse(overrides)
        @connection = Connection.new(configuration, ssl_verify)
        running_nexus_pro? ? ProRemote.new(overrides, ssl_verify) : OSSRemote.new(overrides, ssl_verify)
      end

      private

      def running_nexus_pro?
        return connection.status['edition_long'] == "Professional" ? true : false
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nexus_cli-3.0.0 lib/nexus_cli/remote_factory.rb