class Object

Public Instance Methods

interface() click to toggle source
# File lib/thinking_sphinx/tasks.rb, line 77
def interface
  @interface ||= ThinkingSphinx.rake_interface.new(
    :verbose     => Rake::FileUtilsExt.verbose_flag,
    :silent      => Rake.application.options.silent,
    :nodetach    => (ENV['NODETACH'] == 'true'),
    :index_names => ENV.fetch('INDEX_FILTER', '').split(',')
  )
end
rake(tasks) click to toggle source
# File lib/thinking_sphinx/capistrano/v2.rb, line 52
def rake(tasks)
  rails_env = fetch(:rails_env, 'production')
  rake = fetch(:rake, 'rake')
  tasks += ' INDEX_ONLY=true' if ENV['INDEX_ONLY'] == 'true'

  run "if [ -d #{release_path} ]; then cd #{release_path}; else cd #{current_path}; fi; if [ -f Rakefile ]; then #{rake} RAILS_ENV=#{rails_env} #{tasks}; fi;"
end