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: 12bf893b8e6465748f51aeae43b877dfff36dd0d
4
- data.tar.gz: 83ba2b83f0649e59c1d8573cb72f49fe29ef4503
3
+ metadata.gz: 5adf42a865787934c92e8025c5e5d9eb636aeb62
4
+ data.tar.gz: f3aaa5c3f13a33244c02d7ee3c1c55b6feb4a288
5
5
  SHA512:
6
- metadata.gz: 26949f8f543a72ea7c60b78a8fd99f2847fd463493bedea13964e5d5ffeb7f0dfe570168d77b7467482d4edeb4d708283678e1169fa42bbe8306441658a77c2c
7
- data.tar.gz: d9cc59667af1e6c3623bd1564aa8749868688245e5a1ad26a4f123dfb100ea3783fd1ce9ddb2027ad8a90f6df5cafd6fba08ed3cf3f02c4f43a1842a07cfcb96
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":{"shape":"String"},
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
- structure(@rules, params)
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
- if input = context.operation.input
19
- context.params = Aws::ParamConverter.convert(input, context.params)
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
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.1.32'
2
+ VERSION = '2.1.33'
3
3
  end
@@ -124,7 +124,7 @@ module Seahorse
124
124
  @listeners[:data] << Proc.new
125
125
  end
126
126
 
127
- def on_done(status_code_range, &callback)
127
+ def on_done(status_code_range = nil, &callback)
128
128
  listener = listener(status_code_range, Proc.new)
129
129
  if @done
130
130
  listener.call
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.32
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-26 00:00:00.000000000 Z
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.5
426
+ rubygems_version: 2.4.6
427
427
  signing_key:
428
428
  specification_version: 4
429
429
  summary: AWS SDK for Ruby - Core