aws-sdk-core 3.94.0 → 3.94.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: 013be14c50cd2f84bc8db92fbcc838368de7424782da617a63e5ded5ad9b132c
4
- data.tar.gz: 6f64cca7a945df5caf0f074e93860de149ac1f4ecb4d3d5c4d37ab785828165f
3
+ metadata.gz: e3dcb7b830a3e5f10ec9ad91d7f9ac0dd951c01ab6ac7ef4d3c92cc246121e5e
4
+ data.tar.gz: 67de0b39500fbd0f673f8eab1090a2ff2c8ccc0ff8d29458de785c9ba323e48c
5
5
  SHA512:
6
- metadata.gz: f587d229ac78de946e51d724026979c92daf3252f1e6fe0931f9e52e469ee75618ba25d87186757358c0826df6c891974760ec6cab2a03df8a089955b7856a3f
7
- data.tar.gz: 55ce6c601c093dccd8487b9e28834300c2851c8b31a0149385aa15052b6acdec0d79ed155f868cd1e13bfbaeaa5d4316a13c0fde928625fd089ee2d3ab493edf
6
+ metadata.gz: 73071a7ac86e2211ea76e64bf6ab449317cc9b7855a329729872363a09901f10937650bd4a7739590de279012987584b6222fdf1fe02e6762218cb849a18bb1d
7
+ data.tar.gz: d79f0f6d5bfe744db5361b08f6622862e0f6c153625cf9ee7034eca28d02955d553f5d2d3723bb4422b98df7bbfb05b705a58c2006bdf7715520e1de6eeaf302
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.94.0
1
+ 3.94.1
@@ -167,8 +167,8 @@ module Aws
167
167
 
168
168
  # @api private
169
169
  def eager_autoload!(*args)
170
- msg = 'Aws.eager_autoload is no longer needed, usage of '
171
- msg << 'autoload has been replaced with require statements'
170
+ msg = 'Aws.eager_autoload is no longer needed, usage of '\
171
+ 'autoload has been replaced with require statements'
172
172
  warn(msg)
173
173
  end
174
174
 
@@ -42,8 +42,8 @@ module Aws
42
42
  if config.stub_responses
43
43
  @send_events
44
44
  else
45
- msg = 'This method is only implemented for stubbed clients, and is '
46
- msg << 'available when you enable stubbing in the constructor with `stub_responses: true`'
45
+ msg = 'This method is only implemented for stubbed clients, and is '\
46
+ 'available when you enable stubbing in the constructor with `stub_responses: true`'
47
47
  raise NotImplementedError.new(msg)
48
48
  end
49
49
  end
@@ -175,8 +175,8 @@ module Aws
175
175
  if config.stub_responses
176
176
  apply_stubs(operation_name, stubs.flatten)
177
177
  else
178
- msg = 'stubbing is not enabled; enable stubbing in the constructor '
179
- msg << 'with `:stub_responses => true`'
178
+ msg = 'stubbing is not enabled; enable stubbing in the constructor '\
179
+ 'with `:stub_responses => true`'
180
180
  raise msg
181
181
  end
182
182
  end
@@ -198,8 +198,8 @@ module Aws
198
198
  @api_requests
199
199
  end
200
200
  else
201
- msg = 'This method is only implemented for stubbed clients, and is '
202
- msg << 'available when you enable stubbing in the constructor with `stub_responses: true`'
201
+ msg = 'This method is only implemented for stubbed clients, and is '\
202
+ 'available when you enable stubbing in the constructor with `stub_responses: true`'
203
203
  raise NotImplementedError.new(msg)
204
204
  end
205
205
  end
@@ -48,14 +48,12 @@ module Aws
48
48
  def deprecated(method, options = {})
49
49
 
50
50
  deprecation_msg = options[:message] || begin
51
- msg = "#################### DEPRECATION WARNING ####################\n"
52
- msg << "Called deprecated method `#{method}` of #{self}."
53
- msg << " Use `#{options[:use]}` instead.\n" if options[:use]
54
- if options[:version]
55
- msg << "Method `#{method}` will be removed in #{options[:version]}."
56
- end
57
- msg << "\n#############################################################"
58
- msg
51
+ "#################### DEPRECATION WARNING ####################\n"\
52
+ "Called deprecated method `#{method}` of #{self}."\
53
+ "#{" Use `#{options[:use]}` instead.\n" if options[:use]}"\
54
+ "#{"Method `#{method}` will be removed in #{options[:version]}."\
55
+ if options[:version]}"\
56
+ "\n#############################################################"
59
57
  end
60
58
 
61
59
  alias_method(:"deprecated_#{method}", method)
@@ -52,7 +52,7 @@ module Aws
52
52
  # EcsCredentialsProvider fails to parse the metadata response after retries
53
53
  class MetadataParserError < RuntimeError
54
54
  def initialize(*args)
55
- msg = "Failed to parse metadata service response."
55
+ msg = 'Failed to parse metadata service response.'
56
56
  super(msg)
57
57
  end
58
58
  end
@@ -71,7 +71,7 @@ module Aws
71
71
  class EndpointDiscoveryError < RuntimeError
72
72
  def initialize(*args)
73
73
  msg = 'Endpoint discovery failed for the operation or discovered endpoint is not working, '\
74
- 'request will keep failing until endpoint discovery succeeds or :endpoint option is provided.'
74
+ 'request will keep failing until endpoint discovery succeeds or :endpoint option is provided.'
75
75
  super(msg)
76
76
  end
77
77
  end
@@ -83,8 +83,8 @@ module Aws
83
83
 
84
84
  def initialize(name)
85
85
  msg = "Missing required parameter #{name} to construct"\
86
- " endpoint host prefix. You can disable host prefix by"\
87
- " setting :disable_host_prefix_injection to `true`."
86
+ ' endpoint host prefix. You can disable host prefix by'\
87
+ ' setting :disable_host_prefix_injection to `true`.'
88
88
  super(msg)
89
89
  end
90
90
 
@@ -195,8 +195,8 @@ module Aws
195
195
  class MissingWebIdentityTokenFile < RuntimeError
196
196
  def initialize(*args)
197
197
  msg = 'Missing :web_identity_token_file parameter or'\
198
- ' invalid file path provided for'\
199
- ' Aws::AssumeRoleWebIdentityCredentials provider'
198
+ ' invalid file path provided for'\
199
+ ' Aws::AssumeRoleWebIdentityCredentials provider'
200
200
  super(msg)
201
201
  end
202
202
  end
@@ -208,8 +208,8 @@ module Aws
208
208
  # Raised when a client is constructed and region is not specified.
209
209
  class MissingRegionError < ArgumentError
210
210
  def initialize(*args)
211
- msg = "missing region; use :region option or "
212
- msg << "export region name to ENV['AWS_REGION']"
211
+ msg = 'missing region; use :region option or '\
212
+ "export region name to ENV['AWS_REGION']"
213
213
  super(msg)
214
214
  end
215
215
  end
@@ -289,7 +289,7 @@ Known AWS regions include (not specific to this service):
289
289
  module DynamicErrors
290
290
 
291
291
  def self.extended(submodule)
292
- submodule.instance_variable_set("@const_set_mutex", Mutex.new)
292
+ submodule.instance_variable_set('@const_set_mutex', Mutex.new)
293
293
  submodule.const_set(:ServiceError, Class.new(ServiceError))
294
294
  end
295
295
 
@@ -152,7 +152,7 @@ module Aws
152
152
  def correct_type?(ref, value, errors, context)
153
153
  if ref.eventstream && @input
154
154
  errors << "instead of providing value directly for eventstreams at input,"\
155
- " expected to use #signal events per stream"
155
+ " expected to use #signal events per stream"
156
156
  return false
157
157
  end
158
158
  case value
@@ -167,8 +167,8 @@ a clock skew correction and retry requests with skewed client clocks.
167
167
  # Raise if provided value is not one of the retry modes
