rsolr 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rsolr/client.rb +2 -2
- data/lib/rsolr/version.rb +1 -1
- data/spec/integration/solr5_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c960b323d2d9a7c55bb892ab8b9bfe8db4fff397
|
4
|
+
data.tar.gz: c93c6b76729f9cac0e55a58342b0b6b38e0041e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc2ac88e92295eebff1b18c855581a13add730c91c7c91ad3da5418833ca7e8b1b399fe463bce56effb518c2f22c57215d402f6dacbf986905c71ef566bd55c4
|
7
|
+
data.tar.gz: dd196670c202450afb490318a4032150e1b380e9ed21077ccfa31c1ae88905aa01948d9a91e2bca244b5dbedf9342cb30b2dc2314c87f537e8908226be9d2a3a
|
data/lib/rsolr/client.rb
CHANGED
@@ -189,10 +189,10 @@ class RSolr::Client
|
|
189
189
|
end
|
190
190
|
|
191
191
|
{ status: response.status.to_i, headers: response.headers, body: response.body.force_encoding('utf-8') }
|
192
|
+
rescue Errno::ECONNREFUSED, Faraday::Error::ConnectionFailed
|
193
|
+
raise RSolr::Error::ConnectionRefused, request_context.inspect
|
192
194
|
rescue Faraday::Error => e
|
193
195
|
raise RSolr::Error::Http.new(request_context, e.response)
|
194
|
-
rescue Errno::ECONNREFUSED
|
195
|
-
raise RSolr::Error::ConnectionRefused, request_context.inspect
|
196
196
|
end
|
197
197
|
adapt_response(request_context, raw_response) unless raw_response.nil?
|
198
198
|
end
|
data/lib/rsolr/version.rb
CHANGED
@@ -23,4 +23,12 @@ RSpec.describe "Solr basic_configs" do
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
context "error handling" do
|
28
|
+
subject { RSolr.connect url: "http://localhost:65432/solr/basic_configs/"}
|
29
|
+
|
30
|
+
it "wraps connection errors" do
|
31
|
+
expect { subject.head('admin/ping') }.to raise_error RSolr::Error::ConnectionRefused
|
32
|
+
end
|
33
|
+
end
|
26
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsolr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antoine Latter
|
@@ -29,7 +29,7 @@ authors:
|
|
29
29
|
autorequire:
|
30
30
|
bindir: bin
|
31
31
|
cert_chain: []
|
32
|
-
date: 2017-05-
|
32
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: builder
|