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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 177b1f767e814e126cce9905dc11bd5b4384daaafb7292ae379a9f05c435b4ea
4
- data.tar.gz: 19d21cd53ffd3a246e195009c4f709df9e4e955ae5c2dace73e4436f82f5ac4d
3
+ metadata.gz: 6a0941da3e69509575eca6b720890940f33e8617e32bbb37121e19c9e1087e33
4
+ data.tar.gz: '09b4913d90bcbba439e9501df86dcc5e4d3d012a57941e2bc7033e4ac7d97806'
5
5
  SHA512:
6
- metadata.gz: aa5d061efb46aee21a8c74d949f7ba5c1632019ccda79799cfe70775f40b6a3448d0f4c01fc12b0c82863419c74a673a68992ca9582317a1df45c42d3ffd5dad
7
- data.tar.gz: 8d45eb802da36f53c8aa7a67a49f609de9e39be351af967237166da94c52bda5e474cbb7633200f18bc9386341591d8880df9cda8cd7e5a055beb6f0ad09e13c
6
+ metadata.gz: 6df48a1e91089a7c7af40addf64716b712daee65ea431edc4cffc98f1912c85538c5547eddced2bf512bdee1fbcca1cdd43eb2eb76022055a837f07bdad54d8c
7
+ data.tar.gz: b4696c93d25c11b5344410a09cd8142eae252350030000c3f6d041b85f69273f2196fa1715e1428ce9105471d150f1d3b036834140813d148b5ff54883481c24
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 1.0.1
4
+
5
+ - Fix URL generation for files with UTF-8 characters !21
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  - Fix multipart uploads not working and drop multipart_save_block_blob !19
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AzureRM
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
@@ -17,7 +17,13 @@ class TestGetBlobHttpsUrl < Minitest::Test
17
17
  end
18
18
 
19
19
  def test_get_blob_https_url_success
20
- @blob_client.stub :generate_uri, @url do
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, url do
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.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: 2020-10-04 00:00:00.000000000 Z
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.0.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