168
168
  if value != 'legacy' && value != 'standard' && value != 'adaptive'
169
169
  raise ArgumentError,
170
- 'Must provide either `legacy`, `standard`, or `adaptive` for '\
171
- 'retry_mode profile option or for ENV[\'AWS_RETRY_MODE\']'
170
+ 'Must provide either `legacy`, `standard`, or `adaptive` for '\
171
+ 'retry_mode profile option or for ENV[\'AWS_RETRY_MODE\']'
172
172
  end
173
173
  value
174
174
  end
@@ -180,8 +180,8 @@ a clock skew correction and retry requests with skewed client clocks.
180
180
  # Raise if provided value is not a positive integer
181
181
  if !value.is_a?(Integer) || value <= 0
182
182
  raise ArgumentError,
183
- 'Must provide a positive integer for max_attempts profile '\
184
- 'option or for ENV[\'AWS_MAX_ATTEMPTS\']'
183
+ 'Must provide a positive integer for max_attempts profile '\
184
+ 'option or for ENV[\'AWS_MAX_ATTEMPTS\']'
185
185
  end
186
186
  value
187
187
  end
@@ -194,9 +194,9 @@ a clock skew correction and retry requests with skewed client clocks.
194
194
  # Raise if provided value is not true or false
195
195
  if value != 'true' && value != 'false'
196
196
  raise ArgumentError,
197
- 'Must provide either `true` or `false` for '\
198
- 'adaptive_retry_wait_to_fill profile option or for '\
199
- 'ENV[\'AWS_ADAPTIVE_RETRY_WAIT_TO_FILL\']'
197
+ 'Must provide either `true` or `false` for '\
198
+ 'adaptive_retry_wait_to_fill profile option or for '\
199
+ 'ENV[\'AWS_ADAPTIVE_RETRY_WAIT_TO_FILL\']'
200
200
  end
201
201
 
202
202
  value == 'true'
@@ -210,9 +210,9 @@ a clock skew correction and retry requests with skewed client clocks.
210
210
  # Raise if provided value is not true or false
211
211
  if value != 'true' && value != 'false'
212
212
  raise ArgumentError,
213
- 'Must provide either `true` or `false` for '\
214
- 'correct_clock_skew profile option or for '\
215
- 'ENV[\'AWS_CORRECT_CLOCK_SKEW\']'
213
+ 'Must provide either `true` or `false` for '\
214
+ 'correct_clock_skew profile option or for '\
215
+ 'ENV[\'AWS_CORRECT_CLOCK_SKEW\']'
216
216
  end
217
217
 
218
218
  value == 'true'
@@ -50,8 +50,8 @@ module Aws
50
50
  if StringShape === shape_ref.shape.member.shape
51
51
  list_of_strings(shape_ref.location_name, param_value)
52
52
  else
53
- msg = "Only list of strings supported, got "
54
- msg << shape_ref.shape.member.shape.class.name
53
+ msg = "Only list of strings supported, got "\
54
+ "#{shape_ref.shape.member.shape.class.name}"
55
55
  raise NotImplementedError, msg
56
56
  end
57
57
  else
@@ -184,9 +184,9 @@ module Aws
184
184
  credential_source ||= prof_cfg['credential_source']
185
185
  if opts[:source_profile] && credential_source
186
186
  raise Errors::CredentialSourceConflictError,
187
- "Profile #{profile} has a source_profile, and "\
188
- 'a credential_source. For assume role credentials, must '\
189
- 'provide only source_profile or credential_source, not both.'
187
+ "Profile #{profile} has a source_profile, and "\
188
+ 'a credential_source. For assume role credentials, must '\
189
+ 'provide only source_profile or credential_source, not both.'
190
190
  elsif opts[:source_profile]
191
191
  opts[:credentials] = resolve_source_profile(opts[:source_profile], opts)
192
192
  if opts[:credentials]
