Sha256: 3b1f7f0763c39e699c1afa9e1c70fd754cbba9b684d5f5b27583d7ceb0300137

Contents?: true

Size: 697 Bytes

Versions: 2

Compression:

Stored size: 697 Bytes

Contents

require 'fcrepo_wrapper/version'
require 'fcrepo_wrapper/instance'

module FcrepoWrapper
  def self.default_fcrepo_version
    '4.5.0'
  end

  def self.default_instance_options
    @default_instance_options ||= {
      port: '8080',
      version: FcrepoWrapper.default_fcrepo_version
    }
  end

  def self.default_instance_options=(options)
    @default_instance_options = options
  end

  def self.default_instance(options = {})
    @default_instance ||= FcrepoWrapper::Instance.new default_instance_options.merge(options)
  end

  ##
  # Ensures a fcrepo service is running before executing the block
  def self.wrap(options = {}, &block)
    default_instance(options).wrap &block
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fcrepo_wrapper-0.2.1 lib/fcrepo_wrapper.rb
fcrepo_wrapper-0.2.0 lib/fcrepo_wrapper.rb