websolr-sunspot_rails 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/websolr-sunspot_rails.rb +15 -18
- data/websolr-sunspot_rails.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.2
|
@@ -13,25 +13,22 @@ if ENV["WEBSOLR_URL"]
|
|
13
13
|
|
14
14
|
@pending = true
|
15
15
|
Rails.logger.info "Checking index availability..."
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
16
|
+
|
17
|
+
response = RestClient.post("http://#{ENV["WEBSOLR_CONFIG_HOST"]}/schema/#{api_key}.json", :client => "sunspot-0.10")
|
18
|
+
json = JSON.parse(response)
|
19
|
+
case json["status"]
|
20
|
+
when "ok":
|
21
|
+
Rails.logger.info "Index is available!"
|
22
|
+
@pending = false
|
23
|
+
when "pending":
|
24
|
+
Rails.logger.info "Provisioning index, things may not be working for a few seconds ..."
|
25
|
+
sleep 5
|
26
|
+
when "error"
|
27
|
+
Rails.logger.error json["message"]
|
28
|
+
@pending = false
|
29
|
+
else
|
30
|
+
Rails.logger.error "wtf: #{json.inspect}"
|
32
31
|
end
|
33
|
-
Rails.logger.info "Moving on..."
|
34
|
-
|
35
32
|
|
36
33
|
module Sunspot #:nodoc:
|
37
34
|
module Rails #:nodoc:
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{websolr-sunspot_rails}
|
8
|
-
s.version = "0.10.
|
8
|
+
s.version = "0.10.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kyle Maxwell", "John Barnette", "Mat Brown"]
|