aws-sdk-resources 2.10.26 → 2.10.27

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: 464d6cf3188c12693c42aa6b5824917d04068c18
4
- data.tar.gz: dddec79282ee9d6c3fb0073eeaa94362de77fbac
3
+ metadata.gz: 6e6f6d04349053ca286293e7d565b0ed8433b38a
4
+ data.tar.gz: 5079dfb54473313e7930e19b7a66e9c478231df5
5
5
  SHA512:
6
- metadata.gz: fee0efd998c1a1da6bb709556142634163b33f3da5bfe891f0e0cea06d6368a13bebe01bb990eb7c67d1638193b54b0828cf7c994855ceb44bfa8d4606d15feb
7
- data.tar.gz: b751f9050153b1b42e878c499c10cc4423ce05bfb06b05a6d21755ea34a7dc1a3fe00532681230f9ec4ca3c1cffa92a9a0d16169335d7cbf45ebbd67f1d1280e
6
+ metadata.gz: c277285c5d61ac580926ef94de673d6653409c9e5f9988fde87a98d264d1e3b376b270ef8cc58fb7ad261564c65b3e5127a62a56ac2da81567ba156cdd0b354b
7
+ data.tar.gz: 36d925e49c0e256688b067f75238bb1a3911afcc0a3df74e247dfea93084a208e2c71356f045e12f3dc35de9bf4cb3699adec6dfdf904740b910524472440642
@@ -106,15 +106,8 @@ module Aws
106
106
  end
107
107
  end
108
108
 
109
- def clean_up_parts(parts)
110
- parts.each do |filename|
111
- File.unlink(filename) if File.exists?(filename)
112
- end
113
- end
114
-
115
- def file_batches(chunks, mode)
109
+ def file_batches(chunks, dir, mode)
116
110
  batches = []
117
- dir = Dir.tmpdir
118
111
  chunks = (1..chunks) if mode.eql? 'part_number'
119
112
  chunks.each_slice(@thread_count) do |slice|
120
113
  batches << map_files(slice, dir, mode)
@@ -140,7 +133,9 @@ module Aws
140
133
  end
141
134
 
142
135
  def thread_batches(chunks, param)
143
- batches = file_batches(chunks, param)
136
+ # create a tmp dir under destination dir for batches
137
+ dir = Dir.mktmpdir(nil, File.dirname(@path))
138
+ batches = file_batches(chunks, dir, param)
144
139
  parts = batches.flat_map(&:values)
145
140
  begin
146
141
  batches.each do |batch|
@@ -159,7 +154,8 @@ module Aws
159
154
  end
160
155
  concatenate_parts(parts)
161
156
  ensure
162
- clean_up_parts(parts)
157
+ # clean up tmp dir
158
+ FileUtils.remove_entry(dir)
163
159
  end
164
160
  end
165
161
 
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.10.26
4
+ version: 2.10.27
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: 2017-08-14 00:00:00.000000000 Z
11
+ date: 2017-08-15 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.10.26
19
+ version: 2.10.27
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.10.26
26
+ version: 2.10.27
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: