lib/riddle/configuration.rb in riddle-1.5.10 vs lib/riddle/configuration.rb in riddle-1.5.11
- old
+ new
@@ -1,8 +1,9 @@
require 'riddle/configuration/section'
require 'riddle/configuration/index_settings'
+require 'riddle/configuration/common'
require 'riddle/configuration/distributed_index'
require 'riddle/configuration/index'
require 'riddle/configuration/indexer'
require 'riddle/configuration/realtime_index'
require 'riddle/configuration/remote_index'
@@ -18,26 +19,27 @@
module Riddle
class Configuration
class ConfigurationError < StandardError #:nodoc:
end
- attr_reader :indices, :searchd, :sources
+ attr_reader :common, :indices, :searchd, :sources
attr_accessor :indexer
def self.parse!(input)
Riddle::Configuration::Parser.new(input).parse!
end
def initialize
+ @common = Riddle::Configuration::Common.new
@indexer = Riddle::Configuration::Indexer.new
@searchd = Riddle::Configuration::Searchd.new
@indices = []
@sources = []
end
def render
(
- [@indexer.render, @searchd.render] +
+ [@common.render, @indexer.render, @searchd.render] +
@sources.collect { |source| source.render } +
@indices.collect { |index| index.render }
).join("\n")
end
end