def options_for_table(table)
resulting_options = options.clone
tables_with_options.each do |table_options|
match = false
if table_options[0].kind_of? Regexp
match = (table_options[0] =~ table)
else
match = (table_options[0].sub(/(^.*),.*/,'\1').strip == table)
end
resulting_options.merge! table_options[1] if match
end
[
Syncers.configured_syncer(resulting_options),
Replicators.configured_replicator(resulting_options)
].each do |processor_class|
if processor_class.respond_to? :default_options
default_processor_options = processor_class.default_options.clone
else
default_processor_options = {}
end
resulting_options = default_processor_options.merge!(resulting_options)
end
resulting_options
end