@@ -199,8 +199,9 @@ module Aws
199
199
  opts[:profile] = opts.delete(:source_profile)
200
200
  AssumeRoleCredentials.new(opts)
201
201
  else
202
- raise Errors::NoSourceProfileError, "Profile #{profile} has a role_arn, and source_profile, but the"\
203
- ' source_profile does not have credentials.'
202
+ raise Errors::NoSourceProfileError,
203
+ "Profile #{profile} has a role_arn, and source_profile, but the"\
204
+ ' source_profile does not have credentials.'
204
205
  end
205
206
  elsif credential_source
206
207
  opts[:credentials] = credentials_from_source(
@@ -217,8 +218,9 @@ module Aws
217
218
  opts.delete(:source_profile) # Cleanup
218
219
  AssumeRoleCredentials.new(opts)
219
220
  else
220
- raise Errors::NoSourceCredentials, "Profile #{profile} could not get source credentials from"\
221
- " provider #{credential_source}"
221
+ raise Errors::NoSourceCredentials,
222
+ "Profile #{profile} could not get source credentials from"\
223
+ " provider #{credential_source}"
222
224
  end
223
225
  elsif prof_cfg['role_arn']
224
226
  raise Errors::NoSourceProfileError, "Profile #{profile} has a role_arn, but no source_profile."
@@ -306,8 +308,8 @@ module Aws
306
308
  def validate_profile_exists(profile)
307
309
  unless (@parsed_credentials && @parsed_credentials[profile]) ||
308
310
  (@parsed_config && @parsed_config[profile])
309
- msg = "Profile `#{profile}' not found in #{@credentials_path}"
310
- msg << " or #{@config_path}" if @config_path
311
+ msg = "Profile `#{profile}' not found in #{@credentials_path}"\
312
+ "#{" or #{@config_path}" if @config_path}"
311
313
  raise Errors::NoSuchProfileError, msg
312
314
  end
313
315
  end
@@ -23,9 +23,9 @@ module Aws
23
23
  xml = []
24
24
  builder = Aws::Xml::DocBuilder.new(target: xml, indent: ' ')
25
25
  builder.node(operation.name + 'Response', xmlns: xmlns(api)) do
26
- if rules = operation.output
26
+ if (rules = operation.output)
27
27
  rules.location_name = operation.name + 'Result'
28
- Xml::Builder.new(rules, target:xml, pad:' ').to_xml(data)
28
+ Xml::Builder.new(rules, target: xml, pad:' ').to_xml(data)
29
29
  end
30
30
  builder.node('ResponseMetadata') do
31
31
  builder.node('RequestId', 'stubbed-request-id')
@@ -94,9 +94,9 @@ module Aws
94
94
  # Pending
95
95
  raise 'Stubbing :exception event is not supported'
96
96
  end
97
- stream << Aws::EventStream::Encoder.new.encode(
98
- Aws::EventStream::Message.new(opts))
99
- stream
97
+ [stream, Aws::EventStream::Encoder.new.encode(
98
+ Aws::EventStream::Message.new(opts)
99
+ )].pack('a*a*')
100
100
  end
101
101
  end
102
102
 
@@ -11,7 +11,7 @@ module Aws
11
11
  @xml = options[:target] || []
12
12
  indent = options[:indent] || ' '
13
13
  pad = options[:pad] || ''
14
- @builder = DocBuilder.new(target:@xml, indent:indent, pad:pad)
14
+ @builder = DocBuilder.new(target: @xml, indent: indent, pad: pad)
15
15
  end
16
16
 
17
17
  def to_xml(params)
@@ -6,7 +6,11 @@ module Aws
6
6
  # @option options [String] :pad ('')
7
7
  # @option options [String] :indent ('')
8
8
  def initialize(options = {})
9
- @target = options[:target] || ''
9
+ @target = options[:target] || (
10
+ # The String has to be mutable
11
+ # because @target implements `<<` method.
12
+ String.new
13
+ )
10
14
  @indent = options[:indent] || ''
11
15
  @pad = options[:pad] || ''
12
16
  @end_of_line = @indent == '' ? '' : "\n"
@@ -32,7 +36,7 @@ module Aws
32
36
  if block_given?
33
37
  @target << open_el(name, attrs)
34
38
  @target << @end_of_line
35
- increase_pad { yield }
39
+ increase_pad(&block)
36
40
  @target << @pad
37
41
  @target << close_el(name)
38
42
  elsif args.empty?
@@ -77,7 +81,7 @@ module Aws
77
81
  def increase_pad(&block)
78
82
  pre_increase = @pad
79
83
  @pad = @pad + @indent
80
- yield
84
+ block.call
81
85
  @pad = pre_increase
82
86
  end
83
87
 
@@ -6,7 +6,7 @@ module Aws
6
6
 
7
7
  def call(context)
8
8
  @handler.call(context).on(300..599) do |response|
9
- response.error = error(context)
9
+ response.error = error(context) unless response.error
10
10
  response.data = nil
11
11
  end
12
12
  end
@@ -15,7 +15,8 @@ module Aws
15
15
 
16
16
  def parse(xml)
17
17
  begin
18
- source = REXML::Source.new(xml)
18
+ mutable_xml = xml.dup # REXML only accepts mutable string
19
+ source = REXML::Source.new(mutable_xml)
19
20
  REXML::Parsers::StreamParser.new(source, self).parse
20
21
  rescue REXML::ParseException => error
21
22
  @stack.error(error.message)
@@ -43,6 +43,6 @@ require_relative 'aws-sdk-sts/customizations'
43
43
  # @service
44
44
  module Aws::STS
45
45
 
46
- GEM_VERSION = '3.94.0'
46
+ GEM_VERSION = '3.94.1'
47
47
 
48
48
  end
@@ -2185,7 +2185,7 @@ module Aws::STS
2185
2185
  params: params,
2186
2186
  config: config)
2187
2187
  context[:gem_name] = 'aws-sdk-core'
2188
- context[:gem_version] = '3.94.0'
2188
+ context[:gem_version] = '3.94.1'
2189
2189
  Seahorse::Client::Request.new(handlers, context)
2190
2190
  end
2191
2191
 
@@ -76,7 +76,7 @@ module Seahorse
76
76
  tcp, addr = _tcp_socket(endpoint)
77
77
  debug_output("opening connection to #{endpoint.host}:#{endpoint.port} ...")
78
78
  _nonblocking_connect(tcp, addr)
79
- debug_output("opened")
79
+ debug_output('opened')
80
80
 
81
81
  @socket = OpenSSL::SSL::SSLSocket.new(tcp, _tls_context)
82
82
  @socket.sync_close = true
@@ -84,12 +84,12 @@ module Seahorse
84
84
 
85
85
  debug_output("starting TLS for #{endpoint.host}:#{endpoint.port} ...")
86
86
  @socket.connect
87
- debug_output("TLS established")
87
+ debug_output('TLS established')
88
88
  _register_h2_callbacks
89
89
  @status = :active
90
90
  elsif @status == :closed
91
- msg = "Async Client HTTP2 Connection is closed, you may"\
92
- " use #new_connection to create a new HTTP2 Connection for this client"
91
+ msg = 'Async Client HTTP2 Connection is closed, you may'\
92
+ ' use #new_connection to create a new HTTP2 Connection for this client'
93
93
  raise Http2ConnectionClosedError.new(msg)
94
94
  end
95
95
  }
@@ -106,7 +106,7 @@ module Seahorse
106
106
  rescue IO::WaitReadable
107
107
  begin
108
108
  unless IO.select([@socket], nil, nil, connection_read_timeout)
109
- self.debug_output("socket connection read time out")
109
+ self.debug_output('socket connection read time out')
110
110
  self.close!
111
111
  else
112
112
  # available, retry to start reading
@@ -132,7 +132,7 @@ module Seahorse
132
132
 
133
133
  def close!
134
134
  @mutex.synchronize {
135
- self.debug_output("closing connection ...")
135
+ self.debug_output('closing connection ...')
136
136
  if @socket
137
137
  @socket.close
138
138
  @socket = nil
@@ -151,10 +151,10 @@ module Seahorse
151
151
 
152
152
  def debug_output(msg, type = nil)
153
153
  prefix = case type
154
- when :send then "-> "
155
- when :receive then "<- "
154
+ when :send then '-> '
155
+ when :receive then '<- '
156
156
  else
157
- ""
157
+ ''
158
158
  end
159
159
  return unless @logger
160
160
  _debug_entry(prefix + msg)
@@ -170,8 +170,8 @@ module Seahorse
170
170
  def _register_h2_callbacks
171
171
  @h2_client.on(:frame) do |bytes|
172
172
  if @socket.nil?
173
- msg = "Connection is closed due to errors, "\
174
- "you can find errors at async_client.connection.errors"
173
+ msg = 'Connection is closed due to errors, '\
174
+ 'you can find errors at async_client.connection.errors'
175
175
  raise Http2ConnectionClosedError.new(msg)
176
176
  else
177
177
  @socket.print(bytes)
@@ -223,7 +223,7 @@ module Seahorse
223
223
  ssl_ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
224
224
  end
225
225
  if enable_alpn
226
- debug_output("enabling ALPN for TLS ...")
226
+ debug_output('enabling ALPN for TLS ...')
227
227
  ssl_ctx.alpn_protocols = ['h2']
228
228
  end
229
229
  ssl_ctx
@@ -86,8 +86,8 @@ module Seahorse
86
86
  if STEPS.key?(step)
87
87
  @step = step
88
88
  else
89
- msg = "invalid :step `%s', must be one of :initialize, :validate, "
90
- msg << ":build, :sign or :send"
89
+ msg = "invalid :step `%s', must be one of :initialize, :validate, "\
90
+ ':build, :sign or :send'
91
91
  raise ArgumentError, msg % step.inspect
92
92
  end
93
93
  end
@@ -34,8 +34,8 @@ module Seahorse
34
34
  if endpoint.nil? or URI::HTTP === endpoint or URI::HTTPS === endpoint
35
35
  @endpoint = endpoint
36
36
  else
37
- msg = "invalid endpoint, expected URI::HTTP, URI::HTTPS, or nil, "
38
- msg << "got #{endpoint.inspect}"
37
+ msg = 'invalid endpoint, expected URI::HTTP, URI::HTTPS, or nil, '\
38
+ "got #{endpoint.inspect}"
39
39
  raise ArgumentError, msg
40
40
  end
41
41
  end
@@ -55,7 +55,7 @@ module Seahorse
55
55
 
56
56
  # @param [#read, #size, #rewind] io
57
57
  def body=(io)
58
- @body =case io
58
+ @body = case io
59
59
  when nil then StringIO.new('')
60
60
  when String then StringIO.new(io)
61
61
  else io
@@ -109,8 +109,8 @@ module Seahorse
109
109
  @done = true
110
110
  emit(:done)
111
111
  else
112
- msg = "options must be empty or must contain :status_code, :headers, "
113
- msg << "and :body"
112
+ msg = 'options must be empty or must contain :status_code, :headers, '\
113
+ 'and :body'
114
114
  raise ArgumentError, msg
115
115
  end
116
116
  end
@@ -13,8 +13,8 @@ module Seahorse
13
13
  # @api private
14
14
  class TruncatedBodyError < IOError
15
15
  def initialize(bytes_expected, bytes_received)
16
- msg = "http response body truncated, expected #{bytes_expected} "
17
- msg << "bytes, received #{bytes_received} bytes"
16
+ msg = "http response body truncated, expected #{bytes_expected} "\
17
+ "bytes, received #{bytes_received} bytes"
18
18
  super(msg)
19
19
  end
20
20
  end
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.94.0
4
+ version: 3.94.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: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath