websolr-sunspot_rails 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/websolr-sunspot_rails.rb +10 -3
- data/websolr-sunspot_rails.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.1
|
@@ -9,10 +9,12 @@ if ENV["WEBSOLR_URL"]
|
|
9
9
|
|
10
10
|
api_key = ENV["WEBSOLR_URL"][/[0-9a-f]{11}/] or raise "Invalid WEBSOLR_URL: bad or no api key"
|
11
11
|
|
12
|
+
ENV["WEBSOLR_CONFIG_HOST"] ||= "www.websolr.com"
|
13
|
+
|
12
14
|
@pending = true
|
13
|
-
Rails.logger.info "Checking index availability"
|
14
|
-
|
15
|
-
response = RestClient.post("http
|
15
|
+
Rails.logger.info "Checking index availability..."
|
16
|
+
while @pending
|
17
|
+
response = RestClient.post("http://#{ENV["WEBSOLR_CONFIG_HOST"]}/schema/#{api_key}.json", :client => "sunspot-0.10")
|
16
18
|
json = JSON.parse(response)
|
17
19
|
case json["status"]
|
18
20
|
when "ok":
|
@@ -20,11 +22,16 @@ if ENV["WEBSOLR_URL"]
|
|
20
22
|
@pending = false
|
21
23
|
when "pending":
|
22
24
|
Rails.logger.info "Provisioning index, please wait ..."
|
25
|
+
sleep 5
|
23
26
|
when "error"
|
24
27
|
Rails.logger.error json["message"]
|
25
28
|
@pending = false
|
29
|
+
else
|
30
|
+
Rails.logger.error "wtf: #{json.inspect}"
|
26
31
|
end
|
27
32
|
end
|
33
|
+
Rails.logger.info "Moving on..."
|
34
|
+
|
28
35
|
|
29
36
|
module Sunspot #:nodoc:
|
30
37
|
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.1"
|
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"]
|