Skip to content

Commit 5243245

Browse files
committed
fix: Regional API domain processing
1 parent 8f52d3b commit 5243245

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/twilio-ruby/base/client_base.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ def request(host, port, method, uri, params = {}, data = {}, headers = {}, auth
102102
# Build the final request uri
103103
def build_uri(uri)
104104
if @edge.nil? && @region && @@region_mappings[@region]
105-
# rubocop:disable Layout/LineLength
106105
warn '[DEPRECATION] Setting default `Edge` for the provided `region`.'
107-
# rubocop:enable Layout/LineLength
108106
@edge = @@region_mappings[@region]
109107
end
110108
return uri if @region.nil? && @edge.nil?

spec/rest/client_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
$stderr = StringIO.new
3737
begin
3838
@client = Twilio::REST::Client.new('myUser', 'myPassword', 'someSid', 'ie1', 'myClient', 'myLogger')
39-
warn '[DEPRECATION] For regional processing, DNS is of format product.<edge>.<region>.twilio.com; otherwise use product.twilio.com.+[DEPRECATION] Setting default `Edge` for the provided `region`.'
39+
warn '[DEPRECATION] For regional processing, DNS is of format product.<edge>.<region>.twilio.com; otherwise use product.twilio.com.'
4040
warn '[DEPRECATION] Setting default `Edge` for the provided `region`.'
4141
warnings = $stderr.string
42-
expect(warnings).to include('[DEPRECATION] For regional processing, DNS is of format product.<edge>.<region>.twilio.com; otherwise use product.twilio.com.+[DEPRECATION] Setting default `Edge` for the provided `region`.')
42+
expect(warnings).to include('[DEPRECATION] For regional processing, DNS is of format product.<edge>.<region>.twilio.com; otherwise use product.twilio.com.')
4343
expect(warnings).to include('[DEPRECATION] Setting default `Edge` for the provided `region`.')
4444
ensure
4545
$stderr = original_stderr

0 commit comments

Comments
 (0)