flying-sphinx 0.2.4 → 0.2.5

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 CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -29,7 +29,15 @@ class FlyingSphinx::IndexRequest
29
29
  end
30
30
 
31
31
  def request_complete?
32
- api.get("/app/indices/#{index_id}") == 'FINISHED'
32
+ case response = api.get("/app/indices/#{index_id}")
33
+ when 'FINISHED', 'FAILED'
34
+ puts "Indexing request failed." if response == 'FAILED'
35
+ true
36
+ when 'PENDING'
37
+ false
38
+ else
39
+ raise "Unknown index response: #{response}"
40
+ end
33
41
  end
34
42
 
35
43
  def api
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: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Allan