aws-sdk-resources 2.2.17 → 2.2.18
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: a2b0c9d403800e2881f1458b000a0dcf9cb2f7d5
|
4
|
+
data.tar.gz: 304c297f7371407c4b33d29fa576f244861860bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8312bf9c47d49cc61c5b85710bf3d97e690873372aef2eeb76a232c31b0cd104bfc1aaba1813ce693a9d72fc9d95d41e4db04ad328fff5b6ee931a93e6f96885
|
7
|
+
data.tar.gz: 0635adafeaf67b59b10cdface630b26428f380a564c9bda682013e13357140863f2bd9a471f89a53cdb0d119455d3e8e45499b82381ba5414e4cdb3049a28dc3
|
@@ -290,6 +290,13 @@ module Aws
|
|
290
290
|
})
|
291
291
|
end
|
292
292
|
|
293
|
+
def string_builder_source(definition)
|
294
|
+
BuilderSources::ResponsePath.new({
|
295
|
+
source: underscore(definition['value']),
|
296
|
+
target: underscore(definition['target']),
|
297
|
+
})
|
298
|
+
end
|
299
|
+
|
293
300
|
def svc_definition
|
294
301
|
@source['service'] || {}
|
295
302
|
end
|
@@ -124,8 +124,13 @@ module Aws
|
|
124
124
|
private
|
125
125
|
|
126
126
|
def all_batches(options, &block)
|
127
|
-
@request.call(options)
|
128
|
-
|
127
|
+
resp = @request.call(options)
|
128
|
+
if resp.respond_to?(:each)
|
129
|
+
resp.each do |response|
|
130
|
+
yield(@builder.build(options.merge(response:response)))
|
131
|
+
end
|
132
|
+
else
|
133
|
+
yield(@builder.build(options.merge(response:resp)))
|
129
134
|
end
|
130
135
|
end
|
131
136
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
require 'thread'
|
3
|
+
require 'set'
|
3
4
|
|
4
5
|
module Aws
|
5
6
|
module S3
|
@@ -14,6 +15,14 @@ module Aws
|
|
14
15
|
|
15
16
|
THREAD_COUNT = 10
|
16
17
|
|
18
|
+
# @api private
|
19
|
+
CREATE_OPTIONS =
|
20
|
+
Set.new(Client.api.operation(:upload_part).input.shape.member_names)
|
21
|
+
|
22
|
+
# @api private
|
23
|
+
UPLOAD_PART_OPTIONS =
|
24
|
+
Set.new(Client.api.operation(:upload_part).input.shape.member_names)
|
25
|
+
|
17
26
|
# @option options [Client] :client
|
18
27
|
def initialize(options = {})
|
19
28
|
@client = options[:client] || Client.new
|
@@ -40,7 +49,7 @@ module Aws
|
|
40
49
|
private
|
41
50
|
|
42
51
|
def initiate_upload(options)
|
43
|
-
@client.create_multipart_upload(options).upload_id
|
52
|
+
@client.create_multipart_upload(create_opts(options)).upload_id
|
44
53
|
end
|
45
54
|
|
46
55
|
def complete_upload(upload_id, parts, options)
|
@@ -84,9 +93,7 @@ module Aws
|
|
84
93
|
part_number = 1
|
85
94
|
parts = []
|
86
95
|
while offset < size
|
87
|
-
parts << {
|
88
|
-
bucket: options[:bucket],
|
89
|
-
key: options[:key],
|
96
|
+
parts << upload_part_opts(options).merge({
|
90
97
|
upload_id: upload_id,
|
91
98
|
part_number: part_number,
|
92
99
|
body: FilePart.new(
|
@@ -94,13 +101,27 @@ module Aws
|
|
94
101
|
offset: offset,
|
95
102
|
size: part_size(size, default_part_size, offset)
|
96
103
|
)
|
97
|
-
}
|
104
|
+
})
|
98
105
|
part_number += 1
|
99
106
|
offset += default_part_size
|
100
107
|
end
|
101
108
|
parts
|
102
109
|
end
|
103
110
|
|
111
|
+
def create_opts(options)
|
112
|
+
CREATE_OPTIONS.inject({}) do |hash, key|
|
113
|
+
hash[key] = options[key] if options.key?(key)
|
114
|
+
hash
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def upload_part_opts(options)
|
119
|
+
UPLOAD_PART_OPTIONS.inject({}) do |hash, key|
|
120
|
+
hash[key] = options[key] if options.key?(key)
|
121
|
+
hash
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
104
125
|
def upload_in_threads(pending, completed)
|
105
126
|
threads = []
|
106
127
|
@thread_count.times do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.18
|
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: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.2.
|
19
|
+
version: 2.2.18
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.2.
|
26
|
+
version: 2.2.18
|
27
27
|
description: Provides resource oriented interfaces and other higher-level abstractions
|
28
28
|
for many AWS services. This gem is part of the official AWS SDK for Ruby.
|
29
29
|
email:
|