Sha256: b7ed640fa1636a8138f5f86ddd5eaf3b95c9672f4f39cd991e792e83bfd35e76

Contents?: true

Size: 1000 Bytes

Versions: 1

Compression:

Stored size: 1000 Bytes

Contents

require 'solr_wrapper/version'
require 'solr_wrapper/configuration'
require 'solr_wrapper/settings'
require 'solr_wrapper/md5'
require 'solr_wrapper/downloader'
require 'solr_wrapper/instance'
require 'solr_wrapper/client'

module SolrWrapper
  def self.default_solr_version
    'latest'
  end

  def self.default_solr_port
    '8983'
  end

  def self.default_instance_options
    @default_instance_options ||= {
      port: SolrWrapper.default_solr_port,
      version: SolrWrapper.default_solr_version
    }
  end

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

  def self.default_instance(options = {})
    @default_instance ||= instance(default_instance_options)
  end

  def self.instance(options = {})
    SolrWrapper::Instance.new(options)
  end

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

  class SolrWrapperError < StandardError; end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solr_wrapper-1.0.0 lib/solr_wrapper.rb