Module: Sunspot::Rails

Defined in:
lib/sunspot/rails.rb,
lib/sunspot/rails/server.rb,
lib/sunspot/rails/railtie.rb,
lib/sunspot/rails/version.rb,
lib/sunspot/rails/adapters.rb,
lib/sunspot/rails/searchable.rb,
lib/sunspot/rails/spec_helper.rb,
lib/sunspot/rails/solr_logging.rb,
lib/sunspot/rails/configuration.rb,
lib/sunspot/rails/request_lifecycle.rb,
lib/sunspot/rails/stub_session_proxy.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Adapters, Mongoid, RequestLifecycle, Searchable, SolrLogging, SpecHelper Classes: Configuration, Railtie, Server, StubSessionProxy

Constant Summary collapse

VERSION =
'1.2.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



16
17
18
# File 'lib/sunspot/rails.rb', line 16

def configuration
  @configuration ||= Sunspot::Rails::Configuration.new
end

Class Method Details

.build_session(configuration = self.configuration) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/sunspot/rails.rb', line 24

def build_session(configuration = self.configuration)
  if configuration.has_master?
    SessionProxy::MasterSlaveSessionProxy.new(
      SessionProxy::ThreadLocalSessionProxy.new(master_config(configuration)),
      SessionProxy::ThreadLocalSessionProxy.new(slave_config(configuration))
    )
  else
    SessionProxy::ThreadLocalSessionProxy.new(slave_config(configuration))
  end
end

.resetObject



20
21
22
# File 'lib/sunspot/rails.rb', line 20

def reset
  @configuration = nil
end