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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e62d74b123d37c098faef65853320aa4860642c2c483da541480a39bdfd4da6d
4
- data.tar.gz: d7717268228d1d05a627164a1355265e071b094ffe4667fdc508afcc15580657
3
+ metadata.gz: 8839127b442d9de3ee98bfc35f38bf76c967389bcf02136a28c8232f497f94bb
4
+ data.tar.gz: c52b8d863d3326153f6678a9234457eb945b155f6fdfa2b782e45abbc4c5d16b
5
5
  SHA512:
6
- metadata.gz: 38310bd39902127226b3fd48bc0cc675ed958c33b816493926e8379dfc3460f03fedaa0d6a2f080195cca50cc539411ba0082ec26bc77343b8b523b52b2bc946
7
- data.tar.gz: 69de80f50b4d1add808f1a9225c2881dfce85fe0285afce01da9a750f8ceec2e1caba03e1c0c30fa02c3039a6d6b1e1dc050c32fb8884d5873af0579c4b57013
6
+ metadata.gz: bf2d3ae171d5278f8c8d9c68129e3ba70b1edce0d16fb414bf0ecae7995c27620fbaca284f40c121dc128e6388f1485fa4bfa069f52e38b029d2f76397a73b0e
7
+ data.tar.gz: 49897746fc8dc49fd67b01e3366215cc6298a59f771c1544b0004d2dcdac07c5d4b2263f383ac6c17e9d9bf7ca483bb4922bcc4ebdcdb0167a4823ac4387f627
@@ -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(@host, Net::HTTP.https_default_port, p_addr = nil)
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
- response = @http.request(request, &block)
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 = override_uri ? Net::HTTP.new(uri.host, Net::HTTP.https_default_port, p_addr = nil) : @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
 
@@ -32,7 +32,7 @@ module Vonage
32
32
 
33
33
  signature = params.delete('sig')
34
34
 
35
- ::JWT::Algos::Hmac::SecurityUtils.secure_compare(signature, digest(params, signature_secret, signature_method))
35
+ ::JWT::JWA::Hmac::SecurityUtils.secure_compare(signature, digest(params, signature_secret, signature_method))
36
36
  end
37
37
 
38
38
  private
@@ -1,5 +1,5 @@
1
1
  # typed: strong
2
2
 
3
3
  module Vonage
4
- VERSION = '7.20.0'
4
+ VERSION = '7.21.0'
5
5
  end
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.20.0
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-02 00:00:00.000000000 Z
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