Sha256: 5644682b8439dda55bf95c206151119d315a4d3c9a8c9d04e77e8f9bbfcf6824

Contents?: true

Size: 558 Bytes

Versions: 3

Compression:

Stored size: 558 Bytes

Contents

module FedoraMigrate
  class RubydoraConnection
    
    attr_accessor :options, :connection

    def initialize(params={})
      params = params.dup
      self.options = params
      connect
    end

    def connect(force=false)
      return unless @connection.nil? or force
      allowable_options = [:url, :user, :password, :timeout, :open_timeout, :ssl_client_cert, :ssl_client_key, :validateChecksum]
      client_options = options.reject { |k,v| not allowable_options.include?(k) }
      @connection = Rubydora.connect client_options
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fedora-migrate-0.3.0 lib/fedora_migrate/rubydora_connection.rb
fedora-migrate-0.2.0 lib/fedora_migrate/rubydora_connection.rb
fedora-migrate-0.1.0 lib/fedora_migrate/rubydora_connection.rb