azure-blob 0.5.7.1 → 0.5.8

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: b05479c9f6ba44b76af4d096021a2a887e8774caf4dcd1c2e02a98c8a2998426
4
- data.tar.gz: 75c680b7c740b541e078cb9a1fc4f7c213719abfa68d3057a21982a1a0977320
3
+ metadata.gz: c28844e3daa4fffbd9cf4158de8ef573ee1fc204ef765cb8f3315bfb2fd6838d
4
+ data.tar.gz: f8d2422437463cb5d86b83fa0a52efca9a8babd8ab61666551b4c8b7c7c8df9d
5
5
  SHA512:
6
- metadata.gz: 1116f9eec87e05685dd8177f400cc322b1a393e0d96eaf91bfe52cfb465ebc7ded753ff1c040f9dbed031038c6cca2cab80bd7eec591d4e020ac151c7a1b59af
7
- data.tar.gz: 76a9a8840903de54253fce878ccee22ba55be7097f018c171a3b6863862fa19e2656475dbf415b609426a428212acb14d35117c55c6d8905060f3909be28d61a
6
+ metadata.gz: 13d10f1bb9a116684fdfdd5a00ffcc870a6a0976acd4a57478be1b47419a3f406d892f2ce83205a601fcf9b216e742033732695ac6e22336ca9c4dd7dc8d9156
7
+ data.tar.gz: 4d998b1b6e9cb61249d9c6aa5618fb13ac4f7bd65ad6c0e34d9c159b08431059de0a5282262edcb08a759b6816ea9049013273a6eee7effa79ff13a8192588d0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.8] 2025-05-14
4
+
5
+ - Add support for copying blobs across containers (#24)
6
+
3
7
  ## [0.5.7.1] 2025-04-22
4
8
 
5
9
  - Fixed a bug when reusing the account name in the container name. #22
@@ -77,16 +77,22 @@ module AzureBlob
77
77
  Http.new(uri, headers, signer:).get
78
78
  end
79
79
 
80
- # Copy a blob
80
+ # Copy a blob between containers or within the same container
81
81
  #
82
82
  # Calls to {Copy Blob From URL}[https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url]
83
83
  #
84
- # Takes a key (path) and a source_key (path).
84
+ # Parameters:
85
+ # - key: destination blob path
86
+ # - source_key: source blob path
87
+ # - options: additional options
88
+ # - source_client: AzureBlob::Client instance for the source container (optional)
89
+ # If not provided, copies from within the same container
85
90
  #
86
91
  def copy_blob(key, source_key, options = {})
92
+ source_client = options.delete(:source_client) || self
87
93
  uri = generate_uri("#{container}/#{key}")
88
94
 
89
- source_uri = signed_uri(source_key, permissions: "r", expiry: Time.at(Time.now.to_i + 300).utc.iso8601)
95
+ source_uri = source_client.signed_uri(source_key, permissions: "r", expiry: Time.at(Time.now.to_i + 300).utc.iso8601)
90
96
 
91
97
  headers = {
92
98
  "x-ms-copy-source": source_uri.to_s,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AzureBlob
4
- VERSION = "0.5.7.1"
4
+ VERSION = "0.5.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure-blob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7.1
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joé Dupuis