aws-sdk-core 2.1.32 → 2.1.33
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5adf42a865787934c92e8025c5e5d9eb636aeb62
|
4
|
+
data.tar.gz: f3aaa5c3f13a33244c02d7ee3c1c55b6feb4a288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5bbe6f43535e4a9d9e1f44331c592b5c2f749bdd5505e3b363ae904bd27589a6bb4f90c4b28468fa378ca3c41d891a3c1113fbecb2dbdcdb4b1666a2a043f01
|
7
|
+
data.tar.gz: d348415f6b9dc0ec8fedb7a965b5e2481d5026718ca08aaf77b0d02011c14bf88e7b7efafd3fc113498a6eb8786fdaa2f8ca8529ef18090ad7f68461e295ca3e
|
@@ -3307,8 +3307,16 @@
|
|
3307
3307
|
"location":"uri",
|
3308
3308
|
"locationName":"resource_id"
|
3309
3309
|
},
|
3310
|
-
"httpMethod":{
|
3310
|
+
"httpMethod":{
|
3311
|
+
"shape":"String",
|
3312
|
+
"location":"uri",
|
3313
|
+
"locationName":"http_method"
|
3314
|
+
},
|
3311
3315
|
"type":{"shape":"IntegrationType"},
|
3316
|
+
"integrationHttpMethod":{
|
3317
|
+
"shape":"String",
|
3318
|
+
"locationName":"httpMethod"
|
3319
|
+
},
|
3312
3320
|
"uri":{"shape":"String"},
|
3313
3321
|
"credentials":{"shape":"String"},
|
3314
3322
|
"requestParameters":{"shape":"MapOfStringToString"},
|
@@ -15,12 +15,25 @@ module Aws
|
|
15
15
|
|
16
16
|
def initialize(rules)
|
17
17
|
@rules = rules
|
18
|
+
@opened_files = []
|
18
19
|
end
|
19
20
|
|
21
|
+
# @api private
|
22
|
+
attr_reader :opened_files
|
23
|
+
|
20
24
|
# @param [Hash] params
|
21
25
|
# @return [Hash]
|
22
26
|
def convert(params)
|
23
|
-
|
27
|
+
if @rules
|
28
|
+
structure(@rules, params)
|
29
|
+
else
|
30
|
+
params
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def close_opened_files
|
35
|
+
@opened_files.each(&:close)
|
36
|
+
@opened_files = []
|
24
37
|
end
|
25
38
|
|
26
39
|
private
|
@@ -69,7 +82,7 @@ module Aws
|
|
69
82
|
end
|
70
83
|
|
71
84
|
def c(ref, value)
|
72
|
-
self.class.c(ref.shape.class, value)
|
85
|
+
self.class.c(ref.shape.class, value, self)
|
73
86
|
end
|
74
87
|
|
75
88
|
class << self
|
@@ -97,18 +110,20 @@ module Aws
|
|
97
110
|
@converters[shape_class][value_class] = converter || block
|
98
111
|
end
|
99
112
|
|
100
|
-
def ensure_open(file)
|
113
|
+
def ensure_open(file, converter)
|
101
114
|
if file.closed?
|
102
|
-
File.open(file.path, 'rb')
|
115
|
+
new_file = File.open(file.path, 'rb')
|
116
|
+
converter.opened_files << new_file
|
117
|
+
new_file
|
103
118
|
else
|
104
119
|
file
|
105
120
|
end
|
106
121
|
end
|
107
122
|
|
108
123
|
# @api private
|
109
|
-
def c(shape, value)
|
124
|
+
def c(shape, value, instance = nil)
|
110
125
|
if converter = converter_for(shape, value)
|
111
|
-
converter.call(value)
|
126
|
+
converter.call(value, instance)
|
112
127
|
else
|
113
128
|
value
|
114
129
|
end
|
@@ -203,8 +218,8 @@ module Aws
|
|
203
218
|
end
|
204
219
|
|
205
220
|
add(BlobShape, IO)
|
206
|
-
add(BlobShape, File) { |file| ensure_open(file) }
|
207
|
-
add(BlobShape, Tempfile) { |tmpfile| ensure_open(tmpfile) }
|
221
|
+
add(BlobShape, File) { |file, converter| ensure_open(file, converter) }
|
222
|
+
add(BlobShape, Tempfile) { |tmpfile, converter| ensure_open(tmpfile, converter) }
|
208
223
|
add(BlobShape, StringIO)
|
209
224
|
add(BlobShape, String)
|
210
225
|
|
@@ -15,10 +15,11 @@ module Aws
|
|
15
15
|
class Handler < Seahorse::Client::Handler
|
16
16
|
|
17
17
|
def call(context)
|
18
|
-
|
19
|
-
|
18
|
+
converter = Aws::ParamConverter.new(context.operation.input)
|
19
|
+
context.params = converter.convert(context.params)
|
20
|
+
@handler.call(context).on_complete do |resp|
|
21
|
+
converter.close_opened_files
|
20
22
|
end
|
21
|
-
@handler.call(context)
|
22
23
|
end
|
23
24
|
|
24
25
|
end
|
data/lib/aws-sdk-core/version.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: 2.1.
|
4
|
+
version: 2.1.33
|
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: 2015-10-
|
11
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|
@@ -423,7 +423,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
423
423
|
version: '0'
|
424
424
|
requirements: []
|
425
425
|
rubyforge_project:
|
426
|
-
rubygems_version: 2.4.
|
426
|
+
rubygems_version: 2.4.6
|
427
427
|
signing_key:
|
428
428
|
specification_version: 4
|
429
429
|
summary: AWS SDK for Ruby - Core
|