rsolr-client-cert 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/lib/rsolr/client_cert/connection.rb +22 -13
- data/lib/rsolr/client_cert/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -13,20 +13,29 @@ module RSolr
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def execute client, request_context
|
16
|
-
|
17
|
-
|
18
|
-
:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
:
|
25
|
-
|
26
|
-
|
16
|
+
old_proxy = RestClient.proxy
|
17
|
+
begin
|
18
|
+
RestClient.proxy = request_context[:proxy]
|
19
|
+
resource = RestClient::Resource.new(
|
20
|
+
request_context[:uri].to_s,
|
21
|
+
:open_timeout => request_context[:open_timeout],
|
22
|
+
:timeout => request_context[:read_timeout],
|
23
|
+
:ssl_client_cert => ssl_client_cert,
|
24
|
+
:ssl_client_key => ssl_client_key
|
25
|
+
)
|
26
|
+
result = {}
|
27
|
+
signature = [request_context[:method], request_context[:data], request_context[:headers]].compact
|
28
|
+
resource.send(*signature) { |response, request, result, &block|
|
29
|
+
result = {
|
30
|
+
:status => response.net_http_res.code.to_i,
|
31
|
+
:headers => response.net_http_res.to_hash,
|
32
|
+
:body => response.net_http_res.body
|
33
|
+
}
|
27
34
|
}
|
28
|
-
|
29
|
-
|
35
|
+
result
|
36
|
+
ensure
|
37
|
+
RestClient.proxy = old_proxy
|
38
|
+
end
|
30
39
|
end
|
31
40
|
|
32
41
|
protected
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsolr-client-cert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 1
|
10
|
+
version: 0.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Klein
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02
|
18
|
+
date: 2012-03-02 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|