gitlab-fog-azure-rm 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -2
- data/gitlab-fog-azure-rm.gemspec +3 -2
- data/lib/fog/azurerm/requests/storage/list_blobs.rb +1 -1
- data/lib/fog/azurerm/requests/storage/list_containers.rb +1 -1
- data/lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb +1 -1
- data/lib/fog/azurerm/storage.rb +11 -9
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/requests/storage/test_list_blobs.rb +2 -2
- data/test/requests/storage/test_list_containers.rb +2 -2
- data/test/requests/storage/test_wait_blob_copy_operation_to_finish.rb +1 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a3e5613e808f27ef9bcd2be6015eac3ffc43e55fe558b2c78b30b97164c3f78
|
4
|
+
data.tar.gz: d64eb6be36585d864bb5bb7fdcafdd5191a7bda376a4f84edc7e82c9bd972554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b884c2fc10a00a1c385522f2138492427ab50162df609fdfe1398f380c42184bb8a99bf8eae0fd50ff77521796f5371fd40b3222114a5f794368555c8408c7
|
7
|
+
data.tar.gz: c1a11715408b8c7eb825915e0ecf1dbfb584f831c85dcbb711973f1b2e22ac54de07f3bbbaf59273c525abe9fa6919385fed04c7e85de400ca727d5bbe19c7b2
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## 0.9.0
|
4
|
+
|
5
|
+
- Fix TimeoutError deprecation !17
|
6
|
+
- Update Azure storage libraries !16
|
7
|
+
|
3
8
|
## 0.8.1
|
4
9
|
|
5
|
-
- Fix `azure_storage_domain` not getting propagated properly
|
10
|
+
- Fix `azure_storage_domain` not getting propagated properly !14
|
6
11
|
|
7
12
|
## 0.8.0
|
8
13
|
|
9
|
-
- Add `azure_storage_domain` for specifying custom domain
|
14
|
+
- Add `azure_storage_domain` for specifying custom domain !11
|
10
15
|
|
11
16
|
## 0.7.0
|
12
17
|
|
data/gitlab-fog-azure-rm.gemspec
CHANGED
@@ -20,9 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency 'codeclimate-test-reporter' , '~> 1.0.0'
|
21
21
|
spec.add_development_dependency 'minitest', '~> 5.8.4'
|
22
22
|
spec.add_development_dependency 'rake', '~> 13.0'
|
23
|
-
spec.add_development_dependency 'rubocop', '~> 0.89'
|
23
|
+
spec.add_development_dependency 'rubocop', '~> 0.89.1'
|
24
24
|
spec.add_development_dependency 'simplecov'
|
25
|
-
spec.add_dependency 'azure-storage', '~>
|
25
|
+
spec.add_dependency 'azure-storage-blob', '~> 2.0'
|
26
|
+
spec.add_dependency 'azure-storage-common', '~> 2.0'
|
26
27
|
spec.add_dependency 'fog-core', '= 2.1.0'
|
27
28
|
spec.add_dependency 'fog-json', '~> 1.2.0'
|
28
29
|
spec.add_dependency 'mime-types'
|
@@ -21,7 +21,7 @@ module Fog
|
|
21
21
|
Fog::Logger.debug msg
|
22
22
|
temp = @blob_client.list_blobs(container_name, options)
|
23
23
|
# Workaround for the issue https://github.com/Azure/azure-storage-ruby/issues/37
|
24
|
-
raise temp unless temp.instance_of?(Azure::Service::EnumerationResults)
|
24
|
+
raise temp unless temp.instance_of?(Azure::Storage::Common::Service::EnumerationResults)
|
25
25
|
|
26
26
|
blobs += temp unless temp.empty?
|
27
27
|
break if temp.continuation_token.nil? || temp.continuation_token.empty?
|
@@ -16,7 +16,7 @@ module Fog
|
|
16
16
|
Fog::Logger.debug msg
|
17
17
|
temp = @blob_client.list_containers(options)
|
18
18
|
# Workaround for the issue https://github.com/Azure/azure-storage-ruby/issues/37
|
19
|
-
raise temp unless temp.instance_of?(Azure::Service::EnumerationResults)
|
19
|
+
raise temp unless temp.instance_of?(Azure::Storage::Common::Service::EnumerationResults)
|
20
20
|
|
21
21
|
containers += temp unless temp.empty?
|
22
22
|
break if temp.continuation_token.nil? || temp.continuation_token.empty?
|
@@ -18,7 +18,7 @@ module Fog
|
|
18
18
|
break if copy_status != COPY_STATUS[:PENDING]
|
19
19
|
|
20
20
|
elapse_time = Time.new - start_time
|
21
|
-
raise
|
21
|
+
raise Timeout::Error.new("The copy operation cannot be finished in #{timeout} seconds") if !timeout.nil? && elapse_time >= timeout
|
22
22
|
|
23
23
|
copied_bytes, total_bytes = blob_props[:copy_progress].split('/').map(&:to_i)
|
24
24
|
interval = copied_bytes.zero? ? 5 : (total_bytes - copied_bytes).to_f / copied_bytes * elapse_time
|
data/lib/fog/azurerm/storage.rb
CHANGED
@@ -69,7 +69,8 @@ module Fog
|
|
69
69
|
class Mock
|
70
70
|
def initialize(_options = {})
|
71
71
|
begin
|
72
|
-
require 'azure/storage'
|
72
|
+
require 'azure/storage/common'
|
73
|
+
require 'azure/storage/blob'
|
73
74
|
rescue LoadError => e
|
74
75
|
retry if require('rubygems')
|
75
76
|
raise e.message
|
@@ -81,7 +82,8 @@ module Fog
|
|
81
82
|
class Real
|
82
83
|
def initialize(options)
|
83
84
|
begin
|
84
|
-
require 'azure/storage'
|
85
|
+
require 'azure/storage/common'
|
86
|
+
require 'azure/storage/blob'
|
85
87
|
require 'securerandom'
|
86
88
|
@debug = ENV['DEBUG'] || options[:debug]
|
87
89
|
require 'azure/core/http/debug_filter' if @debug
|
@@ -115,14 +117,14 @@ module Fog
|
|
115
117
|
get_blob_endpoint_with_domain(@azure_storage_account_name, true, @azure_storage_domain)
|
116
118
|
end
|
117
119
|
|
118
|
-
azure_client = Azure::Storage::Client.create(storage_account_name: @azure_storage_account_name,
|
119
|
-
|
120
|
-
|
121
|
-
@blob_client = azure_client
|
122
|
-
@blob_client.with_filter(Azure::Storage::Core::Filter::ExponentialRetryPolicyFilter.new)
|
120
|
+
azure_client = Azure::Storage::Common::Client.create(storage_account_name: @azure_storage_account_name,
|
121
|
+
storage_access_key: @azure_storage_access_key,
|
122
|
+
storage_blob_host: domain)
|
123
|
+
@blob_client = Azure::Storage::Blob::BlobService.new(client: azure_client)
|
124
|
+
@blob_client.with_filter(Azure::Storage::Common::Core::Filter::ExponentialRetryPolicyFilter.new)
|
123
125
|
@blob_client.with_filter(Azure::Core::Http::DebugFilter.new) if @debug
|
124
|
-
@signature_client = Azure::Storage::Core::Auth::SharedAccessSignature.new(@azure_storage_account_name,
|
125
|
-
|
126
|
+
@signature_client = Azure::Storage::Common::Core::Auth::SharedAccessSignature.new(@azure_storage_account_name,
|
127
|
+
@azure_storage_access_key)
|
126
128
|
end
|
127
129
|
end
|
128
130
|
end
|
data/lib/fog/azurerm/version.rb
CHANGED
@@ -13,11 +13,11 @@ class TestListBlobs < Minitest::Test
|
|
13
13
|
@blob_client = @service.instance_variable_get(:@blob_client)
|
14
14
|
|
15
15
|
@blob_list = ApiStub::Requests::Storage::File.blob_list
|
16
|
-
@blobs1 = Azure::Service::EnumerationResults.new
|
16
|
+
@blobs1 = Azure::Storage::Common::Service::EnumerationResults.new
|
17
17
|
@blobs1.continuation_token = 'marker'
|
18
18
|
@blobs1.push(@blob_list[0])
|
19
19
|
@blobs1.push(@blob_list[1])
|
20
|
-
@blobs2 = Azure::Service::EnumerationResults.new
|
20
|
+
@blobs2 = Azure::Storage::Common::Service::EnumerationResults.new
|
21
21
|
@blobs2.push(@blob_list[2])
|
22
22
|
@blobs2.push(@blob_list[3])
|
23
23
|
end
|
@@ -13,11 +13,11 @@ class TestListContainers < Minitest::Test
|
|
13
13
|
@blob_client = @service.instance_variable_get(:@blob_client)
|
14
14
|
|
15
15
|
@containers = ApiStub::Requests::Storage::Directory.container_list
|
16
|
-
@containers1 = Azure::Service::EnumerationResults.new
|
16
|
+
@containers1 = Azure::Storage::Common::Service::EnumerationResults.new
|
17
17
|
@containers1.continuation_token = 'marker'
|
18
18
|
@containers1.push(@containers[0])
|
19
19
|
@containers1.push(@containers[1])
|
20
|
-
@containers2 = Azure::Service::EnumerationResults.new
|
20
|
+
@containers2 = Azure::Storage::Common::Service::EnumerationResults.new
|
21
21
|
@containers2.push(@containers[2])
|
22
22
|
end
|
23
23
|
|
@@ -106,7 +106,7 @@ class TestWaitBlobCopyOperationToFinish < Minitest::Test
|
|
106
106
|
|
107
107
|
@service.stub :get_blob_properties, multiple_values do
|
108
108
|
@service.stub :delete_blob, true do
|
109
|
-
assert_raises(
|
109
|
+
assert_raises(Timeout::Error) do
|
110
110
|
@service.wait_blob_copy_operation_to_finish('test_container', 'test_blob', copy_id, copy_status, 2)
|
111
111
|
end
|
112
112
|
end
|
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: 0.
|
4
|
+
version: 0.9.0
|
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-
|
21
|
+
date: 2020-09-06 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: codeclimate-test-reporter
|
@@ -68,14 +68,14 @@ dependencies:
|
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
71
|
+
version: 0.89.1
|
72
72
|
type: :development
|
73
73
|
prerelease: false
|
74
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
76
|
- - "~>"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
78
|
+
version: 0.89.1
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: simplecov
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,19 +91,33 @@ dependencies:
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
|
-
name: azure-storage
|
94
|
+
name: azure-storage-blob
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
99
|
+
version: '2.0'
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
102
|
version_requirements: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
104
|
- - "~>"
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version:
|
106
|
+
version: '2.0'
|
107
|
+
- !ruby/object:Gem::Dependency
|
108
|
+
name: azure-storage-common
|
109
|
+
requirement: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - "~>"
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '2.0'
|
114
|
+
type: :runtime
|
115
|
+
prerelease: false
|
116
|
+
version_requirements: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - "~>"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '2.0'
|
107
121
|
- !ruby/object:Gem::Dependency
|
108
122
|
name: fog-core
|
109
123
|
requirement: !ruby/object:Gem::Requirement
|