twilio-ruby 5.66.1 → 5.66.2

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
  SHA1:
3
- metadata.gz: 27cd5b2536a7ece409f2f6222f9743446e7ed44f
4
- data.tar.gz: 2d2d5e161f40f11b388f9118eebd120e9c5ba765
3
+ metadata.gz: 1920b33b39b09bf234cd20e91aebff55c3883bcc
4
+ data.tar.gz: b0abb17c32b875c50001e4bf8e024f655bb395c7
5
5
  SHA512:
6
- metadata.gz: 32503dca86f69127f882feec36ad61d9c91f01379ae60f10bed3f9d410e30399d3436bbd097ff063a9359f100c83173b82b9203fd1871500694ef81cec6cb911
7
- data.tar.gz: d426b5f3df1f6a991f0c829623dd5c67d17de0f7068ac79b586911e4dc8afb3052ac781fa5e152b7c5c63adf9f7696732ed072527457d523e3b13d4fc49574a0
6
+ metadata.gz: aca67e15af03fee97418c118c81bddd84148ef497b23a59bc4a09bfdc97387d9779b972ca53c8fa431aefb74bb5f7149682b56295183536f9f8795107e83b13a
7
+ data.tar.gz: 59ce3eec9ba1be93a2e97ef6521656f97af26b6763103c5b8389d927acb9c210328e5f4371f8d2500247ef5caa176a72c13c76ee130d85a4435152665eed87e5
data/CHANGES.md CHANGED
@@ -1,6 +1,12 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2022-04-20] Version 5.66.2
5
+ ---------------------------
6
+ **Library - Chore**
7
+ - [PR #604](https://github.com/twilio/twilio-ruby/pull/604): update the user agent string for twilio-ruby. Thanks to [@claudiachua](https://github.com/claudiachua)!
8
+
9
+
4
10
  [2022-04-06] Version 5.66.1
5
11
  ---------------------------
6
12
  **Api**
data/README.md CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.66.1'
37
+ gem 'twilio-ruby', '~> 5.66.2'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.66.1
43
+ gem install twilio-ruby -v 5.66.2
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -13,11 +13,11 @@ module Twilio
13
13
  class Client
14
14
  @@default_region = 'us1'
15
15
 
16
- attr_accessor :http_client, :username, :password, :account_sid, :auth_token, :region, :edge, :logger
16
+ attr_accessor :http_client, :username, :password, :account_sid, :auth_token, :region, :edge, :logger, :user_agent_extensions
17
17
 
18
18
  ##
19
19
  # Initializes the Twilio Client
20
- def initialize(username=nil, password=nil, account_sid=nil, region=nil, http_client=nil, logger=nil)
20
+ def initialize(username=nil, password=nil, account_sid=nil, region=nil, http_client=nil, logger=nil, user_agent_extensions=nil)
21
21
  @username = username || Twilio.account_sid
22
22
  @password = password || Twilio.auth_token
23
23
  @region = region || Twilio.region
@@ -27,6 +27,7 @@ module Twilio
27
27
  @auth = [@username, @password]
28
28
  @http_client = http_client || Twilio.http_client || Twilio::HTTP::Client.new
29
29
  @logger = logger || Twilio.logger
30
+ @user_agent_extensions = user_agent_extensions || []
30
31
 
31
32
  # Domains
32
33
  @accounts = nil
@@ -69,11 +70,11 @@ module Twilio
69
70
  def request(host, port, method, uri, params={}, data={}, headers={}, auth=nil, timeout=nil)
70
71
  auth ||= @auth
71
72
 
72
- headers['User-Agent'] = "twilio-ruby/#{Twilio::VERSION}" +
73
- " (#{RUBY_ENGINE}/#{RUBY_PLATFORM}" +
74
- " #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL})"
73
+ headers['User-Agent'] = "twilio-ruby/#{Twilio::VERSION} (#{`uname -s`.chomp} #{`uname -m`.chomp}) Ruby/#{RUBY_VERSION}"
75
74
  headers['Accept-Charset'] = 'utf-8'
76
75
 
76
+ user_agent_extensions.each { |extension| headers['User-Agent'] += " #{extension}" }
77
+
77
78
  if method == 'POST' && !headers['Content-Type']
78
79
  headers['Content-Type'] = 'application/x-www-form-urlencoded'
79
80
  end
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.66.1'
2
+ VERSION = '5.66.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.66.1
4
+ version: 5.66.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-06 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt