aws-sdk-core 3.180.3 → 3.181.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +13 -9
- data/lib/aws-sdk-sso/client.rb +1 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +1 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/plugins/request_callback.rb +31 -0
- 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: b6df46cd10099e32386bf4fff52191337a39021f84a7a46b617b913911993777
|
4
|
+
data.tar.gz: 2754618a9f4bbdf00db2b9e5d3667aead3927201317e56e83970d162e9afc099
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca5a1d442ccc9ca1086b508566b76920e067d888e3bfb790da9f4c2dfc8e1afa1e450b7198600be821f4f805175649b3862c7dae0d0bf7e71e824ee6b15637d7
|
7
|
+
data.tar.gz: 18943478b20e2682113fe5e5e79a93741d8c2ea7899fda57f64021e9d573cf9bff0288649961d3b9bfda7192114c2d2d179e3207472b75104d7b2d4a072e10dc
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
3.181.1 (2023-09-14)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Issue - Fix host label validation in endpoint matchers.
|
8
|
+
|
9
|
+
3.181.0 (2023-08-22)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Add support for `on_chunk_received` callback.
|
13
|
+
|
4
14
|
3.180.3 (2023-08-09)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.181.1
|
@@ -79,11 +79,11 @@ module Aws
|
|
79
79
|
return false if value.empty?
|
80
80
|
|
81
81
|
if allow_sub_domains
|
82
|
-
labels = value.split('.')
|
82
|
+
labels = value.split('.', -1)
|
83
83
|
return labels.all? { |l| valid_host_label?(l) }
|
84
84
|
end
|
85
85
|
|
86
|
-
value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/
|
86
|
+
!!(value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/)
|
87
87
|
end
|
88
88
|
|
89
89
|
# AWS
|
@@ -114,13 +114,17 @@ module Aws
|
|
114
114
|
|
115
115
|
# aws.isVirtualHostableS3Bucket(value: string, allowSubDomains: bool) bool
|
116
116
|
def self.aws_virtual_hostable_s3_bucket?(value, allow_sub_domains = false)
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
117
|
+
return false if value.empty?
|
118
|
+
|
119
|
+
if allow_sub_domains
|
120
|
+
labels = value.split('.', -1)
|
121
|
+
return labels.all? { |l| aws_virtual_hostable_s3_bucket?(l) }
|
122
|
+
end
|
123
|
+
|
124
|
+
# must be between 3 and 63 characters long, no uppercase
|
125
|
+
value =~ /\A(?!-)[a-z0-9-]{3,63}(?<!-)\z/ &&
|
126
|
+
# not an IP address
|
127
|
+
value !~ /(\d+\.){3}\d+/
|
124
128
|
end
|
125
129
|
end
|
126
130
|
end
|
data/lib/aws-sdk-sso/client.rb
CHANGED
data/lib/aws-sdk-sso.rb
CHANGED
data/lib/aws-sdk-ssooidc.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -2344,7 +2344,7 @@ module Aws::STS
|
|
2344
2344
|
params: params,
|
2345
2345
|
config: config)
|
2346
2346
|
context[:gem_name] = 'aws-sdk-core'
|
2347
|
-
context[:gem_version] = '3.
|
2347
|
+
context[:gem_version] = '3.181.1'
|
2348
2348
|
Seahorse::Client::Request.new(handlers, context)
|
2349
2349
|
end
|
2350
2350
|
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -60,6 +60,16 @@ the number of bytes read from the body, and the total number of
|
|
60
60
|
bytes in the body.
|
61
61
|
DOCS
|
62
62
|
|
63
|
+
option(:on_chunk_received,
|
64
|
+
default: nil,
|
65
|
+
doc_type: 'Proc',
|
66
|
+
docstring: <<-DOCS)
|
67
|
+
When a Proc object is provided, it will be used as callback when each chunk
|
68
|
+
of the response body is received. It provides three arguments: the chunk,
|
69
|
+
the number of bytes received, and the total number of
|
70
|
+
bytes in the response (or nil if the server did not send a `content-length`).
|
71
|
+
DOCS
|
72
|
+
|
63
73
|
# @api private
|
64
74
|
class OptionHandler < Client::Handler
|
65
75
|
def call(context)
|
@@ -68,8 +78,29 @@ bytes in the body.
|
|
68
78
|
end
|
69
79
|
on_chunk_sent = context.config.on_chunk_sent if on_chunk_sent.nil?
|
70
80
|
context[:on_chunk_sent] = on_chunk_sent if on_chunk_sent
|
81
|
+
|
82
|
+
if context.params.is_a?(Hash) && context.params[:on_chunk_received]
|
83
|
+
on_chunk_received = context.params.delete(:on_chunk_received)
|
84
|
+
end
|
85
|
+
on_chunk_received = context.config.on_chunk_received if on_chunk_received.nil?
|
86
|
+
|
87
|
+
add_response_events(on_chunk_received, context) if on_chunk_received
|
88
|
+
|
71
89
|
@handler.call(context)
|
72
90
|
end
|
91
|
+
|
92
|
+
def add_response_events(on_chunk_received, context)
|
93
|
+
shared_data = {bytes_received: 0}
|
94
|
+
|
95
|
+
context.http_response.on_headers do |_status, headers|
|
96
|
+
shared_data[:content_length] = headers['content-length']&.to_i
|
97
|
+
end
|
98
|
+
|
99
|
+
context.http_response.on_data do |chunk|
|
100
|
+
shared_data[:bytes_received] += chunk.bytesize if chunk && chunk.respond_to?(:bytesize)
|
101
|
+
on_chunk_received.call(chunk, shared_data[:bytes_received], shared_data[:content_length])
|
102
|
+
end
|
103
|
+
end
|
73
104
|
end
|
74
105
|
|
75
106
|
# @api private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.181.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: 2023-
|
11
|
+
date: 2023-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|