aws-sdk-s3 1.123.0 → 1.123.1
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/file_downloader.rb +14 -12
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 18c5a3063c80c67d11fcb593d262d3eb15b88edf2c25abdaaff2f12c57620274
         | 
| 4 | 
            +
              data.tar.gz: b5a6e05f048778f72ca6f34947b4e7b4ed318a447d271764df129dc9e7bcdda3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f09b9adb0fcb1c14e974c482737bce5017377c9b7771f61e3330681a1094a42055edc2727f934e70d1097474163cc98bc2042a2a6880135c2bf9ac97ba5bb88f
         | 
| 7 | 
            +
              data.tar.gz: c702479639bb64d638874d05477aa34b3581f3560f573ebd5acaea3d5e272bafd27ba3a491260ddb6697b450a5efaaf240c6699d2c87072b4ccc2f75b6ab00dc
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            1.123. | 
| 1 | 
            +
            1.123.1
         | 
    
        data/lib/aws-sdk-s3/client.rb
    CHANGED
    
    | @@ -15601,7 +15601,7 @@ module Aws::S3 | |
| 15601 15601 | 
             
                    params: params,
         | 
| 15602 15602 | 
             
                    config: config)
         | 
| 15603 15603 | 
             
                  context[:gem_name] = 'aws-sdk-s3'
         | 
| 15604 | 
            -
                  context[:gem_version] = '1.123. | 
| 15604 | 
            +
                  context[:gem_version] = '1.123.1'
         | 
| 15605 15605 | 
             
                  Seahorse::Client::Request.new(handlers, context)
         | 
| 15606 15606 | 
             
                end
         | 
| 15607 15607 |  | 
| @@ -58,15 +58,19 @@ module Aws | |
| 58 58 | 
             
                    resp = @client.head_object(@params.merge(part_number: 1))
         | 
| 59 59 | 
             
                    count = resp.parts_count
         | 
| 60 60 | 
             
                    if count.nil? || count <= 1
         | 
| 61 | 
            -
                      resp.content_length  | 
| 62 | 
            -
                        single_request | 
| 61 | 
            +
                      if resp.content_length <= MIN_CHUNK_SIZE
         | 
| 62 | 
            +
                        single_request
         | 
| 63 | 
            +
                      else
         | 
| 63 64 | 
             
                        multithreaded_get_by_ranges(construct_chunks(resp.content_length))
         | 
| 65 | 
            +
                      end
         | 
| 64 66 | 
             
                    else
         | 
| 65 67 | 
             
                      # partNumber is an option
         | 
| 66 68 | 
             
                      resp = @client.head_object(@params)
         | 
| 67 | 
            -
                      resp.content_length  | 
| 68 | 
            -
                        single_request | 
| 69 | 
            +
                      if resp.content_length <= MIN_CHUNK_SIZE
         | 
| 70 | 
            +
                        single_request
         | 
| 71 | 
            +
                      else
         | 
| 69 72 | 
             
                        compute_mode(resp.content_length, count)
         | 
| 73 | 
            +
                      end
         | 
| 70 74 | 
             
                    end
         | 
| 71 75 | 
             
                  end
         | 
| 72 76 |  | 
| @@ -84,10 +88,11 @@ module Aws | |
| 84 88 | 
             
                    offset = 0
         | 
| 85 89 | 
             
                    default_chunk_size = compute_chunk(file_size)
         | 
| 86 90 | 
             
                    chunks = []
         | 
| 87 | 
            -
                    while offset  | 
| 91 | 
            +
                    while offset < file_size
         | 
| 88 92 | 
             
                      progress = offset + default_chunk_size
         | 
| 89 | 
            -
                       | 
| 90 | 
            -
                       | 
| 93 | 
            +
                      progress = file_size if progress > file_size
         | 
| 94 | 
            +
                      chunks << "bytes=#{offset}-#{progress - 1}"
         | 
| 95 | 
            +
                      offset = progress
         | 
| 91 96 | 
             
                    end
         | 
| 92 97 | 
             
                    chunks
         | 
| 93 98 | 
             
                  end
         | 
| @@ -96,12 +101,9 @@ module Aws | |
| 96 101 | 
             
                    if @chunk_size && @chunk_size > file_size
         | 
| 97 102 | 
             
                      raise ArgumentError, ":chunk_size shouldn't exceed total file size."
         | 
| 98 103 | 
             
                    else
         | 
| 99 | 
            -
                       | 
| 100 | 
            -
                        (file_size.to_f / MAX_PARTS).ceil,
         | 
| 101 | 
            -
                        MIN_CHUNK_SIZE
         | 
| 104 | 
            +
                      @chunk_size || [
         | 
| 105 | 
            +
                        (file_size.to_f / MAX_PARTS).ceil, MIN_CHUNK_SIZE
         | 
| 102 106 | 
             
                      ].max.to_i
         | 
| 103 | 
            -
                      chunk_size -= 1 if file_size % chunk_size == 1
         | 
| 104 | 
            -
                      chunk_size
         | 
| 105 107 | 
             
                    end
         | 
| 106 108 | 
             
                  end
         | 
| 107 109 |  | 
    
        data/lib/aws-sdk-s3.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: aws-sdk-s3
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.123. | 
| 4 | 
            +
              version: 1.123.1
         | 
| 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: 2023- | 
| 11 | 
            +
            date: 2023-06-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: aws-sdk-kms
         |