vonage 7.20.0 → 7.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vonage/namespace.rb +5 -4
- data/lib/vonage/signature.rb +1 -1
- data/lib/vonage/version.rb +1 -1
- data/vonage.gemspec +1 -0
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8839127b442d9de3ee98bfc35f38bf76c967389bcf02136a28c8232f497f94bb
|
4
|
+
data.tar.gz: c52b8d863d3326153f6678a9234457eb945b155f6fdfa2b782e45abbc4c5d16b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf2d3ae171d5278f8c8d9c68129e3ba70b1edce0d16fb414bf0ecae7995c27620fbaca284f40c121dc128e6388f1485fa4bfa069f52e38b029d2f76397a73b0e
|
7
|
+
data.tar.gz: 49897746fc8dc49fd67b01e3366215cc6298a59f771c1544b0004d2dcdac07c5d4b2263f383ac6c17e9d9bf7ca483bb4922bcc4ebdcdb0167a4823ac4387f627
|
data/lib/vonage/namespace.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require 'net/http'
|
5
|
+
require 'net/http/persistent'
|
5
6
|
require 'net/http/post/multipart'
|
6
7
|
require 'json'
|
7
8
|
|
@@ -12,8 +13,7 @@ module Vonage
|
|
12
13
|
|
13
14
|
@host = set_host
|
14
15
|
|
15
|
-
@http = Net::HTTP.new
|
16
|
-
@http.use_ssl = true
|
16
|
+
@http = Net::HTTP::Persistent.new
|
17
17
|
|
18
18
|
@config.http.set(@http) unless @config.http.nil?
|
19
19
|
end
|
@@ -94,7 +94,8 @@ module Vonage
|
|
94
94
|
def make_request!(request, &block)
|
95
95
|
logger.log_request_info(request)
|
96
96
|
|
97
|
-
|
97
|
+
uri = URI("https://" + @host + request.path)
|
98
|
+
response = @http.request(uri, request, &block)
|
98
99
|
|
99
100
|
logger.log_response_info(response, @host)
|
100
101
|
|
@@ -143,7 +144,7 @@ module Vonage
|
|
143
144
|
|
144
145
|
uri = override_uri ? URI(override_uri) : URI('https://' + @host + path)
|
145
146
|
|
146
|
-
http =
|
147
|
+
http = Net::HTTP.new(uri.host, Net::HTTP.https_default_port, p_addr = nil)
|
147
148
|
http.use_ssl = true
|
148
149
|
http.set_debug_output($stdout)
|
149
150
|
|
data/lib/vonage/signature.rb
CHANGED
@@ -32,7 +32,7 @@ module Vonage
|
|
32
32
|
|
33
33
|
signature = params.delete('sig')
|
34
34
|
|
35
|
-
::JWT::
|
35
|
+
::JWT::JWA::Hmac::SecurityUtils.secure_compare(signature, digest(params, signature_secret, signature_method))
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
data/lib/vonage/version.rb
CHANGED
data/vonage.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.add_dependency('zeitwerk', '~> 2', '>= 2.2')
|
17
17
|
s.add_dependency('sorbet-runtime', '~> 0.5')
|
18
18
|
s.add_dependency('multipart-post', '~> 2.0')
|
19
|
+
s.add_dependency('net-http-persistent', '~> 4.0', '>= 4.0.2')
|
19
20
|
s.add_runtime_dependency('rexml')
|
20
21
|
s.add_runtime_dependency('phonelib')
|
21
22
|
s.require_path = 'lib'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vonage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vonage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vonage-jwt
|
@@ -72,6 +72,26 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '2.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: net-http-persistent
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '4.0'
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 4.0.2
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '4.0'
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 4.0.2
|
75
95
|
- !ruby/object:Gem::Dependency
|
76
96
|
name: rexml
|
77
97
|
requirement: !ruby/object:Gem::Requirement
|