Class: Ezid::Configuration Private
- Inherits:
-
Object
- Object
- Ezid::Configuration
- 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
Instance Attribute Summary collapse
-
#default_shoulder ⇒ Object
private
Default shoulder for minting (scheme + NAAN + shoulder).
-
#host ⇒ Object
private
EZID host name Default: value of ‘EZID_HOST` environment variable, if present, or the EZID service host “ezid.cdlib.org”.
- #logger ⇒ Object private
-
#password ⇒ Object
private
EZID password Default: value of ‘EZID_PASSWORD` environment variable.
-
#port ⇒ Object
private
EZID TCP/IP port Default: value of ‘EZID_PORT` variable.
-
#use_ssl ⇒ Object
private
Use HTTPS? Default: ‘nil`; `true` if `EZID_USE_SSL` environment variable is set to the string “true”.
-
#user ⇒ Object
private
EZID user name Default: value of ‘EZID_USER` environment variable.
Instance Method Summary collapse
- #identifier ⇒ Object private
-
#initialize ⇒ Configuration
constructor
private
A new instance of Configuration.
- #metadata ⇒ Object private
Constructor Details
#initialize ⇒ Configuration
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.
46 47 48 49 50 51 52 53 |
# File 'lib/ezid/configuration.rb', line 46 def initialize @user = ENV["EZID_USER"] @password = ENV["EZID_PASSWORD"] @host = ENV["EZID_HOST"] || HOST @port = ENV["EZID_PORT"] || PORT @use_ssl = true if ENV["EZID_USE_SSL"] == true.to_s @default_shoulder = ENV["EZID_DEFAULT_SHOULDER"] end |
Instance Attribute Details
#default_shoulder ⇒ Object
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)
44 45 46 |
# File 'lib/ezid/configuration.rb', line 44 def default_shoulder @default_shoulder end |
#host ⇒ Object
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
Default: value of `EZID_HOST` environment variable, if present, or
the EZID service host "ezid.cdlib.org".
19 20 21 |
# File 'lib/ezid/configuration.rb', line 19 def host @host end |
#logger ⇒ Object
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.
55 56 57 |
# File 'lib/ezid/configuration.rb', line 55 def logger @logger ||= Logger.new(STDERR) end |
#password ⇒ Object
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
Default: value of `EZID_PASSWORD` environment variable
36 37 38 |
# File 'lib/ezid/configuration.rb', line 36 def password @password end |
#port ⇒ Object
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
Default: value of `EZID_PORT` variable
23 24 25 |
# File 'lib/ezid/configuration.rb', line 23 def port @port end |
#use_ssl ⇒ Object
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?
Default: `nil`; `true` if `EZID_USE_SSL` environment variable is set
to the string "true".
28 29 30 |
# File 'lib/ezid/configuration.rb', line 28 def use_ssl @use_ssl end |
#user ⇒ Object
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
Default: value of `EZID_USER` environment variable
32 33 34 |
# File 'lib/ezid/configuration.rb', line 32 def user @user end |
Instance Method Details
#identifier ⇒ Object
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.
59 60 61 |
# File 'lib/ezid/configuration.rb', line 59 def identifier Identifier end |
#metadata ⇒ Object
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.
63 64 65 |
# File 'lib/ezid/configuration.rb', line 63 def Metadata end |