fog-aws 3.17.0 → 3.19.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: fdc36ea4342e1c08409d77ed825b69f533c288fc0f61508fc9e6a1ce8a3f95b6
4
- data.tar.gz: 85d243645c46cfca8a9e13072cadd8d7e76722260b868f0dd2719c6383c9ebd8
3
+ metadata.gz: a9539d65c933bb4ff0795c48938267df25198cc349110c82053419a40ab4aca7
4
+ data.tar.gz: 47024abbd4ca04595e61dad936e5cd6bd1f68b073b6318087179748e58704a3a
5
5
  SHA512:
6
- metadata.gz: 7612830e760fd0ba381ad962c9df500f4ff05032c8c8d2ebd611329e3147d57151d896dca2c1c6ba3106e3f923a744d3a94b306925fd9bc605b632ec28c63722
7
- data.tar.gz: 380ba1a8c1a2edfbd75c35e05dd595a0656608f939a658131f3305b70e1d957897ee95dde16c9dfe20a2b569b25331a6ae569aea340d4dd12eea185881539e36
6
+ metadata.gz: '08daf2816a492f1043c35e2aa5c6716ebe4a37e73b868b59190b07e3e38d5137f89e097cb697bf53e43cef1ae407096e7eb69e0b2cb6922a2dba8dcde061e580'
7
+ data.tar.gz: 0d3599b1d0be902cd7f3ad245e79d017b46cfcdce16f294d76b13b8edc5523c40dc09238ba513dd2f9ab07278a4de516ebf6f2ece2ea0cdea7f1947c412aabac
data/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.19.0](https://github.com/fog/fog-aws/tree/v3.19.0) (2023-05-18)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.18.0...v3.19.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - gopalcoupa:add-me-central-1 [\#679]
10
+ - Fix S3 Transfer Acceleration [\#676]
11
+ - configure connection_options to improve s3 retry see https://github.com/fog/fog-aws/issues/674 [\#675]
12
+ - s3: remove hardcoded host [\#673]
13
+ - Bump actions/stale from 7 to 8 [\#671]
14
+
15
+
16
+ ## [v3.18.0](https://github.com/fog/fog-aws/tree/v3.18.0) (2023-02-16)
17
+
18
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.17.0...v3.18.0)
19
+
20
+ **Merged pull requests:**
21
+
22
+ - Only compute SSE-C headers when needed in multipart upload [\#669](https://github.com/fog/fog-aws/pull/669) ([stanhu](https://github.com/stanhu))
23
+
3
24
  ## [v3.17.0](https://github.com/fog/fog-aws/tree/v3.17.0) (2023-02-09)
4
25
 
5
26
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.16.0...v3.17.0)
6
27
 
7
28
  **Merged pull requests:**
8
29
 
9
- - Support disabling of Content-MD5 for FIPS [\#668](https://github.com/fog/fog-aws/pull/668#issuecomment-1424301523) ([stanhu](https://github.com/stanhu))
30
+ - Support disabling of Content-MD5 for FIPS [\#668](https://github.com/fog/fog-aws/pull/668) ([stanhu](https://github.com/stanhu))
10
31
 
11
32
  ## [v3.16.0](https://github.com/fog/fog-aws/tree/v3.16.0) (2023-01-26)
12
33
 
@@ -335,12 +335,12 @@ module Fog
335
335
  body.rewind rescue nil
336
336
  end
337
337
  while (chunk = body.read(multipart_chunk_size)) do
338
- part_upload = service.upload_part(directory.key, key, upload_id, part_tags.size + 1, chunk, part_headers(chunk, options))
338
+ part_upload = service.upload_part(directory.key, key, upload_id, part_tags.size + 1, chunk, part_headers(chunk))
339
339
  part_tags << part_upload.headers["ETag"]
340
340
  end
341
341
 
342
342
  if part_tags.empty? #it is an error to have a multipart upload with no parts
343
- part_upload = service.upload_part(directory.key, key, upload_id, 1, '', part_headers('', options))
343
+ part_upload = service.upload_part(directory.key, key, upload_id, 1, '', part_headers(''))
344
344
  part_tags << part_upload.headers["ETag"]
345
345
  end
346
346
 
@@ -387,11 +387,18 @@ module Fog
387
387
  end
388
388
  end
389
389
 
390
- def part_headers(chunk, options)
390
+ def part_headers(chunk)
391
391
  base_headers = part_checksum_headers(chunk)
392
- encryption_keys = encryption_customer_key_headers.keys
393
- encryption_headers = options.select { |key| encryption_keys.include?(key) }
394
- base_headers.merge(encryption_headers)
392
+
393
+ # Only SSE-C headers needed in the UploadPart request. [1]
394
+ # x-amz-server-side-encryption and
395
+ # x-amz-server-side-encryption-aws-kms-key-id are only needed
396
+ # in the CreateMultipartUpload request. [2]
397
+ # [1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
398
+ # [2] https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
399
+ base_headers.merge!(encryption_customer_key_headers) if encryption && encryption_key
400
+
401
+ base_headers
395
402
  end
396
403
 
397
404
  def encryption_customer_key_headers
@@ -21,7 +21,7 @@ module Fog
21
21
  request({
22
22
  :expects => 200,
23
23
  :headers => {},
24
- :host => 's3.amazonaws.com',
24
+ :host => @host || region_to_host(DEFAULT_REGION),
25
25
  :idempotent => true,
26
26
  :method => 'GET',
27
27
  :parser => Fog::Parsers::AWS::Storage::GetService.new
@@ -6,12 +6,20 @@ module Fog
6
6
  #
7
7
  def sync_clock
8
8
  response = begin
9
- Excon.get("#{@scheme}://#{@host}")
9
+ Excon.get(sync_clock_url)
10
10
  rescue Excon::Errors::HTTPStatusError => error
11
11
  error.response
12
12
  end
13
13
  Fog::Time.now = Time.parse(response.headers['Date'])
14
14
  end
15
+
16
+ private
17
+
18
+ def sync_clock_url
19
+ host = @acceleration ? region_to_host(@region) : @host
20
+
21
+ "#{@scheme}://#{host}"
22
+ end
15
23
  end # Real
16
24
 
17
25
  class Mock # :nodoc:all
@@ -546,7 +546,7 @@ module Fog
546
546
  @use_iam_profile = options[:use_iam_profile]
547
547
  @instrumentor = options[:instrumentor]
548
548
  @instrumentor_name = options[:instrumentor_name] || 'fog.aws.storage'
549
- @connection_options = options[:connection_options] || {}
549
+ @connection_options = options[:connection_options] || { retry_limit: 5, retry_interval: 1 }
550
550
  @persistent = options.fetch(:persistent, false)
551
551
  @acceleration = options.fetch(:acceleration, false)
552
552
  @signature_version = options.fetch(:aws_signature_version, 4)
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.17.0"
3
+ VERSION = "3.19.0"
4
4
  end
5
5
  end
data/lib/fog/aws.rb CHANGED
@@ -231,7 +231,7 @@ module Fog
231
231
  'eu-central-1',
232
232
  'eu-north-1',
233
233
  'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1', 'eu-south-2',
234
- 'me-south-1',
234
+ 'me-south-1','me-central-1',
235
235
  'us-east-1', 'us-east-2',
236
236
  'us-west-1', 'us-west-2',
237
237
  'sa-east-1',
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.0
4
+ version: 3.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
8
8
  - Wesley Beary
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-09 00:00:00.000000000 Z
12
+ date: 2023-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -1443,7 +1443,7 @@ homepage: https://github.com/fog/fog-aws
1443
1443
  licenses:
1444
1444
  - MIT
1445
1445
  metadata: {}
1446
- post_install_message:
1446
+ post_install_message:
1447
1447
  rdoc_options: []
1448
1448
  require_paths:
1449
1449
  - lib
@@ -1458,8 +1458,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1458
1458
  - !ruby/object:Gem::Version
1459
1459
  version: '0'
1460
1460
  requirements: []
1461
- rubygems_version: 3.4.1
1462
- signing_key:
1461
+ rubygems_version: 3.4.13
1462
+ signing_key:
1463
1463
  specification_version: 4
1464
1464
  summary: Module for the 'fog' gem to support Amazon Web Services.
1465
1465
  test_files: []