aws-sdk-core 3.118.0 → 3.121.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f880e91159fbbd13553271c925b06c11172de5ffda9f8931ae4ee66b09160100
4
- data.tar.gz: 47f884e80449f6bffacc2babc3f96ba2248694aaab27da5bdbbaf895f29a0ec5
3
+ metadata.gz: a82b70794aaf41f104d61eafcc8da90d7a674e22d9eb1f1593683e0c7fcad52d
4
+ data.tar.gz: 96c89c685310d6afc526646bde8a4fcc6f08fc84b822ae68b3990bf9cfa86e41
5
5
  SHA512:
6
- metadata.gz: d776a66ce68988249850ffb707f23cabc7097232042dcb4425bdb1dc027a445d6adeacfb496758340cf66865cf2e5597c6d3ae67b48d81814b24d1d40ecdc6d9
7
- data.tar.gz: afe710d79ca075dfa33da32ef42356f0ccc60362bb6b66d0aa76f5171141df24418288b48e3c12bb0fd40c8a650cee273177756a7993b4b44099f83f2b7c8253
6
+ metadata.gz: 3dadbe82e1aaebe95a26dc3cf1a8019d6e38d0634ce16abcfb3958127a18f2abb8ebb8583f134e949f3576789ef9e8eecbfabdd965bd04c06307f7b62ef93b7f
7
+ data.tar.gz: e25fdec19a36461f72186458b2452b4595e5b10439fbe3e5df2ecbaeae2184a2273d6e4f3d59b4a308c12697de7f1be2275326e4aa2a5e6fbebea121c22dc023
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.121.0 (2021-09-02)
5
+ ------------------
6
+
7
+ * Feature - Add support for S3 Multi-region access point configuration.
8
+
9
+ 3.120.0 (2021-09-01)
10
+ ------------------
11
+
12
+ * Feature - AWS SDK for Ruby no longer supports Ruby runtime versions 1.9, 2.0, 2.1, and 2.2.
13
+
14
+ 3.119.1 (2021-08-20)
15
+ ------------------
16
+
17
+ * Issue - Refactored `Aws::Json::Engine` to remove dead code and replaced usage of `JSON.load` with `JSON.parse`.
18
+
19
+ 3.119.0 (2021-07-30)
20
+ ------------------
21
+
22
+ * Feature - Support Document Types. Document types are used to carry open content. A document type value is serialized using the same format as its surroundings and requires no additional encoding or escaping.(#2523)
23
+
4
24
  3.118.0 (2021-07-28)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.118.0
1
+ 3.121.0
@@ -2,16 +2,18 @@
2
2
 
3
3
  module Aws
4
4
  module Json
5
- class JSONEngine
5
+ module JSONEngine
6
+ class << self
7
+ def load(json)
8
+ JSON.parse(json)
9
+ rescue JSON::ParserError => e
10
+ raise ParseError.new(e)
11
+ end
6
12
 
7
- def self.load(json)
8
- JSON.load(json)
13
+ def dump(value)
14
+ JSON.dump(value)
15
+ end
9
16
  end
10
-
11
- def self.dump(value)
12
- JSON.dump(value)
13
- end
14
-
15
17
  end
16
18
  end
17
19
  end
@@ -2,16 +2,43 @@
2
2
 
3
3
  module Aws
4
4
  module Json
5
- class OjEngine
5
+ module OjEngine
6
+ # @api private
7
+ LOAD_OPTIONS = { mode: :compat, symbol_keys: false, empty_string: false }.freeze
6
8
 
7
- def self.load(json)
8
- Oj.load(json)
9
- end
9
+ # @api private
10
+ DUMP_OPTIONS = { mode: :compat }.freeze
11
+
12
+ class << self
13
+ def load(json)
14
+ Oj.load(json, LOAD_OPTIONS)
15
+ rescue *PARSE_ERRORS => e
16
+ raise ParseError.new(e)
17
+ end
18
+
19
+ def dump(value)
20
+ Oj.dump(value, DUMP_OPTIONS)
21
+ end
22
+
23
+ private
24
+
25
+ # Oj before 1.4.0 does not define Oj::ParseError and instead raises
26
+ # SyntaxError on failure
27
+ def detect_oj_parse_errors
28
+ require 'oj'
10
29
 
11
- def self.dump(value)
12
- Oj.dump(value)
30
+ if Oj.const_defined?(:ParseError)
31
+ [Oj::ParseError, EncodingError, JSON::ParserError]
32
+ else
33
+ [SyntaxError]
34
+ end
35
+ rescue LoadError
36
+ nil
37
+ end
13
38
  end
14
39
 
40
+ # @api private
41
+ PARSE_ERRORS = detect_oj_parse_errors
15
42
  end
16
43
  end
17
44
  end
@@ -5,6 +5,8 @@ require_relative 'json/builder'
5
5
  require_relative 'json/error_handler'
6
6
  require_relative 'json/handler'
7
7
  require_relative 'json/parser'
8
+ require_relative 'json/json_engine'
9
+ require_relative 'json/oj_engine'
8
10
 
9
11
  module Aws
10
12
  # @api private
@@ -20,9 +22,7 @@ module Aws
20
22
 
21
23
  class << self
22
24
  def load(json)
23
- ENGINE.load(json, *ENGINE_LOAD_OPTIONS)
24
- rescue *ENGINE_ERRORS => e
25
- raise ParseError, e
25
+ ENGINE.load(json)
26
26
  end
27
27
 
28
28
  def load_file(path)
@@ -30,38 +30,20 @@ module Aws
30
30
  end
31
31
 
32
32
  def dump(value)
33
- ENGINE.dump(value, *ENGINE_DUMP_OPTIONS)
33
+ ENGINE.dump(value)
34
34
  end
35
35
 
36
36
  private
37
37
 
38
- def oj_engine
38
+ def select_engine
39
39
  require 'oj'
40
- [
41
- Oj,
42
- [{ mode: :compat, symbol_keys: false, empty_string: false }],
43
- [{ mode: :compat }],
44
- oj_parse_error
45
- ]
40
+ OjEngine
46
41
  rescue LoadError
47
- false
48
- end
49
-
50
- def json_engine
51
- [JSON, [], [], [JSON::ParserError]]
52
- end
53
-
54
- def oj_parse_error
55
- if Oj.const_defined?('ParseError')
56
- [Oj::ParseError, EncodingError, JSON::ParserError]
57
- else
58
- [SyntaxError]
59
- end
42
+ JSONEngine
60
43
  end
61
44
  end
62
45
 
63
46
  # @api private
64
- ENGINE, ENGINE_LOAD_OPTIONS, ENGINE_DUMP_OPTIONS, ENGINE_ERRORS =
65
- oj_engine || json_engine
47
+ ENGINE = select_engine
66
48
  end
67
49
  end
@@ -125,11 +125,32 @@ module Aws
125
125
  end
126
126
  end
127
127
 
128
+ def document(ref, value, errors, context)
129
+ document_types = [Hash, Array, Numeric, String, TrueClass, FalseClass, NilClass]
130
+ unless document_types.any? { |t| value.is_a?(t) }
131
+ errors << expected_got(context, "one of #{document_types.join(', ')}", value)
132
+ end
133
+
134
+ # recursively validate types for aggregated types
135
+ case value
136
+ when Hash
137
+ value.each do |k, v|
138
+ document(ref, v, errors, context + "[#{k}]")
139
+ end
140
+ when Array
141
+ value.each do |v|
142
+ document(ref, v, errors, context)
143
+ end
144
+ end
145
+
146
+ end
147
+
128
148
  def shape(ref, value, errors, context)
129
149
  case ref.shape
130
150
  when StructureShape then structure(ref, value, errors, context)
131
151
  when ListShape then list(ref, value, errors, context)
132
152
  when MapShape then map(ref, value, errors, context)
153
+ when DocumentShape then document(ref, value, errors, context)
133
154
  when StringShape
134
155
  unless value.is_a?(String)
135
156
  errors << expected_got(context, "a String", value)
@@ -175,7 +175,8 @@ module Aws
175
175
  :csm_port,
176
176
  :sts_regional_endpoints,
177
177
  :s3_use_arn_region,
178
- :s3_us_east_1_regional_endpoint
178
+ :s3_us_east_1_regional_endpoint,
179
+ :s3_disable_multiregion_access_points
179
180
  )
180
181
 
181
182
  private
@@ -1,16 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- use_system_rexml = ((RUBY_VERSION <=> "2.0.0") < 0)
4
- if use_system_rexml
5
- require "rbconfig"
6
- $LOAD_PATH.unshift(RbConfig::CONFIG["rubylibdir"])
7
- end
8
-
9
3
  require 'rexml/document'
10
4
  require 'rexml/streamlistener'
11
5
 
12
- $LOAD_PATH.shift if use_system_rexml
13
-
14
6
  module Aws
15
7
  module Xml
16
8
  class Parser
@@ -523,7 +523,7 @@ module Aws::SSO
523
523
  params: params,
524
524
  config: config)
525
525
  context[:gem_name] = 'aws-sdk-core'
526
- context[:gem_version] = '3.118.0'
526
+ context[:gem_version] = '3.121.0'
527
527
  Seahorse::Client::Request.new(handlers, context)
528
528
  end
529
529
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sso/customizations'
50
50
  # @!group service
51
51
  module Aws::SSO
52
52
 
53
- GEM_VERSION = '3.118.0'
53
+ GEM_VERSION = '3.121.0'
54
54
 
55
55
  end
@@ -2303,7 +2303,7 @@ module Aws::STS
2303
2303
  params: params,
2304
2304
  config: config)
2305
2305
  context[:gem_name] = 'aws-sdk-core'
2306
- context[:gem_version] = '3.118.0'
2306
+ context[:gem_version] = '3.121.0'
2307
2307
  Seahorse::Client::Request.new(handlers, context)
2308
2308
  end
2309
2309
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sts/customizations'
50
50
  # @!group service
51
51
  module Aws::STS
52
52
 
53
- GEM_VERSION = '3.118.0'
53
+ GEM_VERSION = '3.121.0'
54
54
 
55
55
  end
@@ -1,10 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if RUBY_VERSION >= '2.1'
4
- begin
5
- require 'http/2'
6
- rescue LoadError; end
7
- end
3
+ begin
4
+ require 'http/2'
5
+ rescue LoadError; end
8
6
  require 'openssl'
9
7
  require 'socket'
10
8
 
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if RUBY_VERSION >= '2.1'
4
- begin
5
- require 'http/2'
6
- rescue LoadError; end
7
- end
3
+ begin
4
+ require 'http/2'
5
+ rescue LoadError; end
6
+
8
7
  require 'securerandom'
9
8
 
10
9
  module Seahorse
@@ -12,96 +12,9 @@ module Seahorse
12
12
 
13
13
  def self.apply!
14
14
  return unless RUBY_VERSION < '2.5'
15
- if RUBY_VERSION >= '2.3'
16
- Net::HTTP::IDEMPOTENT_METHODS_.clear
17
- return
18
- end
19
- # no further patches needed for above versions
20
-
21
- if RUBY_VERSION >= '2.0'
22
- Net::HTTP.send(:include, Ruby_2)
23
- Net::HTTP::IDEMPOTENT_METHODS_.clear
24
- elsif RUBY_VERSION >= '1.9.3'
25
- Net::HTTP.send(:include, Ruby_1_9_3)
26
- end
27
- Net::HTTP.send(:alias_method, :old_transport_request, :transport_request)
28
- Net::HTTP.send(:alias_method, :transport_request, :new_transport_request)
15
+ Net::HTTP::IDEMPOTENT_METHODS_.clear
29
16
  end
30
17
 
31
- module Ruby_2
32
- def new_transport_request(req)
33
- count = 0
34
- begin
35
- begin_transport req
36
- res = catch(:response) {
37
- req.exec @socket, @curr_http_version, edit_path(req.path)
38
- begin
39
- res = Net::HTTPResponse.read_new(@socket)
40
- res.decode_content = req.decode_content
41
- end while res.kind_of?(Net::HTTPInformation)
42
-
43
- res.uri = req.uri
44
-
45
- res
46
- }
47
- res.reading_body(@socket, req.response_body_permitted?) {
48
- yield res if block_given?
49
- }
50
- rescue Net::OpenTimeout
51
- raise
52
- rescue Net::ReadTimeout, IOError, EOFError,
53
- Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
54
- # avoid a dependency on OpenSSL
55
- defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
56
- Timeout::Error => exception
57
- if count == 0 && Net::HTTP::IDEMPOTENT_METHODS_.include?(req.method)
58
- count += 1
59
- @socket.close if @socket and not @socket.closed?
60
- D "Conn close because of error #{exception}, and retry"
61
- if req.body_stream
62
- if req.body_stream.respond_to?(:rewind)
63
- req.body_stream.rewind
64
- else
65
- raise
66
- end
67
- end
68
- retry
69
- end
70
- D "Conn close because of error #{exception}"
71
- @socket.close if @socket and not @socket.closed?
72
- raise
73
- end
74
-
75
- end_transport req, res
76
- res
77
- rescue => exception
78
- D "Conn close because of error #{exception}"
79
- @socket.close if @socket and not @socket.closed?
80
- raise exception
81
- end
82
- end
83
-
84
- module Ruby_1_9_3
85
- def new_transport_request(req)
86
- begin_transport req
87
- res = catch(:response) {
88
- req.exec @socket, @curr_http_version, edit_path(req.path)
89
- begin
90
- res = Net::HTTPResponse.read_new(@socket)
91
- end while res.kind_of?(Net::HTTPContinue)
92
- res
93
- }
94
- res.reading_body(@socket, req.response_body_permitted?) {
95
- yield res if block_given?
96
- }
97
- end_transport req, res
98
- res
99
- rescue => exception
100
- D "Conn close because of error #{exception}"
101
- @socket.close if @socket and not @socket.closed?
102
- raise exception
103
- end
104
- end
105
18
  end
106
19
  end
107
20
  end
@@ -61,6 +61,9 @@ module Seahorse
61
61
  # @return [Boolean]
62
62
  attr_accessor :eventheader_type
63
63
 
64
+ # @return [Boolean]
65
+ attr_accessor :document
66
+
64
67
  # @return [String, nil]
65
68
  def location
66
69
  @location || (shape && shape[:location])
@@ -286,6 +289,8 @@ module Seahorse
286
289
 
287
290
  class TimestampShape < Shape; end
288
291
 
292
+ class DocumentShape < Shape; end
293
+
289
294
  end
290
295
  end
291
296
  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.118.0
4
+ version: 3.121.0
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: 2021-07-28 00:00:00.000000000 Z
11
+ date: 2021-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -300,7 +300,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
300
300
  requirements:
301
301
  - - ">="
302
302
  - !ruby/object:Gem::Version
303
- version: '0'
303
+ version: '2.3'
304
304
  required_rubygems_version: !ruby/object:Gem::Requirement
305
305
  requirements:
306
306
  - - ">="