Sha256: d2dd851544a96db7422aac34418ee9d412ece2c693f75720777a63fb50683aca

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

require "logger"

module Ezid
  #
  # EZID client configuration.
  #
  # Use Ezid::Client.configure to set values.
  #
  # @api private
  class Configuration

    # EZID user name
    #   Default: value of EZID_USER environment variable
    attr_accessor :user

    # EZID password
    #   Default: value of EZID_PASSWORD environment variable
    attr_accessor :password

    # Ruby logger instance
    #   Default device: STDERR
    attr_writer :logger

    # Default metadata profile
    # attr_accessor :default_metadata_profile

    # Default status - set only if default should not "public" (EZID default)
    # attr_accessor :default_status

    # Default shoulder for minting
    # attr_accessor :default_shoulder

    # Hash of options to pass to Net::HTTP.start
    # attr_accessor :http_request_options

    def initialize
      @user = ENV["EZID_USER"]
      @password = ENV["EZID_PASSWORD"]
      # @http_request_options = default_http_request_options
    end

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

    # def default_http_request_options
    #   { use_ssl: true }
    # end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ezid-client-0.5.0 lib/ezid/configuration.rb
ezid-client-0.4.2 lib/ezid/configuration.rb
ezid-client-0.4.1 lib/ezid/configuration.rb
ezid-client-0.4.0 lib/ezid/configuration.rb