Module: SolrWrapper

Defined in:
lib/solr_wrapper.rb,
lib/solr_wrapper/client.rb,
lib/solr_wrapper/runner.rb,
lib/solr_wrapper/version.rb,
lib/solr_wrapper/instance.rb,
lib/solr_wrapper/settings.rb,
lib/solr_wrapper/rake_task.rb,
lib/solr_wrapper/downloader.rb,
lib/solr_wrapper/popen_runner.rb,
lib/solr_wrapper/configuration.rb,
lib/solr_wrapper/popen4_runner.rb,
lib/solr_wrapper/checksum_validator.rb

Defined Under Namespace

Modules: RakeTask Classes: ChecksumValidator, Client, Configuration, Downloader, Instance, Popen4Runner, PopenRunner, Runner, Settings, SolrWrapperError

Constant Summary collapse

VERSION =
'2.2.0'

Class Method Summary collapse

Class Method Details

.default_instance(options = {}) ⇒ Object


32
33
34
# File 'lib/solr_wrapper.rb', line 32

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

.default_instance_optionsObject


21
22
23
24
25
26
# File 'lib/solr_wrapper.rb', line 21

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

.default_instance_options=(options) ⇒ Object


28
29
30
# File 'lib/solr_wrapper.rb', line 28

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

.default_solr_portObject


17
18
19
# File 'lib/solr_wrapper.rb', line 17

def self.default_solr_port
  '8983'
end

.default_solr_versionObject


13
14
15
# File 'lib/solr_wrapper.rb', line 13

def self.default_solr_version
  'latest'
end

.instance(options = {}) ⇒ Object


36
37
38
# File 'lib/solr_wrapper.rb', line 36

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

.wrap(options = {}, &block) ⇒ Object

Ensures a Solr service is running before executing the block


42
43
44
# File 'lib/solr_wrapper.rb', line 42

def self.wrap(options = {}, &block)
  instance(options).wrap &block
end