Class: NexusCli::RemoteFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/nexus_cli/remote_factory.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject (readonly)

Returns the value of attribute configuration.



7
8
9
# File 'lib/nexus_cli/remote_factory.rb', line 7

def configuration
  @configuration
end

.connectionObject (readonly)

Returns the value of attribute connection.



8
9
10
# File 'lib/nexus_cli/remote_factory.rb', line 8

def connection
  @connection
end

Class Method Details

.create(overrides, ssl_verify = true) ⇒ NexusCli::ProRemote, NexusCli::OSSRemote

Creates a new Nexus Remote that can connect to and communicate with the Nexus server.

Parameters:

  • overrides (Hash)
  • ssl_verify (Boolean) (defaults to: true)

Returns:



17
18
19
20
21
# File 'lib/nexus_cli/remote_factory.rb', line 17

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