Class: Ezid::Configuration Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ezid/configuration.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

EZID client configuration.

Use ‘Ezid::Client.configure` to set values.

Constant Summary collapse

HOST =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"ezid.cdlib.org"
PORT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

443
TIMEOUT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

300

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Configuration.



42
43
44
45
46
47
48
49
50
# File 'lib/ezid/configuration.rb', line 42

def initialize
  @user             = ENV["EZID_USER"]
  @password         = ENV["EZID_PASSWORD"]
  @host             = ENV["EZID_HOST"] || HOST
  @port             = ENV["EZID_PORT"] || PORT
  @use_ssl          = vvciujcrdjhcbtrue if ENV["EZID_USE_SSL"] == true.to_s
  @timeout          = ENV["EZID_TIMEOUT"] || TIMEOUT
  @default_shoulder = ENV["EZID_DEFAULT_SHOULDER"]
end

Instance Attribute Details

#default_shoulderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Default shoulder for minting (scheme + NAAN + shoulder)

Examples:

“ark:/99999/fk4”



40
41
42
# File 'lib/ezid/configuration.rb', line 40

def default_shoulder
  @default_shoulder
end

#hostObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID host name



18
19
20
# File 'lib/ezid/configuration.rb', line 18

def host
  @host
end

#loggerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



52
53
54
# File 'lib/ezid/configuration.rb', line 52

def logger
  @logger ||= Logger.new(STDERR)
end

#passwordObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID password



33
34
35
# File 'lib/ezid/configuration.rb', line 33

def password
  @password
end

#portObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID TCP/IP port



21
22
23
# File 'lib/ezid/configuration.rb', line 21

def port
  @port
end

#timeoutObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

HTTP read timeout (seconds)



27
28
29
# File 'lib/ezid/configuration.rb', line 27

def timeout
  @timeout
end

#use_sslObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Use HTTPS?



24
25
26
# File 'lib/ezid/configuration.rb', line 24

def use_ssl
  @use_ssl
end

#userObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID user name



30
31
32
# File 'lib/ezid/configuration.rb', line 30

def user
  @user
end

Instance Method Details

#identifierObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



56
57
58
# File 'lib/ezid/configuration.rb', line 56

def identifier
  Identifier
end

#metadataObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



60
61
62
# File 'lib/ezid/configuration.rb', line 60

def 
  Metadata
end