Sha256: a3de8f7fed240fc702b3e3a421d0aa54553994524381193bed0ade16909af99d

Contents?: true

Size: 1.4 KB

Versions: 18

Compression:

Stored size: 1.4 KB

Contents

# Fedora Commons REST API module
require 'active_model'

module Rubydora
  autoload :Datastream, "rubydora/datastream"
  autoload :Repository, "rubydora/repository"
  autoload :ResourceIndex, "rubydora/resource_index"
  autoload :RestApiClient, "rubydora/rest_api_client"
  autoload :Soap, "rubydora/soap"
  autoload :ModelsMixin, "rubydora/models_mixin"
  autoload :Ext, "rubydora/ext"
  autoload :RelationshipsMixin, "rubydora/relationships_mixin"
  autoload :DigitalObject, "rubydora/digital_object"
  autoload :ExtensionParameters, "rubydora/extension_parameters"
  autoload :Callbacks, "rubydora/callbacks"
  autoload :ArrayWithCallback, "rubydora/array_with_callback"


  require 'csv'
  if CSV.const_defined? :Reader
    require 'fastercsv'
  end
  require 'restclient'
  require 'nokogiri'

  require 'rubydora/version'

  # Connect to Fedora Repository
  # @return Rubydora::Repository
  def self.connect *args
    Repository.new *args
  end

  # Connect to the default Fedora Repository
  # @return Rubydora::Repository
  def self.repository
    @repository ||= self.connect(self.default_config)
  end

  # Set the default Fedora Repository
  # @param [Rubydora::Repository] repository
  # @return Rubydora::Repository
  def self.repository= repository
    @repository = repository
  end

  # Default repository connection information
  # TODO: read ENV variables?
  # @return Hash
  def self.default_config
    {}
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rubydora-0.3.1 lib/rubydora.rb
rubydora-0.3.0 lib/rubydora.rb
rubydora-0.2.6 lib/rubydora.rb
rubydora-0.2.5 lib/rubydora.rb
rubydora-0.2.4 lib/rubydora.rb
rubydora-0.2.3 lib/rubydora.rb
rubydora-0.2.2 lib/rubydora.rb
rubydora-0.2.1 lib/rubydora.rb
rubydora-0.2.0 lib/rubydora.rb
rubydora-0.1.9 lib/rubydora.rb
rubydora-0.1.8 lib/rubydora.rb
rubydora-0.1.7 lib/rubydora.rb
rubydora-0.1.6 lib/rubydora.rb
rubydora-0.1.5 lib/rubydora.rb
rubydora-0.1.4 lib/rubydora.rb
rubydora-0.1.3 lib/rubydora.rb
rubydora-0.1.1 lib/rubydora.rb
rubydora-0.1.0 lib/rubydora.rb