Sha256: e53c09adbf28eaf3262e6e24b53e198398579ce978d7bca6f6309cb8fbe10709

Contents?: true

Size: 692 Bytes

Versions: 4

Compression:

Stored size: 692 Bytes

Contents

require "ezid-client"

module Ezid
  module TestHelper

    TEST_ARK_SHOULDER = "ark:/99999/fk4"
    TEST_DOI_SHOULDER = "doi:10.5072/FK2"

    TEST_USER = "apitest"
    TEST_HOST = Configuration::HOST
    TEST_SHOULDER = TEST_ARK_SHOULDER

    def ezid_test_mode!
      Ezid::Client.configure do |config|
        config.user     = ENV["EZID_TEST_USER"] || TEST_USER
        config.password = ENV["EZID_TEST_PASSWORD"]
        config.host     = ENV["EZID_TEST_HOST"] || TEST_HOST
        config.use_ssl  = true
        config.logger   = Logger.new(File::NULL)
        config.default_shoulder = ENV["EZID_TEST_SHOULDER"] || TEST_SHOULDER
      end
    end

  end
end

include Ezid::TestHelper

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ezid-client-0.11.0 lib/ezid/test_helper.rb
ezid-client-0.10.0 lib/ezid/test_helper.rb
ezid-client-0.9.1 lib/ezid/test_helper.rb
ezid-client-0.9.0 lib/ezid/test_helper.rb