aws-sdk-s3 1.197.0 → 1.199.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: 206194d0b6217c7fd01477cc0407b4d55080bdd269f14d33f3ae072fabfaa2ee
4
- data.tar.gz: e269ddd5c94adc905a49ddf2f8fa80f1446684889d934aefd14d38136f81822b
3
+ metadata.gz: ffda0f4ecb81969c1c783ca56f099b78bc0353a07874164983d1d39cedeaef64
4
+ data.tar.gz: f9ecf4f1772d4f071b4e845fc30095a57ebe3eacfa2d5e46219514e09a46e6bb
5
5
  SHA512:
6
- metadata.gz: 2d27932019687706da5456a0c7dfa3e4c9bb81e3173105f6572e7a1afd4af96e553e94fedb19ca3c0052fcc4f3b297fcb14fe3719da037d9a9b333701fc35c24
7
- data.tar.gz: bc7d64a072edfe9fc2154fec0834e6d27b19f2fbdca79b39571b1057cd73e5041abb113678d5c03414e664bd9422a8a714c37ec84015865de6566dc5b1a5909c
6
+ metadata.gz: 6aac2b06b2fcc2e59b7f8264438098d40674cefb8399bfab2b775f284cabc14f82e9b124836fead306e102a20b400f789f192d34e7f388fcb83d4659a839c083
7
+ data.tar.gz: a22e4f47897670b4f83145c6ddc294ab3f5e1dc00d19596490fb653dcf8810d8e21a131c29b74c2a78863a54a3b4f6f006459dffa58cc046e61fc99f5bba997e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.199.0 (2025-09-08)
5
+ ------------------
6
+
7
+ * Feature - This release includes backward compatibility work on the "Expires" parameter.
8
+
9
+ 1.198.0 (2025-08-26)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ * Issue - Fix multipart `download_file` to support `Pathname`, `File` and `Tempfile` objects as download destinations.
15
+
4
16
  1.197.0 (2025-08-19)
5
17
  ------------------
6
18
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.197.0
1
+ 1.199.0
@@ -21735,7 +21735,7 @@ module Aws::S3
21735
21735
  tracer: tracer
21736
21736
  )
21737
21737
  context[:gem_name] = 'aws-sdk-s3'
21738
- context[:gem_version] = '1.197.0'
21738
+ context[:gem_version] = '1.199.0'
21739
21739
  Seahorse::Client::Request.new(handlers, context)
21740
21740
  end
21741
21741
 
@@ -488,7 +488,10 @@ module Aws
488
488
  # end
489
489
  # obj.download_file('/path/to/file', progress_callback: progress)
490
490
  #
491
- # @param [String] destination Where to download the file to.
491
+ # @param [String, Pathname, File, Tempfile] destination
492
+ # Where to download the file to. This can either be a String or Pathname to the file, an open File object,
493
+ # or an open Tempfile object. If you pass an open File or Tempfile object, then you are responsible for
494
+ # closing it after the download completes.
492
495
  #
493
496
  # @param [Hash] options
494
497
  # Additional options for {Client#get_object} and #{Client#head_object} may be provided.
@@ -20,7 +20,12 @@ module Aws
20
20
  attr_reader :client
21
21
 
22
22
  def download(destination, options = {})
23
- @path = destination
23
+ valid_types = [String, Pathname, File, Tempfile]
24
+ unless valid_types.include?(destination.class)
25
+ raise ArgumentError, "Invalid destination, expected #{valid_types.join(', ')} but got: #{destination.class}"
26
+ end
27
+
28
+ @destination = destination
24
29
  @mode = options.delete(:mode) || 'auto'
25
30
  @thread_count = options.delete(:thread_count) || 10
26
31
  @chunk_size = options.delete(:chunk_size)
@@ -42,7 +47,7 @@ module Aws
42
47
  raise ArgumentError, "Invalid mode #{@mode} provided, :mode should be single_request, get_range or auto"
43
48
  end
44
49
  end
45
- File.rename(@temp_path, @path) if @temp_path
50
+ File.rename(@temp_path, @destination) if @temp_path
46
51
  ensure
47
52
  File.delete(@temp_path) if @temp_path && File.exist?(@temp_path)
48
53
  end
@@ -118,7 +123,9 @@ module Aws
118
123
  def download_in_threads(pending, total_size)
119
124
  threads = []
120
125
  progress = MultipartProgress.new(pending, total_size, @progress_callback) if @progress_callback
121
- @temp_path = "#{@path}.s3tmp.#{SecureRandom.alphanumeric(8)}"
126
+ unless [File, Tempfile].include?(@destination.class)
127
+ @temp_path = "#{@destination}.s3tmp.#{SecureRandom.alphanumeric(8)}"
128
+ end
122
129
  @thread_count.times do
123
130
  thread = Thread.new do
124
131
  begin
@@ -159,11 +166,12 @@ module Aws
159
166
  end
160
167
 
161
168
  def write(body, range)
162
- File.write(@temp_path, body.read, range.split('-').first.to_i)
169
+ path = @temp_path || @destination
170
+ File.write(path, body.read, range.split('-').first.to_i)
163
171
  end
164
172
 
165
173
  def single_request
166
- params = @params.merge(response_target: @path)
174
+ params = @params.merge(response_target: @destination)
167
175
  params[:on_chunk_received] = single_part_progress if @progress_callback
168
176
  resp = @client.get_object(params)
169
177
  return resp unless @on_checksum_validated
@@ -45,8 +45,10 @@ module Aws
45
45
  # end
46
46
  # tm.download_file('/path/to/file', bucket: 'bucket', key: 'key', progress_callback: progress)
47
47
  #
48
- # @param [String] destination
49
- # Where to download the file to.
48
+ # @param [String, Pathname, File, Tempfile] destination
49
+ # Where to download the file to. This can either be a String or Pathname to the file, an open File object,
50
+ # or an open Tempfile object. If you pass an open File or Tempfile object, then you are responsible for
51
+ # closing it after the download completes.
50
52
  #
51
53
  # @param [String] bucket
52
54
  # The name of the S3 bucket to upload to.
@@ -17198,7 +17198,7 @@ module Aws::S3
17198
17198
  # record frame. To ensure continuous streaming of data, S3 Select
17199
17199
  # might split the same record across multiple record frames instead of
17200
17200
  # aggregating the results in memory. Some S3 clients (for example, the
17201
- # SDKforJava) handle this behavior by creating a `ByteStream` out of
17201
+ # SDK for Java) handle this behavior by creating a `ByteStream` out of
17202
17202
  # the response by default. Other clients might not handle this
17203
17203
  # behavior by default. In those cases, you must aggregate the results
17204
17204
  # on the client side and parse the response.
data/lib/aws-sdk-s3.rb CHANGED
@@ -75,7 +75,7 @@ module Aws::S3
75
75
  autoload :ObjectVersion, 'aws-sdk-s3/object_version'
76
76
  autoload :EventStreams, 'aws-sdk-s3/event_streams'
77
77
 
78
- GEM_VERSION = '1.197.0'
78
+ GEM_VERSION = '1.199.0'
79
79
 
80
80
  end
81
81
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.197.0
4
+ version: 1.199.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '3'
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 3.228.0
49
+ version: 3.231.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,7 +56,7 @@ dependencies:
56
56
  version: '3'
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 3.228.0
59
+ version: 3.231.0
60
60
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
61
61
  This gem is part of the AWS SDK for Ruby.
62
62
  email: