fog-aws 3.7.0 → 3.8.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: 9ac0628bad4edf849a2b1395bd829d18ae77bff352841e68fbc7ecdb475ef82b
4
- data.tar.gz: 5a545b7e8ad44c321273fac7b87b11b79be3a9af1c2d038b2790ea95c529df30
3
+ metadata.gz: b7361a3fa82cc86bf32908aa54819a2efb8485e6639cbe9cd62a0e3bedb8e422
4
+ data.tar.gz: d0b4dea28aecb3a18b887ce40437baa868f38ebd83fa69e13ecf912d0aba3df8
5
5
  SHA512:
6
- metadata.gz: 06156a44eec55618672a3d5beed5d35c0e7195ba07a3a515e944db462edbd6b4e56f6ff693bd5dd0013090c2083f395cf9f310013a164d3a3163c7ea82f96b9e
7
- data.tar.gz: ebf606599061ed26cf2f1995e91690aebb7b409b15fe1d6ee465ef3e36a87b9c714e376e9bf6fee9c276a45a994972d94a24ef49d27f92e8b64ee6a47a9ae082
6
+ metadata.gz: 9d7602d22a1abab86581a0b4500c00b545af1264e46fac5648d70d0a2fc9dd157ffa37bf289b87aaa08836aa12d7f2cd67ea4437e2732796c7e089811ca2b029
7
+ data.tar.gz: 9e90b2ae4aeeb8170630825f49fa2500f56b45bcaa38dade2b72b7019a1db5d93d9634645301aa0706f1df25e118d03fe5b9e6a11e2a9f47e78e82dd9790cb7d
@@ -29,6 +29,41 @@ matrix:
29
29
  gemfile: gemfiles/Gemfile-edge
30
30
  - rvm: jruby-head
31
31
  gemfile: Gemfile
32
+ # ppc64le specific changes
33
+ - rvm: 2.3.0
34
+ gemfile: Gemfile
35
+ arch: ppc64le
36
+ - rvm: 2.3.0
37
+ arch: ppc64le
38
+ gemfile: gemfiles/Gemfile-edge
39
+ - rvm: 2.4.0
40
+ arch: ppc64le
41
+ gemfile: Gemfile
42
+ - rvm: 2.4.0
43
+ arch: ppc64le
44
+ gemfile: gemfiles/Gemfile-edge
45
+ - rvm: 2.5.0
46
+ arch: ppc64le
47
+ gemfile: Gemfile
48
+ - rvm: 2.5.0
49
+ arch: ppc64le
50
+ gemfile: gemfiles/Gemfile-edge
51
+ - rvm: 2.6.6
52
+ arch: ppc64le
53
+ gemfile: Gemfile
54
+ - rvm: 2.6.6
55
+ arch: ppc64le
56
+ gemfile: gemfiles/Gemfile-edge
57
+ - rvm: 2.7.2
58
+ arch: ppc64le
59
+ gemfile: Gemfile
60
+ - rvm: 2.7.2
61
+ arch: ppc64le
62
+ gemfile: gemfiles/Gemfile-edge
63
+ - rvm: jruby-head
64
+ arch: ppc64le
65
+ gemfile: Gemfile
66
+
32
67
  allow_failures:
33
68
  - rvm: jruby-head
34
69
  gemfile: Gemfile
@@ -44,6 +79,28 @@ matrix:
44
79
  gemfile: gemfiles/Gemfile-edge
45
80
  - rvm: 2.7.2
46
81
  gemfile: gemfiles/Gemfile-edge
82
+ # ppc64le specific changes
83
+ - rvm: jruby-head
84
+ arch: ppc64le
85
+ gemfile: Gemfile
86
+ - rvm: 2.2.0
87
+ arch: ppc64le
88
+ gemfile: gemfiles/Gemfile-edge
89
+ - rvm: 2.3.0
90
+ arch: ppc64le
91
+ gemfile: gemfiles/Gemfile-edge
92
+ - rvm: 2.4.0
93
+ arch: ppc64le
94
+ gemfile: gemfiles/Gemfile-edge
95
+ - rvm: 2.5.0
96
+ arch: ppc64le
97
+ gemfile: gemfiles/Gemfile-edge
98
+ - rvm: 2.6.6
99
+ arch: ppc64le
100
+ gemfile: gemfiles/Gemfile-edge
101
+ - rvm: 2.7.2
102
+ arch: ppc64le
103
+ gemfile: gemfiles/Gemfile-edge
47
104
  notifications:
48
105
  email: false
49
106
  irc:
@@ -1,7 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## [v3.8.0](https://github.com/fog/fog-aws/tree/v3.8.0)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.7.0...v3.8.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - Getting Auth failure Exception for non enabled AWS regions in AWS account. [\#585](https://github.com/fog/fog-aws/issues/585)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Filter unknown UploadPartCopy paramaters [\#589](https://github.com/fog/fog-aws/pull/589) ([stanhu](https://github.com/stanhu))
14
+ - Fix NameError in multipart copy [\#588](https://github.com/fog/fog-aws/pull/588) ([stanhu](https://github.com/stanhu))
15
+ - Rewind pointer if file is eof on put\_object mock [\#587](https://github.com/fog/fog-aws/pull/587) ([ekulz](https://github.com/ekulz))
16
+ - Update .travis.yml [\#584](https://github.com/fog/fog-aws/pull/584) ([nageshlop](https://github.com/nageshlop))
17
+
3
18
  ## [v3.7.0](https://github.com/fog/fog-aws/tree/v3.7.0) (2020-12-01)
4
- [Full Changelog](https://github.com/fog/fog-aws/compare/v3.7.0...HEAD)
19
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.6.7...v3.7.0)
5
20
 
6
21
  **Closed issues:**
7
22
 
@@ -34,7 +49,6 @@
34
49
  **Merged pull requests:**
35
50
 
36
51
  - added missing region EU South \(Milan\) [\#570](https://github.com/fog/fog-aws/pull/570) ([saldan](https://github.com/saldan))
37
- - hibernation option to compute [\#569](https://github.com/fog/fog-aws/pull/569) ([taniahagan](https://github.com/taniahagan))
38
52
  - Fix VPC model is\_default requires [\#567](https://github.com/fog/fog-aws/pull/567) ([biinari](https://github.com/biinari))
39
53
 
40
54
  ## [v3.6.5](https://github.com/fog/fog-aws/tree/v3.6.5) (2020-05-22)
@@ -83,6 +97,7 @@
83
97
 
84
98
  **Merged pull requests:**
85
99
 
100
+ - hibernation option to compute [\#569](https://github.com/fog/fog-aws/pull/569) ([taniahagan](https://github.com/taniahagan))
86
101
  - Adding two missing regions to Fog::AWS.regions [\#552](https://github.com/fog/fog-aws/pull/552) ([lvangool](https://github.com/lvangool))
87
102
  - Adds missing param WebIdentityToken for the request to the AWS api [\#550](https://github.com/fog/fog-aws/pull/550) ([dgoradia](https://github.com/dgoradia))
88
103
  - Fixes type in class name for STS assume\_role\_with\_web\_identity parser [\#549](https://github.com/fog/fog-aws/pull/549) ([dgoradia](https://github.com/dgoradia))
@@ -363,6 +378,7 @@
363
378
  - Fog mock accuracy, fixes \#341 [\#344](https://github.com/fog/fog-aws/pull/344) ([easkay](https://github.com/easkay))
364
379
  - Subnet [\#343](https://github.com/fog/fog-aws/pull/343) ([ehowe](https://github.com/ehowe))
365
380
  - Fix multipart upload [\#340](https://github.com/fog/fog-aws/pull/340) ([nobmurakita](https://github.com/nobmurakita))
381
+ - credential\_fetcher: Mark AWS metadata calls as idempotent [\#329](https://github.com/fog/fog-aws/pull/329) ([mtekel](https://github.com/mtekel))
366
382
 
367
383
  ## [v1.2.0](https://github.com/fog/fog-aws/tree/v1.2.0) (2017-01-20)
368
384
  [Full Changelog](https://github.com/fog/fog-aws/compare/v1.1.0...v1.2.0)
@@ -390,14 +406,13 @@
390
406
  - Canada and London regions [\#333](https://github.com/fog/fog-aws/pull/333) ([mattheworiordan](https://github.com/mattheworiordan))
391
407
  - Updated ELB Dual Stack hosted zone DNS records [\#332](https://github.com/fog/fog-aws/pull/332) ([mattheworiordan](https://github.com/mattheworiordan))
392
408
  - Added support for attaching auto scaling groups to target groups [\#330](https://github.com/fog/fog-aws/pull/330) ([maf23](https://github.com/maf23))
393
- - credential\_fetcher: Mark AWS metadata calls as idempotent [\#329](https://github.com/fog/fog-aws/pull/329) ([mtekel](https://github.com/mtekel))
409
+ - fix host header with another port on s3 [\#327](https://github.com/fog/fog-aws/pull/327) ([rodrigoapereira](https://github.com/rodrigoapereira))
394
410
 
395
411
  ## [v1.0.0](https://github.com/fog/fog-aws/tree/v1.0.0) (2016-12-12)
396
412
  [Full Changelog](https://github.com/fog/fog-aws/compare/v0.13.0...v1.0.0)
397
413
 
398
414
  **Merged pull requests:**
399
415
 
400
- - fix host header with another port on s3 [\#327](https://github.com/fog/fog-aws/pull/327) ([rodrigoapereira](https://github.com/rodrigoapereira))
401
416
  - Add new t2.xlarge, t2.2xlarge and r4 class instances. [\#326](https://github.com/fog/fog-aws/pull/326) ([rogersd](https://github.com/rogersd))
402
417
  - Fix the bug that can't create fifo queue in SQS. [\#323](https://github.com/fog/fog-aws/pull/323) ([ebihara99999](https://github.com/ebihara99999))
403
418
  - data pipeline mocks [\#318](https://github.com/fog/fog-aws/pull/318) ([ehowe](https://github.com/ehowe))
@@ -148,7 +148,8 @@ module Fog
148
148
  self.multipart_chunk_size = MIN_MULTIPART_CHUNK_SIZE * 2 if !multipart_chunk_size && self.content_length.to_i > MAX_SINGLE_PUT_SIZE
149
149
 
150
150
  if multipart_chunk_size && self.content_length.to_i >= multipart_chunk_size
151
- upload_part_options = options.merge({ 'x-amz-copy-source' => "#{directory.key}/#{key}" })
151
+ upload_part_options = options.select { |key, _| ALLOWED_UPLOAD_PART_OPTIONS.include?(key.to_sym) }
152
+ upload_part_options = upload_part_options.merge({ 'x-amz-copy-source' => "#{directory.key}/#{key}" })
152
153
  multipart_copy(options, upload_part_options, target_directory_key, target_file_key)
153
154
  else
154
155
  service.copy_object(directory.key, key, target_directory_key, target_file_key, options)
@@ -360,7 +361,7 @@ module Fog
360
361
  completed = PartList.new
361
362
  errors = upload_in_threads(target_directory_key, target_file_key, upload_id, pending, completed, thread_count)
362
363
 
363
- raise error.first if errors.any?
364
+ raise errors.first if errors.any?
364
365
 
365
366
  part_tags = completed.to_a.sort_by { |part| part.part_number }.map(&:etag)
366
367
  rescue => e
@@ -15,6 +15,7 @@ module Fog
15
15
  def parse_mock_data(data)
16
16
  data = Fog::Storage.parse_data(data)
17
17
  unless data[:body].is_a?(String)
18
+ data[:body].rewind if data[:body].eof?
18
19
  data[:body] = data[:body].read
19
20
  end
20
21
  data
@@ -1,6 +1,25 @@
1
1
  module Fog
2
2
  module AWS
3
3
  class Storage
4
+ # From https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
5
+ ALLOWED_UPLOAD_PART_OPTIONS = %i(
6
+ x-amz-copy-source
7
+ x-amz-copy-source-if-match
8
+ x-amz-copy-source-if-modified-since
9
+ x-amz-copy-source-if-none-match
10
+ x-amz-copy-source-if-unmodified-since
11
+ x-amz-copy-source-range
12
+ x-amz-copy-source-server-side-encryption-customer-algorithm
13
+ x-amz-copy-source-server-side-encryption-customer-key
14
+ x-amz-copy-source-server-side-encryption-customer-key-MD5
15
+ x-amz-expected-bucket-owner
16
+ x-amz-request-payer
17
+ x-amz-server-side-encryption-customer-algorithm
18
+ x-amz-server-side-encryption-customer-key
19
+ x-amz-server-side-encryption-customer-key-MD5
20
+ x-amz-source-expected-bucket-owner
21
+ ).freeze
22
+
4
23
  class Real
5
24
  require 'fog/aws/parsers/storage/upload_part_copy_object'
6
25
 
@@ -45,6 +64,8 @@ module Fog
45
64
  include Fog::AWS::Storage::SharedMockMethods
46
65
 
47
66
  def upload_part_copy(target_bucket_name, target_object_name, upload_id, part_number, options = {})
67
+ validate_options!(options)
68
+
48
69
  copy_source = options['x-amz-copy-source']
49
70
  copy_range = options['x-amz-copy-source-range']
50
71
 
@@ -86,6 +107,12 @@ module Fog
86
107
 
87
108
  [matches[1].to_i, end_pos]
88
109
  end
110
+
111
+ def validate_options!(options)
112
+ options.keys.each do |key|
113
+ raise "Invalid UploadPart option: #{key}" unless ::Fog::AWS::Storage::ALLOWED_UPLOAD_PART_OPTIONS.include?(key.to_sym)
114
+ end
115
+ end
89
116
  end # Mock
90
117
  end # Storage
91
118
  end # AWS
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.7.0"
3
+ VERSION = "3.8.0"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ require 'securerandom'
3
3
  Shindo.tests('Fog::Storage[:aws] | copy requests', ["aws"]) do
4
4
 
5
5
  @directory = Fog::Storage[:aws].directories.create(:key => uniq_id('fogmultipartcopytests'))
6
- @large_data = SecureRandom.hex * 19 * 1024 * 1024
6
+ @large_data = SecureRandom.hex * 600000
7
7
  @large_blob = Fog::Storage[:aws].put_object(@directory.identity, 'large_object', @large_data)
8
8
 
9
9
  tests('copies an empty object') do
@@ -77,4 +77,17 @@ Shindo.tests('Fog::Storage[:aws] | copy requests', ["aws"]) do
77
77
 
78
78
  test("copied is the same") { copied.body == file.body }
79
79
  end
80
+
81
+ tests('copies an object with unknown headers') do
82
+ file = Fog::Storage[:aws].directories.new(key: @directory.identity).files.get('large_object')
83
+ file.multipart_chunk_size = Fog::AWS::Storage::File::MIN_MULTIPART_CHUNK_SIZE
84
+ file.concurrency = 10
85
+
86
+ tests("#copy_object('#{@directory.identity}', 'copied_object'").succeeds do
87
+ file.copy(@directory.identity, 'copied_object', { unknown: 1 } )
88
+ end
89
+
90
+ copied = Fog::Storage[:aws].directories.new(key: @directory.identity).files.get('copied_object')
91
+ test("copied is the same") { copied.body == file.body }
92
+ end
80
93
  end
@@ -18,6 +18,13 @@ Shindo.tests('AWS::Storage | object requests', ['aws']) do
18
18
  Fog::Storage[:aws].put_object(@directory.identity, 'fog_object', lorem_file)
19
19
  end
20
20
 
21
+ tests("#put_object('#{@directory.identity}', 'fog_object', lorem_file at EOF)").returns(lorem_file.read) do
22
+ file = lorem_file
23
+ file.read
24
+ Fog::Storage[:aws].put_object(@directory.identity, 'fog_object', file)
25
+ Fog::Storage[:aws].get_object(@directory.identity, 'fog_object').body
26
+ end
27
+
21
28
  tests("#copy_object('#{@directory.identity}', 'fog_object', '#{@directory.identity}', 'fog_other_object')").succeeds do
22
29
  Fog::Storage[:aws].copy_object(@directory.identity, 'fog_object', @directory.identity, 'fog_other_object')
23
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-01 00:00:00.000000000 Z
12
+ date: 2021-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler