lib/thinking_sphinx/configuration.rb in dpickett-thinking-sphinx-1.1.4 vs lib/thinking_sphinx/configuration.rb in dpickett-thinking-sphinx-1.1.12

- old
+ new

@@ -29,12 +29,14 @@ # If you want to change these settings, create a YAML file at # config/sphinx.yml with settings for each environment, in a similar # fashion to database.yml - using the following keys: config_file, # searchd_log_file, query_log_file, pid_file, searchd_file_path, port, # allow_star, enable_star, min_prefix_len, min_infix_len, mem_limit, - # max_matches, # morphology, charset_type, charset_table, ignore_chars, - # html_strip, # html_remove_elements. I think you've got the idea. + # max_matches, morphology, charset_type, charset_table, ignore_chars, + # html_strip, html_remove_elements, delayed_job_priority. + # + # I think you've got the idea. # # Each setting in the YAML file is optional - so only put in the ones you # want to change. # # Keep in mind, if for some particular reason you're using a version of @@ -53,11 +55,12 @@ ngram_len phrase_boundary phrase_boundary_step preopen stopwords wordforms ) attr_accessor :config_file, :searchd_log_file, :query_log_file, :pid_file, :searchd_file_path, :address, :port, :allow_star, - :database_yml_file, :app_root, :bin_path, :model_directories + :database_yml_file, :app_root, :bin_path, :model_directories, + :delayed_job_priority attr_accessor :source_options, :index_options attr_reader :environment, :configuration @@ -83,10 +86,12 @@ self.database_yml_file = "#{self.app_root}/config/database.yml" self.config_file = "#{self.app_root}/config/#{environment}.sphinx.conf" self.searchd_file_path = "#{self.app_root}/db/sphinx/#{environment}" self.allow_star = false self.bin_path = "" - self.model_directories = ["#{app_root}/app/models/"] + self.model_directories = ["#{app_root}/app/models/"] + + Dir.glob("#{app_root}/vendor/plugins/*/app/models/") + self.delayed_job_priority = 0 self.source_options = {} self.index_options = { :charset_type => "utf-8", :morphology => "stem_en"