gitlab-fog-azure-rm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fog/azurerm/requests/storage/delete_blob_https_url.rb +1 -1
- data/lib/fog/azurerm/requests/storage/get_blob_http_url.rb +1 -1
- data/lib/fog/azurerm/requests/storage/get_blob_https_url.rb +1 -1
- data/lib/fog/azurerm/requests/storage/get_blob_url.rb +1 -1
- data/lib/fog/azurerm/requests/storage/get_container_url.rb +1 -1
- data/lib/fog/azurerm/requests/storage/put_blob_https_url.rb +1 -1
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/requests/storage/test_get_blob_https_url.rb +7 -1
- data/test/requests/storage/test_get_blob_url.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a0941da3e69509575eca6b720890940f33e8617e32bbb37121e19c9e1087e33
|
4
|
+
data.tar.gz: '09b4913d90bcbba439e9501df86dcc5e4d3d012a57941e2bc7033e4ac7d97806'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6df48a1e91089a7c7af40addf64716b712daee65ea431edc4cffc98f1912c85538c5547eddced2bf512bdee1fbcca1cdd43eb2eb76022055a837f07bdad54d8c
|
7
|
+
data.tar.gz: b4696c93d25c11b5344410a09cd8142eae252350030000c3f6d041b85f69273f2196fa1715e1428ce9105471d150f1d3b036834140813d148b5ff54883481c24
|
data/CHANGELOG.md
CHANGED
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
protocol: 'https'
|
24
24
|
}
|
25
25
|
token = @signature_client.generate_service_sas_token(relative_path, params)
|
26
|
-
uri = @blob_client.generate_uri(relative_path)
|
26
|
+
uri = @blob_client.generate_uri(relative_path, {}, { encode: true })
|
27
27
|
"#{uri}?#{token}"
|
28
28
|
end
|
29
29
|
end
|
@@ -22,7 +22,7 @@ module Fog
|
|
22
22
|
expiry: expires.utc.iso8601
|
23
23
|
}
|
24
24
|
token = @signature_client.generate_service_sas_token(relative_path, params)
|
25
|
-
uri = @blob_client.generate_uri(relative_path)
|
25
|
+
uri = @blob_client.generate_uri(relative_path, {}, { encode: true })
|
26
26
|
url = "#{uri}?#{token}"
|
27
27
|
url.gsub('https:', 'http:')
|
28
28
|
end
|
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
protocol: 'https'
|
24
24
|
}
|
25
25
|
token = @signature_client.generate_service_sas_token(relative_path, params)
|
26
|
-
uri = @blob_client.generate_uri(relative_path)
|
26
|
+
uri = @blob_client.generate_uri(relative_path, {}, { encode: true })
|
27
27
|
"#{uri}?#{token}"
|
28
28
|
end
|
29
29
|
end
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
class Real
|
6
6
|
# Get a public blob url from Azure blob storage
|
7
7
|
def get_blob_url(container_name, blob_name, options = {})
|
8
|
-
uri = @blob_client.generate_uri("#{container_name}/#{blob_name}")
|
8
|
+
uri = @blob_client.generate_uri("#{container_name}/#{blob_name}", {}, { encode: true })
|
9
9
|
|
10
10
|
if options[:scheme] == 'http'
|
11
11
|
uri.to_s.gsub('https:', 'http:')
|
@@ -11,7 +11,7 @@ module Fog
|
|
11
11
|
#
|
12
12
|
def get_container_url(container_name, options = {})
|
13
13
|
query = { 'comp' => 'list', 'restype' => 'container' }
|
14
|
-
uri = @blob_client.generate_uri(container_name, query)
|
14
|
+
uri = @blob_client.generate_uri(container_name, query, { encode: true })
|
15
15
|
|
16
16
|
if options[:scheme] == 'http'
|
17
17
|
uri.to_s.gsub('https:', 'http:')
|
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
protocol: 'https'
|
24
24
|
}
|
25
25
|
token = @signature_client.generate_service_sas_token(relative_path, params)
|
26
|
-
uri = @blob_client.generate_uri(relative_path)
|
26
|
+
uri = @blob_client.generate_uri(relative_path, {}, { encode: true })
|
27
27
|
"#{uri}?#{token}"
|
28
28
|
end
|
29
29
|
end
|
data/lib/fog/azurerm/version.rb
CHANGED
@@ -17,7 +17,13 @@ class TestGetBlobHttpsUrl < Minitest::Test
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_get_blob_https_url_success
|
20
|
-
|
20
|
+
mock_generate_uri = Minitest::Mock.new
|
21
|
+
|
22
|
+
2.times do
|
23
|
+
mock_generate_uri.expect(:call, @url, ['test_container/test_blob', {}, { encode: true }])
|
24
|
+
end
|
25
|
+
|
26
|
+
@blob_client.stub :generate_uri, mock_generate_uri do
|
21
27
|
@signature_client.stub :generate_service_sas_token, @token do
|
22
28
|
assert_equal "#{@url}?#{@token}", @service.get_blob_https_url('test_container', 'test_blob', Time.now.utc + 3600)
|
23
29
|
assert_equal "#{@url}?#{@token}", @service.get_object_url('test_container', 'test_blob', Time.now.utc + 3600)
|
@@ -12,9 +12,14 @@ class TestGetBlobUrl < Minitest::Test
|
|
12
12
|
def test_get_blob_url_success
|
13
13
|
service = Fog::Storage::AzureRM.new(storage_account_credentials)
|
14
14
|
blob_client = service.instance_variable_get(:@blob_client)
|
15
|
+
|
16
|
+
mock_generate_uri = Minitest::Mock.new
|
15
17
|
url = ApiStub::Requests::Storage::File.blob_https_url
|
18
|
+
2.times do
|
19
|
+
mock_generate_uri.expect(:call, url, ['test_container/test_blob', {}, { encode: true }])
|
20
|
+
end
|
16
21
|
|
17
|
-
blob_client.stub :generate_uri,
|
22
|
+
blob_client.stub :generate_uri, mock_generate_uri do
|
18
23
|
assert_equal url, service.get_blob_url('test_container', 'test_blob')
|
19
24
|
|
20
25
|
options = { scheme: 'http' }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-fog-azure-rm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaffan Chaudhry
|
@@ -18,7 +18,7 @@ authors:
|
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
|
-
date:
|
21
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: codeclimate-test-reporter
|
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
338
|
- !ruby/object:Gem::Version
|
339
339
|
version: '0'
|
340
340
|
requirements: []
|
341
|
-
rubygems_version: 3.
|
341
|
+
rubygems_version: 3.1.4
|
342
342
|
signing_key:
|
343
343
|
specification_version: 4
|
344
344
|
summary: Module for the 'fog' gem to support Azure Blob Storage with CarrierWave and
|