azure-storage-common 2.0.2 → 2.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be4d1d9164afc74a1282f4c559554b324466e81d3c4491ce43795a185897b47d
|
4
|
+
data.tar.gz: b82e8d110bcf3d5d16dc8e6f39c397ab2d99ba77a7aeb6bde42ca156e10eba23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd127b867078bd18adc327d0ce5538fed5c7de249041b0df9f2aa218ff0647ab0d2cd36f7c85f1e88a50d49e8a7222e36d6c4162ccfab19b2c5245f52b5f81bf
|
7
|
+
data.tar.gz: 74ab17781f20b46dabf5992e284fc36a9205c165405d544e3ff0a49df7bdd9b42cc646ae47c70fd8b20b86e6a046d038b5a77ee08d55941d43e0182b68d9e00c
|
@@ -125,7 +125,7 @@ module Azure::Storage::Common
|
|
125
125
|
#
|
126
126
|
# @return [Azure::Storage::Common::Client]
|
127
127
|
def create(options = {}, &block)
|
128
|
-
|
128
|
+
Client.new(options, &block)
|
129
129
|
end
|
130
130
|
|
131
131
|
# Public: Creates an instance of [Azure::Storage::Common::Client] with Storage Emulator
|
@@ -137,14 +137,14 @@ module Azure::Storage::Common
|
|
137
137
|
# @return [Azure::Storage::Common::Client]
|
138
138
|
def create_development(proxy_uri = nil, &block)
|
139
139
|
proxy_uri ||= StorageServiceClientConstants::DEV_STORE_URI
|
140
|
-
|
140
|
+
create(use_development_storage: true, development_storage_proxy_uri: proxy_uri, &block)
|
141
141
|
end
|
142
142
|
|
143
143
|
# Public: Creates an instance of [Azure::Storage::Common::Client] from Environment Variables
|
144
144
|
#
|
145
145
|
# @return [Azure::Storage::Client]
|
146
146
|
def create_from_env(&block)
|
147
|
-
|
147
|
+
create(&block)
|
148
148
|
end
|
149
149
|
|
150
150
|
# Public: Creates an instance of [Azure::Storage::Common::Client] from Environment Variables
|
@@ -155,7 +155,7 @@ module Azure::Storage::Common
|
|
155
155
|
#
|
156
156
|
# @return [Azure::Storage::Common::Client]
|
157
157
|
def create_from_connection_string(connection_string, &block)
|
158
|
-
|
158
|
+
Client.new(connection_string, &block)
|
159
159
|
end
|
160
160
|
end
|
161
161
|
end
|
@@ -191,7 +191,7 @@ module Azure::Storage::Common
|
|
191
191
|
storage_file_host: "#{proxy_uri}:#{StorageServiceClientConstants::DEVSTORE_FILE_HOST_PORT}",
|
192
192
|
use_path_style_uri: true)
|
193
193
|
return results
|
194
|
-
rescue InvalidOptionsError
|
194
|
+
rescue InvalidOptionsError
|
195
195
|
end
|
196
196
|
|
197
197
|
# P2 - explicit hosts with account connection string
|
@@ -202,7 +202,7 @@ module Azure::Storage::Common
|
|
202
202
|
results[:use_path_style_uri] = results.key?(:use_path_style_uri)
|
203
203
|
normalize_hosts(results)
|
204
204
|
return results
|
205
|
-
rescue InvalidOptionsError
|
205
|
+
rescue InvalidOptionsError
|
206
206
|
end
|
207
207
|
|
208
208
|
# P3 - account name and key or sas with default hosts or an end suffix
|
@@ -220,7 +220,7 @@ module Azure::Storage::Common
|
|
220
220
|
storage_file_host: "#{protocol}://#{account}.#{ServiceType::FILE}.#{suffix}",
|
221
221
|
use_path_style_uri: false)
|
222
222
|
return results
|
223
|
-
rescue InvalidOptionsError
|
223
|
+
rescue InvalidOptionsError
|
224
224
|
end
|
225
225
|
|
226
226
|
# P4 - explicit hosts with account name and key
|
@@ -232,7 +232,7 @@ module Azure::Storage::Common
|
|
232
232
|
results[:use_path_style_uri] = results.key?(:use_path_style_uri)
|
233
233
|
normalize_hosts(results)
|
234
234
|
return results
|
235
|
-
rescue InvalidOptionsError
|
235
|
+
rescue InvalidOptionsError
|
236
236
|
end
|
237
237
|
|
238
238
|
# P5 - anonymous or sas only for one or more particular services, options with account name/key + hosts should be already validated in P4
|
@@ -245,7 +245,7 @@ module Azure::Storage::Common
|
|
245
245
|
# Adds anonymous signer if no sas token
|
246
246
|
results[:signer] = Azure::Storage::Common::Core::Auth::AnonymousSigner.new unless results.key?(:storage_sas_token)
|
247
247
|
return results
|
248
|
-
rescue InvalidOptionsError
|
248
|
+
rescue InvalidOptionsError
|
249
249
|
end
|
250
250
|
|
251
251
|
# P6 - account name and key or sas with explicit hosts
|
@@ -257,7 +257,7 @@ module Azure::Storage::Common
|
|
257
257
|
results[:use_path_style_uri] = results.key?(:use_path_style_uri)
|
258
258
|
normalize_hosts(results)
|
259
259
|
return results
|
260
|
-
rescue InvalidOptionsError
|
260
|
+
rescue InvalidOptionsError
|
261
261
|
end
|
262
262
|
|
263
263
|
raise InvalidOptionsError, "options provided are not valid set: #{opts}" # wrong opts if move to this line
|
@@ -347,7 +347,7 @@ module Azure::Storage::Common
|
|
347
347
|
def parse_connection_string(connection_string)
|
348
348
|
opts = {}
|
349
349
|
connection_string.split(";").each do |i|
|
350
|
-
e = i.index("=")
|
350
|
+
e = i.index("=") || -1
|
351
351
|
raise InvalidConnectionStringError, Azure::Storage::Common::Core::SR::INVALID_CONNECTION_STRING if e < 0 || e == i.length - 1
|
352
352
|
key, value = i[0..e - 1], i[e + 1..i.length - 1]
|
353
353
|
raise InvalidConnectionStringError, Azure::Storage::Common::Core::SR::INVALID_CONNECTION_STRING_BAD_KEY % key unless ClientOptions.connection_string_mapping.key? key
|
@@ -213,6 +213,12 @@ end
|
|
213
213
|
|
214
214
|
# Code validate private/public IP acceptable ranges.
|
215
215
|
class IPAddr
|
216
|
+
PRIVATE_RANGES = [
|
217
|
+
IPAddr.new('10.0.0.0/8'),
|
218
|
+
IPAddr.new('172.16.0.0/12'),
|
219
|
+
IPAddr.new('192.168.0.0/16')
|
220
|
+
]
|
221
|
+
|
216
222
|
def private?
|
217
223
|
return false unless self.ipv4?
|
218
224
|
PRIVATE_RANGES.each do |ipr|
|
@@ -31,7 +31,7 @@ module Azure
|
|
31
31
|
# Fields represent the parts defined in http://semver.org/
|
32
32
|
MAJOR = 2 unless defined? MAJOR
|
33
33
|
MINOR = 0 unless defined? MINOR
|
34
|
-
UPDATE =
|
34
|
+
UPDATE = 4 unless defined? UPDATE
|
35
35
|
|
36
36
|
class << self
|
37
37
|
# @return [String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure-storage-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: faraday_middleware
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.0.rc1
|
34
|
+
- - "~>"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '1.0'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: 1.0.0.rc1
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: net-http-persistent
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +64,20 @@ dependencies:
|
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1
|
67
|
+
version: '1'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.10.8
|
62
71
|
type: :runtime
|
63
72
|
prerelease: false
|
64
73
|
version_requirements: !ruby/object:Gem::Requirement
|
65
74
|
requirements:
|
66
75
|
- - "~>"
|
67
76
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1
|
77
|
+
version: '1'
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 1.10.8
|
69
81
|
- !ruby/object:Gem::Dependency
|
70
82
|
name: dotenv
|
71
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,7 +264,7 @@ homepage: http://github.com/azure/azure-storage-ruby
|
|
252
264
|
licenses:
|
253
265
|
- MIT
|
254
266
|
metadata: {}
|
255
|
-
post_install_message:
|
267
|
+
post_install_message:
|
256
268
|
rdoc_options: []
|
257
269
|
require_paths:
|
258
270
|
- lib
|
@@ -267,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
279
|
- !ruby/object:Gem::Version
|
268
280
|
version: '0'
|
269
281
|
requirements: []
|
270
|
-
rubygems_version: 3.0.
|
271
|
-
signing_key:
|
282
|
+
rubygems_version: 3.0.3.1
|
283
|
+
signing_key:
|
272
284
|
specification_version: 4
|
273
285
|
summary: Official Ruby client library to consume Azure Storage Common service
|
274
286
|
test_files: []
|