Class: Sunspot::Installer

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot/installer.rb,
lib/sunspot/installer/task_helper.rb,
lib/sunspot/installer/schema_builder.rb,
lib/sunspot/installer/library_installer.rb,
lib/sunspot/installer/solrconfig_updater.rb

Defined Under Namespace

Modules: TaskHelper Classes: LibraryInstaller, SchemaBuilder, SolrconfigUpdater

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(solr_home, options) ⇒ Installer

Returns a new instance of Installer.



15
16
17
# File 'lib/sunspot/installer.rb', line 15

def initialize(solr_home, options)
  @solr_home, @options = solr_home, options
end

Class Method Details

.execute(solr_home, options = {}) ⇒ Object



8
9
10
# File 'lib/sunspot/installer.rb', line 8

def execute(solr_home, options = {})
  new(solr_home, options).execute
end

Instance Method Details

#executeObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/sunspot/installer.rb', line 19

def execute
  SchemaBuilder.execute(
    File.join(@solr_home, 'conf', 'schema.xml'),
    @options
  )
  SolrconfigUpdater.execute(
    File.join(@solr_home, 'conf', 'solrconfig.xml'),
    @options
  )
  LibraryInstaller.execute(File.join(@solr_home, 'lib'), @options)
end