aws-sdk-sqs 1.51.0 → 1.51.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25ae9e9a7eb3e3d4851109a3cebe1e8fcdcaa58ade8810ed85dc95c6bf76f052
4
- data.tar.gz: 44c1cbb60da9017421ed9aa9448982a058f84a9b9cce65315b9c92356f4fdea0
3
+ metadata.gz: 2bac70020cb8b5fe20d0b38b5cd856af384eef9aee80a701d909ca062b657cfa
4
+ data.tar.gz: b972f049341de73326d00fc6dd119a109adda17280c738d3f6cb797f7516a888
5
5
  SHA512:
6
- metadata.gz: c331171642161bb03378161964f50a73e0340aaeb5073593b0052f60002f54652e7bd3047c6a876dbb7f7632fbfd70773e71f0abe38e8e5acc63b528e5a461b9
7
- data.tar.gz: 7efd4eb375936ca605707fe01e53446c70d958fbb1dd2d78a120e46177652b13e05d22e4ba9f1606535e7fa2396a55e770d268a9808406bfdd8660f2faf48035
6
+ metadata.gz: cf02aa1920e2d81380a32cae0451d0e4baeef2fe3ee2de212f4086ba3c5852cdb038c1f754514530f76be1cbd2a0e761bf118bf6539ce16753102a34fae4f5c8
7
+ data.tar.gz: 71111f49013ca9d1398ca3e0bce36c42699894386a80b70cdc5254281cdaaff413aca6f9774b77ed8eb62380c18b3aaf13b2e32ec198c9bde9110067a3629211
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.51.1 (2022-05-02)
5
+ ------------------
6
+
7
+ * Issue - Parse the region from the `queue_url` param only if the component is exactly `sqs`.
8
+
4
9
  1.51.0 (2022-02-24)
5
10
  ------------------
6
11
 
@@ -345,4 +350,4 @@ Unreleased Changes
345
350
  1.0.0.rc1 (2016-12-05)
346
351
  ------------------
347
352
 
348
- * Feature - Initial preview release of the `aws-sdk-sqs` gem.
353
+ * Feature - Initial preview release of the `aws-sdk-sqs` gem.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.51.0
1
+ 1.51.1
@@ -2486,7 +2486,7 @@ module Aws::SQS
2486
2486
  params: params,
2487
2487
  config: config)
2488
2488
  context[:gem_name] = 'aws-sdk-sqs'
2489
- context[:gem_version] = '1.51.0'
2489
+ context[:gem_version] = '1.51.1'
2490
2490
  Seahorse::Client::Request.new(handlers, context)
2491
2491
  end
2492
2492
 
@@ -5,11 +5,10 @@ module Aws
5
5
  module Plugins
6
6
  # @api private
7
7
  class QueueUrls < Seahorse::Client::Plugin
8
-
8
+ # Extract region from a provided queue_url
9
9
  class Handler < Seahorse::Client::Handler
10
-
11
10
  def call(context)
12
- if queue_url = context.params[:queue_url]
11
+ if (queue_url = context.params[:queue_url])
13
12
  update_endpoint(context, queue_url)
14
13
  update_region(context, queue_url)
15
14
  end
@@ -24,7 +23,7 @@ module Aws
24
23
  # region, then we will modify the request to have
25
24
  # a sigv4 signer for the proper region.
26
25
  def update_region(context, queue_url)
27
- if queue_region = parse_region(queue_url)
26
+ if (queue_region = parse_region(queue_url))
28
27
  if queue_region != context.config.region
29
28
  config = context.config.dup
30
29
  config.region = queue_region
@@ -37,12 +36,21 @@ module Aws
37
36
 
38
37
  private
39
38
 
40
- # take the first component after service delimiter
41
- # https://sqs.us-east-1.amazonaws.com/1234567890/demo
42
- # https://vpce-x-y.sqs.us-east-1.vpce.amazonaws.com/1234567890/demo
39
+ # take the first component after the SQS service component
40
+ # Will return us-east-1 for:
41
+ # https://sqs.us-east-1.amazonaws.com/1234567890/demo
42
+ # https://vpce-x-y.sqs.us-east-1.vpce.amazonaws.com/1234567890/demo
43
+ # Will not return for:
44
+ # https://localstack-sqs.example.dev/queue/example
43
45
  def parse_region(url)
44
- parts = url.split('sqs.')
45
- parts[1].split('.').first if parts.size > 1
46
+ parts = URI.parse(url).host.split('.')
47
+ parts.each_with_index do |part, index|
48
+ if part == 'sqs'
49
+ # assume region is the part right after the 'sqs' part
50
+ return parts[index + 1]
51
+ end
52
+ end
53
+ nil # no region found
46
54
  end
47
55
 
48
56
  end
data/lib/aws-sdk-sqs.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sqs/customizations'
50
50
  # @!group service
51
51
  module Aws::SQS
52
52
 
53
- GEM_VERSION = '1.51.0'
53
+ GEM_VERSION = '1.51.1'
54
54
 
55
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.51.0
4
+ version: 1.51.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-24 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core