rt_sphinx 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,10 +3,14 @@
3
3
  module RtSphinx
4
4
  class Manager
5
5
  def self.start
6
- `killall searchd`
6
+ conf_file_path = File.join(File.expand_path('../../..', __FILE__), 'sphinx.conf')
7
+ kill_daemon_if_needed
8
+ puts `searchd --config #{conf_file_path}`
9
+ end
10
+
11
+ def self.kill_daemon_if_needed
12
+ `pid=$(lsof -i :9327 -t); if [ $pid ] ; then kill -TERM $pid || kill -KILL $pid; fi;`
7
13
  sleep(1)
8
- res = `searchd`
9
- puts res
10
14
  end
11
15
 
12
16
  # TODO: create configurator method. Template should be like this:
data/rt_sphinx.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'rt_sphinx'
6
- s.version = '0.0.4'
6
+ s.version = '0.0.5'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.license = 'MIT'
9
9
  s.authors = ['Dmitry Koprov']
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rt_sphinx
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dmitry Koprov