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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/azure_blob/client.rb +9 -3
- data/lib/azure_blob/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c28844e3daa4fffbd9cf4158de8ef573ee1fc204ef765cb8f3315bfb2fd6838d
|
4
|
+
data.tar.gz: f8d2422437463cb5d86b83fa0a52efca9a8babd8ab61666551b4c8b7c7c8df9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13d10f1bb9a116684fdfdd5a00ffcc870a6a0976acd4a57478be1b47419a3f406d892f2ce83205a601fcf9b216e742033732695ac6e22336ca9c4dd7dc8d9156
|
7
|
+
data.tar.gz: 4d998b1b6e9cb61249d9c6aa5618fb13ac4f7bd65ad6c0e34d9c159b08431059de0a5282262edcb08a759b6816ea9049013273a6eee7effa79ff13a8192588d0
|
data/CHANGELOG.md
CHANGED
data/lib/azure_blob/client.rb
CHANGED
@@ -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
|
-
#
|
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,
|
data/lib/azure_blob/version.rb
CHANGED