aws-sdk-core 3.128.0 → 3.128.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 +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/pageable_response.rb +72 -32
- data/lib/aws-sdk-core/plugins/response_paging.rb +1 -1
- data/lib/aws-sdk-sso/client.rb +1 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/aws-sdk-sts.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: 53aab290e862816944f62b219f9f5ed4695a3eaf875e80c734e4903e6fd7c667
|
|
4
|
+
data.tar.gz: 87ccab0dd866022fd07c8b142649b3ffbe63a62823b8730753552f07b470aa72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e38def3a74f0b22945249d2780e6f11a5b358189dcdcfab4f3e089054cf90accbdedf1f5987023524edba94e63dbabf4c601a9b49c577994935925cce95335e6
|
|
7
|
+
data.tar.gz: 62287dbd4a357de5216564b351938a1e266d0559f87746c288d36ade8715e01678040d47f24c680e1e9009997133201fb0af74e047b20fbf207fe054417cf6e8
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.128.
|
|
1
|
+
3.128.1
|
|
@@ -48,11 +48,11 @@ module Aws
|
|
|
48
48
|
#
|
|
49
49
|
module PageableResponse
|
|
50
50
|
|
|
51
|
-
def self.
|
|
52
|
-
base.extend
|
|
53
|
-
base.
|
|
54
|
-
base.instance_variable_set(
|
|
55
|
-
base
|
|
51
|
+
def self.apply(base)
|
|
52
|
+
base.extend Extension
|
|
53
|
+
base.instance_variable_set(:@last_page, nil)
|
|
54
|
+
base.instance_variable_set(:@more_results, nil)
|
|
55
|
+
base
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
# @return [Paging::Pager]
|
|
@@ -62,39 +62,26 @@ module Aws
|
|
|
62
62
|
# when this method returns `false` will raise an error.
|
|
63
63
|
# @return [Boolean]
|
|
64
64
|
def last_page?
|
|
65
|
-
|
|
66
|
-
@last_page = !@pager.truncated?(self)
|
|
67
|
-
end
|
|
68
|
-
@last_page
|
|
65
|
+
# Actual implementation is in PageableResponse::Extension
|
|
69
66
|
end
|
|
70
67
|
|
|
71
68
|
# Returns `true` if there are more results. Calling {#next_page} will
|
|
72
69
|
# return the next response.
|
|
73
70
|
# @return [Boolean]
|
|
74
71
|
def next_page?
|
|
75
|
-
|
|
72
|
+
# Actual implementation is in PageableResponse::Extension
|
|
76
73
|
end
|
|
77
74
|
|
|
78
75
|
# @return [Seahorse::Client::Response]
|
|
79
76
|
def next_page(params = {})
|
|
80
|
-
|
|
81
|
-
raise LastPageError.new(self)
|
|
82
|
-
else
|
|
83
|
-
next_response(params)
|
|
84
|
-
end
|
|
77
|
+
# Actual implementation is in PageableResponse::Extension
|
|
85
78
|
end
|
|
86
79
|
|
|
87
80
|
# Yields the current and each following response to the given block.
|
|
88
81
|
# @yieldparam [Response] response
|
|
89
82
|
# @return [Enumerable,nil] Returns a new Enumerable if no block is given.
|
|
90
83
|
def each(&block)
|
|
91
|
-
|
|
92
|
-
response = self
|
|
93
|
-
yield(response)
|
|
94
|
-
until response.last_page?
|
|
95
|
-
response = response.next_page
|
|
96
|
-
yield(response)
|
|
97
|
-
end
|
|
84
|
+
# Actual implementation is in PageableResponse::Extension
|
|
98
85
|
end
|
|
99
86
|
alias each_page each
|
|
100
87
|
|
|
@@ -105,9 +92,7 @@ module Aws
|
|
|
105
92
|
# @return [Seahorse::Client::Response] Returns the next page of
|
|
106
93
|
# results.
|
|
107
94
|
def next_response(params)
|
|
108
|
-
|
|
109
|
-
request = context.client.build_request(context.operation_name, params)
|
|
110
|
-
request.send_request
|
|
95
|
+
# Actual implementation is in PageableResponse::Extension
|
|
111
96
|
end
|
|
112
97
|
|
|
113
98
|
# @param [Hash] params A hash of additional request params to
|
|
@@ -115,13 +100,7 @@ module Aws
|
|
|
115
100
|
# @return [Hash] Returns the hash of request parameters for the
|
|
116
101
|
# next page, merging any given params.
|
|
117
102
|
def next_page_params(params)
|
|
118
|
-
#
|
|
119
|
-
# Sometimes a token can be nil and merge would not include it.
|
|
120
|
-
tokens = @pager.tokens.values.map(&:to_sym)
|
|
121
|
-
|
|
122
|
-
params_without_tokens = context[:original_params].reject { |k, _v| tokens.include?(k) }
|
|
123
|
-
params_without_tokens.merge!(@pager.next_tokens(self).merge(params))
|
|
124
|
-
params_without_tokens
|
|
103
|
+
# Actual implementation is in PageableResponse::Extension
|
|
125
104
|
end
|
|
126
105
|
|
|
127
106
|
# Raised when calling {PageableResponse#next_page} on a pager that
|
|
@@ -168,5 +147,66 @@ module Aws
|
|
|
168
147
|
end
|
|
169
148
|
|
|
170
149
|
end
|
|
150
|
+
|
|
151
|
+
# The actual decorator module implementation. It is in a distinct module
|
|
152
|
+
# so that it can be used to extend objects without busting Ruby's constant cache.
|
|
153
|
+
# object.extend(mod) bust the constant cache only if `mod` contains constants of its own.
|
|
154
|
+
# @api private
|
|
155
|
+
module Extension
|
|
156
|
+
|
|
157
|
+
include Enumerable
|
|
158
|
+
include UnsafeEnumerableMethods
|
|
159
|
+
|
|
160
|
+
attr_accessor :pager
|
|
161
|
+
|
|
162
|
+
def last_page?
|
|
163
|
+
if @last_page.nil?
|
|
164
|
+
@last_page = !@pager.truncated?(self)
|
|
165
|
+
end
|
|
166
|
+
@last_page
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def next_page?
|
|
170
|
+
!last_page?
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def next_page(params = {})
|
|
174
|
+
if last_page?
|
|
175
|
+
raise LastPageError.new(self)
|
|
176
|
+
else
|
|
177
|
+
next_response(params)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
def each(&block)
|
|
182
|
+
return enum_for(:each_page) unless block_given?
|
|
183
|
+
response = self
|
|
184
|
+
yield(response)
|
|
185
|
+
until response.last_page?
|
|
186
|
+
response = response.next_page
|
|
187
|
+
yield(response)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
alias each_page each
|
|
191
|
+
|
|
192
|
+
private
|
|
193
|
+
|
|
194
|
+
def next_response(params)
|
|
195
|
+
params = next_page_params(params)
|
|
196
|
+
request = context.client.build_request(context.operation_name, params)
|
|
197
|
+
request.send_request
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def next_page_params(params)
|
|
201
|
+
# Remove all previous tokens from original params
|
|
202
|
+
# Sometimes a token can be nil and merge would not include it.
|
|
203
|
+
tokens = @pager.tokens.values.map(&:to_sym)
|
|
204
|
+
|
|
205
|
+
params_without_tokens = context[:original_params].reject { |k, _v| tokens.include?(k) }
|
|
206
|
+
params_without_tokens.merge!(@pager.next_tokens(self).merge(params))
|
|
207
|
+
params_without_tokens
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
171
211
|
end
|
|
172
212
|
end
|
|
@@ -10,7 +10,7 @@ module Aws
|
|
|
10
10
|
def call(context)
|
|
11
11
|
context[:original_params] = context.params
|
|
12
12
|
resp = @handler.call(context)
|
|
13
|
-
|
|
13
|
+
PageableResponse.apply(resp)
|
|
14
14
|
resp.pager = context.operation[:pager] || Aws::Pager::NullPager.new
|
|
15
15
|
resp
|
|
16
16
|
end
|
data/lib/aws-sdk-sso/client.rb
CHANGED
data/lib/aws-sdk-sso.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
|
@@ -2290,7 +2290,7 @@ module Aws::STS
|
|
|
2290
2290
|
params: params,
|
|
2291
2291
|
config: config)
|
|
2292
2292
|
context[:gem_name] = 'aws-sdk-core'
|
|
2293
|
-
context[:gem_version] = '3.128.
|
|
2293
|
+
context[:gem_version] = '3.128.1'
|
|
2294
2294
|
Seahorse::Client::Request.new(handlers, context)
|
|
2295
2295
|
end
|
|
2296
2296
|
|
data/lib/aws-sdk-sts.rb
CHANGED
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.128.
|
|
4
|
+
version: 3.128.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-03-
|
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jmespath
|