uv-rays 2.2.0 → 2.2.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.
- checksums.yaml +4 -4
- data/lib/handsoap/http/drivers/libuv_driver.rb +4 -0
- data/lib/httpi/adapter/libuv.rb +10 -0
- data/lib/uv-rays/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78e7156e2749b0ce6c3e4d5bf5606db76aaf96b
|
4
|
+
data.tar.gz: 1ac6ac77ad8daa8822226643022f22802ffc56c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28890ae1bf5f3a59086501c6e335f18bb0d45d02190bf5c727748e61bdce6f2b6fdb8905d8b0fcd3ac782ff5b8c24078a5de93002bbd5a5932a54b046b2e15a0
|
7
|
+
data.tar.gz: f4c251a43b923455b7e186c18df99c27a3eb06105ec1d405b2d86011b0bfecd44ae5fca132307448c655fc68b527268a050ad208c72fccb5f39e1b5f5c18e204
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true, encoding: ASCII-8BIT
|
2
2
|
|
3
|
+
require 'handsoap'
|
4
|
+
|
3
5
|
module Handsoap
|
4
6
|
module Http
|
5
7
|
module Drivers
|
@@ -34,5 +36,7 @@ module Handsoap
|
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|
39
|
+
|
40
|
+
@@drivers[:libuv] = ::Handsoap::Http::Drivers::LibuvDriver
|
37
41
|
end
|
38
42
|
end
|
data/lib/httpi/adapter/libuv.rb
CHANGED
@@ -21,6 +21,7 @@ class HTTPI::Adapter::Libuv < HTTPI::Adapter::Base
|
|
21
21
|
body: @request.body
|
22
22
|
}
|
23
23
|
|
24
|
+
# Apply authentication settings
|
24
25
|
auth = @request.auth
|
25
26
|
type = auth.type
|
26
27
|
if auth.type
|
@@ -43,6 +44,15 @@ class HTTPI::Adapter::Libuv < HTTPI::Adapter::Base
|
|
43
44
|
end
|
44
45
|
end
|
45
46
|
|
47
|
+
# Apply Client certificates
|
48
|
+
ssl = auth.ssl
|
49
|
+
if ssl.verify_mode == :peer
|
50
|
+
tls_opts = req[:tls_options] = {}
|
51
|
+
tls_opts[:cert_chain] = ssl.cert.to_pem if ssl.cert
|
52
|
+
tls_opts[:client_ca] = ssl.ca_cert_file if ssl.ca_cert_file
|
53
|
+
tls_opts[:private_key] = ssl.cert_key.to_pem if ssl.cert_key
|
54
|
+
end
|
55
|
+
|
46
56
|
# Use co-routines to make non-blocking requests
|
47
57
|
response = co @client.request(method, req)
|
48
58
|
::HTTPI::Response.new(response.status, response, response.body)
|
data/lib/uv-rays/version.rb
CHANGED