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 +4 -4
- data/CHANGELOG.md +6 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-sqs/client.rb +1 -1
- data/lib/aws-sdk-sqs/plugins/queue_urls.rb +17 -9
- data/lib/aws-sdk-sqs.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bac70020cb8b5fe20d0b38b5cd856af384eef9aee80a701d909ca062b657cfa
|
4
|
+
data.tar.gz: b972f049341de73326d00fc6dd119a109adda17280c738d3f6cb797f7516a888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
1
|
+
1.51.1
|
data/lib/aws-sdk-sqs/client.rb
CHANGED
@@ -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
|
41
|
-
#
|
42
|
-
#
|
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('
|
45
|
-
parts
|
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
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.
|
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
|
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
|