fog-aliyun 0.3.19 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +7 -2
- data/fog-aliyun.gemspec +2 -1
- data/lib/fog/aliyun/compute.rb +7 -5
- data/lib/fog/aliyun/models/storage/files.rb +8 -10
- data/lib/fog/aliyun/requests/compute/attach_disk.rb +3 -1
- data/lib/fog/aliyun/requests/compute/create_security_group_egress_ip_rule.rb +4 -2
- data/lib/fog/aliyun/requests/compute/create_security_group_egress_sg_rule.rb +3 -1
- data/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb +4 -2
- data/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb +3 -1
- data/lib/fog/aliyun/requests/compute/create_vpc.rb +3 -1
- data/lib/fog/aliyun/requests/compute/create_vswitch.rb +3 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group_egress_ip_rule.rb +4 -2
- data/lib/fog/aliyun/requests/compute/delete_security_group_egress_sg_rule.rb +3 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb +4 -2
- data/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb +3 -1
- data/lib/fog/aliyun/requests/compute/detach_disk.rb +3 -1
- data/lib/fog/aliyun/requests/compute/modify_vpc.rb +3 -1
- data/lib/fog/aliyun/requests/compute/modify_vswitch.rb +3 -1
- data/lib/fog/aliyun/requests/storage/get_object.rb +1 -1
- data/lib/fog/aliyun/requests/storage/get_object_http_url.rb +3 -1
- data/lib/fog/aliyun/requests/storage/get_object_https_url.rb +3 -1
- data/lib/fog/aliyun/version.rb +1 -1
- metadata +19 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 902530b35b7b3b8213965642cb9994b53399a02e65cf75270fc30f9f4a662ad2
|
4
|
+
data.tar.gz: 9a413e6577adbed08130870c7e7aa751ceb80aec8bb53d42eb43f694cff56a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d8a867a2cd5be94ec813a8ee11371eed34530aff2554227590c5fdcae9b0ebb197f421ecd7716c38fd9cc930f91f5b2390b28b247fd9dca2cc87f08c4d3311f
|
7
|
+
data.tar.gz: dc7c248af9cb3388bf2453f8c4096935dafa3ca251c86d75da251c61feda0980d36fd01241a53b4bbff97f0460df609e9634062bc73df851e8510b6368d6e653
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.4
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
## 0.
|
1
|
+
## 0.4.1 (Unreleased)
|
2
|
+
## 0.4.0 (August 17, 2022)
|
3
|
+
|
4
|
+
IMPROVEMENTS:
|
5
|
+
- Ruby 3 [GH-158](https://github.com/fog/fog-aliyun/pull/158)
|
6
|
+
|
2
7
|
## 0.3.19 (August 17, 2020)
|
3
8
|
|
4
9
|
IMPROVEMENTS:
|
@@ -106,4 +111,4 @@ IMPROVEMENTS:
|
|
106
111
|
## 0.3.9 (May 07, 2020)
|
107
112
|
|
108
113
|
BUG FIXES:
|
109
|
-
- diectories.get supports options to filter the specified objects [GH-62](https://github.com/fog/fog-aliyun/pull/62)
|
114
|
+
- diectories.get supports options to filter the specified objects [GH-62](https://github.com/fog/fog-aliyun/pull/62)
|
data/fog-aliyun.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler'
|
24
|
-
spec.add_development_dependency 'mime-types', '~>
|
24
|
+
spec.add_development_dependency 'mime-types', '~> 3.4'
|
25
25
|
spec.add_development_dependency 'pry-nav'
|
26
26
|
spec.add_development_dependency 'rake'
|
27
27
|
spec.add_development_dependency 'rspec'
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'memory_profiler'
|
31
31
|
spec.add_development_dependency 'aliyun-sdk', '~> 0.8.0'
|
32
32
|
|
33
|
+
spec.add_dependency 'addressable', '~> 2.8.0'
|
33
34
|
spec.add_dependency 'aliyun-sdk', '~> 0.8.0'
|
34
35
|
spec.add_dependency 'fog-core'
|
35
36
|
spec.add_dependency 'fog-json'
|
data/lib/fog/aliyun/compute.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun < Fog::Service
|
@@ -350,7 +352,7 @@ module Fog
|
|
350
352
|
# operation compute-- default URL
|
351
353
|
def defaultAliyunUri(action, sigNonce, time)
|
352
354
|
parTimeFormat = time.strftime('%Y-%m-%dT%H:%M:%SZ')
|
353
|
-
urlTimeFormat = URI.
|
355
|
+
urlTimeFormat = Addressable::URI.encode_component(parTimeFormat, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
354
356
|
'?Format=JSON&AccessKeyId=' + @aliyun_accesskey_id + '&Action=' + action + '&SignatureMethod=HMAC-SHA1&RegionId=' + @aliyun_region_id + '&SignatureNonce=' + sigNonce + '&SignatureVersion=1.0&Version=2014-05-26&Timestamp=' + urlTimeFormat
|
355
357
|
end
|
356
358
|
|
@@ -370,7 +372,7 @@ module Fog
|
|
370
372
|
|
371
373
|
def defaultAliyunVPCUri(action, sigNonce, time)
|
372
374
|
parTimeFormat = time.strftime('%Y-%m-%dT%H:%M:%SZ')
|
373
|
-
urlTimeFormat = URI.
|
375
|
+
urlTimeFormat = Addressable::URI.encode_component(parTimeFormat, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
374
376
|
'?Format=JSON&AccessKeyId=' + @aliyun_accesskey_id + '&Action=' + action + '&SignatureMethod=HMAC-SHA1&RegionId=' + @aliyun_region_id + '&SignatureNonce=' + sigNonce + '&SignatureVersion=1.0&Version=2016-04-28&Timestamp=' + urlTimeFormat
|
375
377
|
end
|
376
378
|
|
@@ -420,18 +422,18 @@ module Fog
|
|
420
422
|
# building querystrings with string concatination.
|
421
423
|
def sign(accessKeySecret, parameters)
|
422
424
|
signature = sign_without_encoding(accessKeySecret, parameters)
|
423
|
-
URI.
|
425
|
+
Addressable::URI.encode_component(signature, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
424
426
|
end
|
425
427
|
|
426
428
|
def sign_without_encoding(accessKeySecret, parameters)
|
427
429
|
sortedParameters = parameters.sort
|
428
430
|
canonicalizedQueryString = ''
|
429
431
|
sortedParameters.each do |k, v|
|
430
|
-
canonicalizedQueryString += '&' + URI.
|
432
|
+
canonicalizedQueryString += '&' + Addressable::URI.encode_component(k, Addressable::URI::CharacterClasses::UNRESERVED + '|') + '=' + Addressable::URI.encode_component(v, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
431
433
|
end
|
432
434
|
|
433
435
|
canonicalizedQueryString[0] = ''
|
434
|
-
stringToSign = 'GET&%2F&' + URI.
|
436
|
+
stringToSign = 'GET&%2F&' + Addressable::URI.encode_component(canonicalizedQueryString, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
435
437
|
key = accessKeySecret + '&'
|
436
438
|
|
437
439
|
digVer = OpenSSL::Digest.new('sha1')
|
@@ -71,11 +71,10 @@ module Fog
|
|
71
71
|
})
|
72
72
|
new(file_data)
|
73
73
|
rescue Exception => error
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
raise(error)
|
74
|
+
if error.respond_to?(:http_code) && error.http_code.to_i == 404
|
75
|
+
nil
|
76
|
+
else
|
77
|
+
raise(error)
|
79
78
|
end
|
80
79
|
end
|
81
80
|
end
|
@@ -108,11 +107,10 @@ module Fog
|
|
108
107
|
})
|
109
108
|
new(file_data)
|
110
109
|
rescue Exception => error
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
raise(error)
|
110
|
+
if error.respond_to?(:http_code) && error.http_code.to_i == 404
|
111
|
+
nil
|
112
|
+
else
|
113
|
+
raise(error)
|
116
114
|
end
|
117
115
|
end
|
118
116
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -46,7 +48,7 @@ module Fog
|
|
46
48
|
if device
|
47
49
|
parameters['Device'] = device
|
48
50
|
pathUrl += '&Device='
|
49
|
-
pathUrl += URI.
|
51
|
+
pathUrl += Addressable::URI.encode_component(device, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
50
52
|
end
|
51
53
|
|
52
54
|
signature = sign(@aliyun_accesskey_secret, parameters)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -19,7 +21,7 @@ module Fog
|
|
19
21
|
|
20
22
|
parameters['DestCidrIp'] = destCidrIp
|
21
23
|
pathUrl += '&DestCidrIp='
|
22
|
-
pathUrl += URI.
|
24
|
+
pathUrl += Addressable::URI.encode_component(destCidrIp, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
23
25
|
nicType ||= 'intranet'
|
24
26
|
parameters['NicType'] = nicType
|
25
27
|
pathUrl += '&NicType='
|
@@ -29,7 +31,7 @@ module Fog
|
|
29
31
|
portRange ||= '-1/-1'
|
30
32
|
parameters['PortRange'] = portRange
|
31
33
|
pathUrl += '&PortRange='
|
32
|
-
pathUrl += URI.
|
34
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
33
35
|
|
34
36
|
protocol = option[:protocol]
|
35
37
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -30,7 +32,7 @@ module Fog
|
|
30
32
|
portRange ||= '-1/-1'
|
31
33
|
parameters['PortRange'] = portRange
|
32
34
|
pathUrl += '&PortRange='
|
33
|
-
pathUrl += URI.
|
35
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
34
36
|
|
35
37
|
protocol = option[:protocol]
|
36
38
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -19,7 +21,7 @@ module Fog
|
|
19
21
|
|
20
22
|
parameters['SourceCidrIp'] = sourceCidrIp
|
21
23
|
pathUrl += '&SourceCidrIp='
|
22
|
-
pathUrl += URI.
|
24
|
+
pathUrl += Addressable::URI.encode_component(sourceCidrIp, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
23
25
|
nicType ||= 'intranet'
|
24
26
|
parameters['NicType'] = nicType
|
25
27
|
pathUrl += '&NicType='
|
@@ -29,7 +31,7 @@ module Fog
|
|
29
31
|
portRange ||= '-1/-1'
|
30
32
|
parameters['PortRange'] = portRange
|
31
33
|
pathUrl += '&PortRange='
|
32
|
-
pathUrl += URI.
|
34
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
33
35
|
|
34
36
|
protocol = option[:protocol]
|
35
37
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -30,7 +32,7 @@ module Fog
|
|
30
32
|
portRange ||= '-1/-1'
|
31
33
|
parameters['PortRange'] = portRange
|
32
34
|
pathUrl += '&PortRange='
|
33
|
-
pathUrl += URI.
|
35
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
34
36
|
|
35
37
|
protocol = option[:protocol]
|
36
38
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -15,7 +17,7 @@ module Fog
|
|
15
17
|
|
16
18
|
parameters['CidrBlock'] = cidrBlock
|
17
19
|
pathUrl += '&CidrBlock='
|
18
|
-
pathUrl += URI.
|
20
|
+
pathUrl += Addressable::URI.encode_component(cidrBlock, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
19
21
|
|
20
22
|
name = options[:name]
|
21
23
|
desc = options[:description]
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -19,7 +21,7 @@ module Fog
|
|
19
21
|
|
20
22
|
parameters['CidrBlock'] = cidrBlock
|
21
23
|
pathUrl += '&CidrBlock='
|
22
|
-
pathUrl += URI.
|
24
|
+
pathUrl += Addressable::URI.encode_component(cidrBlock, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
23
25
|
|
24
26
|
parameters['ZoneId'] = @aliyun_zone_id
|
25
27
|
pathUrl += '&ZoneId='
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -19,7 +21,7 @@ module Fog
|
|
19
21
|
|
20
22
|
parameters['DestCidrIp'] = destCidrIp
|
21
23
|
pathUrl += '&DestCidrIp='
|
22
|
-
pathUrl += URI.
|
24
|
+
pathUrl += Addressable::URI.encode_component(destCidrIp, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
23
25
|
nicType ||= 'intranet'
|
24
26
|
parameters['NicType'] = nicType
|
25
27
|
pathUrl += '&NicType='
|
@@ -29,7 +31,7 @@ module Fog
|
|
29
31
|
portRange ||= '-1/-1'
|
30
32
|
parameters['PortRange'] = portRange
|
31
33
|
pathUrl += '&PortRange='
|
32
|
-
pathUrl += URI.
|
34
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
33
35
|
|
34
36
|
protocol = option[:protocol]
|
35
37
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -30,7 +32,7 @@ module Fog
|
|
30
32
|
portRange ||= '-1/-1'
|
31
33
|
parameters['PortRange'] = portRange
|
32
34
|
pathUrl += '&PortRange='
|
33
|
-
pathUrl += URI.
|
35
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
34
36
|
|
35
37
|
protocol = option[:protocol]
|
36
38
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -19,7 +21,7 @@ module Fog
|
|
19
21
|
|
20
22
|
parameters['SourceCidrIp'] = sourceCidrIp
|
21
23
|
pathUrl += '&SourceCidrIp='
|
22
|
-
pathUrl += URI.
|
24
|
+
pathUrl += Addressable::URI.encode_component(sourceCidrIp, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
23
25
|
nicType ||= 'intranet'
|
24
26
|
parameters['NicType'] = nicType
|
25
27
|
pathUrl += '&NicType='
|
@@ -29,7 +31,7 @@ module Fog
|
|
29
31
|
portRange ||= '-1/-1'
|
30
32
|
parameters['PortRange'] = portRange
|
31
33
|
pathUrl += '&PortRange='
|
32
|
-
pathUrl += URI.
|
34
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
33
35
|
|
34
36
|
protocol = option[:protocol]
|
35
37
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -30,7 +32,7 @@ module Fog
|
|
30
32
|
portRange ||= '-1/-1'
|
31
33
|
parameters['PortRange'] = portRange
|
32
34
|
pathUrl += '&PortRange='
|
33
|
-
pathUrl += URI.
|
35
|
+
pathUrl += Addressable::URI.encode_component(portRange, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
34
36
|
|
35
37
|
protocol = option[:protocol]
|
36
38
|
protocol ||= 'all'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -25,7 +27,7 @@ module Fog
|
|
25
27
|
if device
|
26
28
|
parameters['Device'] = device
|
27
29
|
pathUrl += '&Device='
|
28
|
-
pathUrl += URI.
|
30
|
+
pathUrl += Addressable::URI.encode_component(device, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
29
31
|
end
|
30
32
|
signature = sign(@aliyun_accesskey_secret, parameters)
|
31
33
|
pathUrl += '&Signature='
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -15,7 +17,7 @@ module Fog
|
|
15
17
|
|
16
18
|
parameters['VpcId'] = vpcId
|
17
19
|
pathUrl += '&VpcId='
|
18
|
-
pathUrl += URI.
|
20
|
+
pathUrl += Addressable::URI.encode_component(vpcId, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
19
21
|
name = options[:name]
|
20
22
|
desc = options[:description]
|
21
23
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Compute
|
5
7
|
class Aliyun
|
@@ -15,7 +17,7 @@ module Fog
|
|
15
17
|
|
16
18
|
parameters['VSwitchId'] = vSwitchId
|
17
19
|
pathUrl += '&VSwitchId='
|
18
|
-
pathUrl += URI.
|
20
|
+
pathUrl += Addressable::URI.encode_component(vpcId, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
19
21
|
name = options[:name]
|
20
22
|
desc = options[:description]
|
21
23
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Aliyun
|
5
7
|
class Storage
|
@@ -24,7 +26,7 @@ module Fog
|
|
24
26
|
signature = sign('GET', expires_time, nil, resource)
|
25
27
|
'http://' + bucket_name + '.' + @host + '/' + object_name +
|
26
28
|
'?OSSAccessKeyId=' + @aliyun_accesskey_id + '&Expires=' + expires_time +
|
27
|
-
'&Signature=' + URI.
|
29
|
+
'&Signature=' + Addressable::URI.encode_component(signature, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
28
30
|
elsif acl == 'public-read' || acl == 'public-read-write'
|
29
31
|
'http://' + bucket_name + '.' + @host + '/' + object_name
|
30
32
|
else
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'addressable'
|
4
|
+
|
3
5
|
module Fog
|
4
6
|
module Aliyun
|
5
7
|
class Storage
|
@@ -24,7 +26,7 @@ module Fog
|
|
24
26
|
signature = sign('GET', expires_time, nil, resource)
|
25
27
|
'https://' + bucket_name + '.' + @host + '/' + object_name +
|
26
28
|
'?OSSAccessKeyId=' + @aliyun_accesskey_id + '&Expires=' + expires_time +
|
27
|
-
'&Signature=' + URI.
|
29
|
+
'&Signature=' + Addressable::URI.encode_component(signature, Addressable::URI::CharacterClasses::UNRESERVED + '|')
|
28
30
|
elsif acl == 'public-read' || acl == 'public-read-write'
|
29
31
|
'https://' + bucket_name + '.' + @host + '/' + object_name
|
30
32
|
else
|
data/lib/fog/aliyun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-aliyun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Qinsi Deng, Jianxun Li, Jane Han, Guimin He
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,20 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 2.6.2
|
33
|
+
version: '3.4'
|
37
34
|
type: :development
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 2.6.2
|
40
|
+
version: '3.4'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: pry-nav
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,6 +136,20 @@ dependencies:
|
|
142
136
|
- - "~>"
|
143
137
|
- !ruby/object:Gem::Version
|
144
138
|
version: 0.8.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: addressable
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.8.0
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.8.0
|
145
153
|
- !ruby/object:Gem::Dependency
|
146
154
|
name: aliyun-sdk
|
147
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -367,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
367
375
|
- !ruby/object:Gem::Version
|
368
376
|
version: '0'
|
369
377
|
requirements: []
|
370
|
-
rubygems_version: 3.0.
|
378
|
+
rubygems_version: 3.0.3
|
371
379
|
signing_key:
|
372
380
|
specification_version: 4
|
373
381
|
summary: Fog provider for Alibaba Cloud Web Services.
|