fog-aws 3.31.0 → 3.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7794f67756d283af6606ff87f6b2b6599c3ed3b17cc6db10c536ae768640313
4
- data.tar.gz: 122cff38a7493c120d605514afabcd410de9e6d1be041e50ff4ff1c3f6c8fcc1
3
+ metadata.gz: 271c62ce3532c5f3717ba3a51c8342c5b69457ef2b2ac5400f575de63671fb5e
4
+ data.tar.gz: 9b9650291efae60230cb6034fe3b5af17d68c42f8333bbeccd8ae7fa2f778754
5
5
  SHA512:
6
- metadata.gz: 28ce47b3633913750148f26382218dd1ff7f168cead3972427efcf034597bf57bd029dc6c1ac132b718699ae7f1eaeb34d7b405256df5785027dd2acffdf3301
7
- data.tar.gz: ff37460e9621a6f86141c9770e6f1c56ca8fd0d7abb5e4d5d67b621663d46bdabd3fbee384e15f6b32ff518a0127b14cfb45a780adeb296a3f365c5674e1bc66
6
+ metadata.gz: dcdff3af46165e54e5610427b76b4bedce97777591429424e2484815c2b51075ab9672941d3cd8a94166a9ca1c53582b3a1e3ceefd1c4a9718bb5d1a39a79df2
7
+ data.tar.gz: ef6b03200775cdda81c455a47389d0bbe8309a642e80ebd1677845206dc737923a1bacb942726b3295820757da7024f6ed3b21376b20b80be0d57aee60d78c05
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.32.0](https://github.com/fog/fog-aws/tree/v3.32.0) (2025-05-27)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.31.0...v3.32.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - Add ability to specify s3 restore object tier in post\_object\_restore [\#740](https://github.com/fog/fog-aws/issues/740)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Add ability to specify s3 restore object tier in post\_object\_restore [\#742](https://github.com/fog/fog-aws/pull/742) ([Ankk98](https://github.com/Ankk98))
14
+
15
+ ## [v3.31.0](https://github.com/fog/fog-aws/tree/v3.31.0) (2025-04-21)
16
+
17
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.30.0...v3.31.0)
18
+
19
+ **Closed issues:**
20
+
21
+ - Compute.describe\_instance\_status\(\) fails [\#734](https://github.com/fog/fog-aws/issues/734)
22
+
23
+ **Merged pull requests:**
24
+
25
+ - Fix Compute.describe\_instance\_status parser [\#735](https://github.com/fog/fog-aws/pull/735) ([kitherill](https://github.com/kitherill))
26
+ - Update rubyzip requirement from ~\> 2.3.0 to ~\> 2.4.1 [\#733](https://github.com/fog/fog-aws/pull/733) ([dependabot[bot]](https://github.com/apps/dependabot))
27
+
3
28
  ## [v3.30.0](https://github.com/fog/fog-aws/tree/v3.30.0) (2024-12-17)
4
29
 
5
30
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.29.0...v3.30.0)
@@ -22,18 +47,6 @@
22
47
 
23
48
  - fallback to excon 1.0+ error retry error settings [\#728](https://github.com/fog/fog-aws/pull/728) ([geemus](https://github.com/geemus))
24
49
 
25
- ## [v3.28.0](https://github.com/fog/fog-aws/tree/v3.28.0) (2024-10-14)
26
-
27
- [Full Changelog](https://github.com/fog/fog-aws/compare/v3.27.0...v3.28.0)
28
-
29
- **Closed issues:**
30
-
31
- - SES needs to support AWS SigV4 [\#726](https://github.com/fog/fog-aws/issues/726)
32
-
33
- **Merged pull requests:**
34
-
35
- - Update SES to use AWS SigV4 [\#727](https://github.com/fog/fog-aws/pull/727) ([ohookins](https://github.com/ohookins))
36
-
37
50
 
38
51
 
39
52
  \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -6,7 +6,9 @@ module Fog
6
6
  #
7
7
  # @param bucket_name [String] Name of bucket containing object
8
8
  # @param object_name [String] Name of object to restore
9
- # @option days [Integer] Number of days to restore object for. Defaults to 100000 (a very long time)
9
+ # @param options [Hash] Optional parameters
10
+ # @option options [Integer] :days Number of days to restore object for. Defaults to 100000 (a very long time)
11
+ # @option options [String] :tier Glacier retrieval tier. Can be 'Standard', 'Bulk', or 'Expedited'
10
12
  #
11
13
  # @return [Excon::Response] response:
12
14
  # * status [Integer] 200 (OK) Object is previously restored
@@ -15,11 +17,24 @@ module Fog
15
17
  #
16
18
  # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html
17
19
  #
18
- def post_object_restore(bucket_name, object_name, days = 100000)
20
+ def post_object_restore(bucket_name, object_name, options = {})
19
21
  raise ArgumentError.new('bucket_name is required') unless bucket_name
20
22
  raise ArgumentError.new('object_name is required') unless object_name
21
23
 
22
- data = '<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-3-01"><Days>' + days.to_s + '</Days></RestoreRequest>'
24
+ unless options.is_a?(Hash)
25
+ Fog::Logger.deprecation("post_object_restore with a bare days parameter is deprecated, use post_object_restore(bucket_name, object_name, :days => days) instead [light_black](#{caller.first})[/]")
26
+ options = { :days => options }
27
+ end
28
+
29
+ days = options[:days] || 100000
30
+ tier = options[:tier]
31
+
32
+ data = '<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01/">'
33
+ data += '<Days>' + days.to_s + '</Days>'
34
+ if tier
35
+ data += '<GlacierJobParameters><Tier>' + tier + '</Tier></GlacierJobParameters>'
36
+ end
37
+ data += '</RestoreRequest>'
23
38
 
24
39
  headers = {}
25
40
  headers['Content-MD5'] = Base64.encode64(OpenSSL::Digest::MD5.digest(data)).strip
@@ -39,7 +54,12 @@ module Fog
39
54
  end
40
55
 
41
56
  class Mock # :nodoc:all
42
- def post_object_restore(bucket_name, object_name, days = 100000)
57
+ def post_object_restore(bucket_name, object_name, options = {})
58
+ unless options.is_a?(Hash)
59
+ Fog::Logger.deprecation("post_object_restore with a bare days parameter is deprecated, use post_object_restore(bucket_name, object_name, :days => days) instead [light_black](#{caller.first})[/]")
60
+ options = { :days => options }
61
+ end
62
+
43
63
  response = get_object(bucket_name, object_name)
44
64
  response.body = nil
45
65
  response
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = '3.31.0'.freeze
3
+ VERSION = '3.32.0'.freeze
4
4
  end
5
5
  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.31.0
4
+ version: 3.32.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: 2025-04-21 00:00:00.000000000 Z
12
+ date: 2025-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler