Sha256: b1b83cefc78b8fd677537480622bcf7a09910026125fda5ab15c16b20dcf4557

Contents?: true

Size: 758 Bytes

Versions: 19

Compression:

Stored size: 758 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_PORT = Configuration::PORT
    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.port     = ENV["EZID_TEST_PORT"] || TEST_PORT
        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

19 entries across 19 versions & 1 rubygems

Version Path
ezid-client-1.9.0 lib/ezid/test_helper.rb
ezid-client-1.9.0.rc1 lib/ezid/test_helper.rb
ezid-client-1.8.0 lib/ezid/test_helper.rb
ezid-client-1.7.1 lib/ezid/test_helper.rb
ezid-client-1.7.0 lib/ezid/test_helper.rb
ezid-client-1.6.0 lib/ezid/test_helper.rb
ezid-client-1.5.0 lib/ezid/test_helper.rb
ezid-client-1.4.3 lib/ezid/test_helper.rb
ezid-client-1.4.2 lib/ezid/test_helper.rb
ezid-client-1.4.1 lib/ezid/test_helper.rb
ezid-client-1.4.0 lib/ezid/test_helper.rb
ezid-client-1.3.0 lib/ezid/test_helper.rb
ezid-client-1.2.0 lib/ezid/test_helper.rb
ezid-client-1.1.1 lib/ezid/test_helper.rb
ezid-client-1.1.0 lib/ezid/test_helper.rb
ezid-client-1.0.1 lib/ezid/test_helper.rb
ezid-client-1.0.0 lib/ezid/test_helper.rb
ezid-client-0.13.0 lib/ezid/test_helper.rb
ezid-client-0.12.0 lib/ezid/test_helper.rb