flying-sphinx 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
@@ -1,5 +1,5 @@
1
1
  class FlyingSphinx::Configuration
2
- attr_reader :heroku_id, :api_key, :host, :port, :database_port
2
+ attr_reader :heroku_id, :api_key, :host, :port, :database_port, :mem_limit
3
3
 
4
4
  def initialize(heroku_id = nil, api_key = nil)
5
5
  @heroku_id = heroku_id || heroku_id_from_env
@@ -40,6 +40,7 @@ class FlyingSphinx::Configuration
40
40
  @host = json['server']
41
41
  @port = json['port']
42
42
  @database_port = json['database_port']
43
+ @mem_limit = json['mem_limit']
43
44
  end
44
45
 
45
46
  def base_path
@@ -62,6 +63,7 @@ class FlyingSphinx::Configuration
62
63
  ThinkingSphinx.remote_sphinx = true
63
64
 
64
65
  set_searchd_settings
66
+ set_indexer_settings
65
67
  set_path_settings
66
68
  end
67
69
 
@@ -78,6 +80,10 @@ class FlyingSphinx::Configuration
78
80
  thinking_sphinx.address = host
79
81
  end
80
82
 
83
+ def set_indexer_settings
84
+ riddle.indexer.mem_limit = mem_limit.to_s + 'M'
85
+ end
86
+
81
87
  def set_database_settings
82
88
  riddle.indexes.each do |index|
83
89
  next unless index.respond_to?(:sources)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flying-sphinx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 5
10
- version: 0.2.5
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Allan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-26 00:00:00 +11:00
18
+ date: 2011-01-01 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency