carrierwave-aliyun 1.1.1 → 1.1.2
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/carrierwave/aliyun/version.rb +1 -1
- data/lib/carrierwave/storage/aliyun_file.rb +8 -4
- 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: 83e7828d8abba5ebf25ae01f845bf0695e596c432b9b867a42034454f5862058
|
4
|
+
data.tar.gz: 106b6e3372acfe88f89cf0c00346ba5d8ec33f97deb10077d07ee943d7b514ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed4defc5158003da256b08bf9c13d798abab8f684fa8ccec4363438840f2ba12ab603115103396634764a127acece35779ba18e6704525ce24f6a98bf81bc33d
|
7
|
+
data.tar.gz: d23cb3be191b8feb7e9906589bdbe3833a204402e7961fc9f14f672de3e52cf1273a1cff05fae5136339aff2ec1a40946354acce402cb1f828d803628e5b4b4a
|
data/CHANGELOG.md
CHANGED
@@ -9,7 +9,11 @@ module CarrierWave
|
|
9
9
|
alias_method :identifier, :filename
|
10
10
|
|
11
11
|
def initialize(uploader, base, path)
|
12
|
-
@uploader, @path, @base = uploader,
|
12
|
+
@uploader, @path, @base = uploader, escape(path), base
|
13
|
+
end
|
14
|
+
|
15
|
+
def escape(path)
|
16
|
+
CGI.escape(path).gsub("%2F", "/")
|
13
17
|
end
|
14
18
|
|
15
19
|
def read
|
@@ -34,9 +38,9 @@ module CarrierWave
|
|
34
38
|
#
|
35
39
|
def url(opts = {})
|
36
40
|
if bucket.mode == :private
|
37
|
-
bucket.private_get_url(path, opts)
|
41
|
+
bucket.private_get_url(path, **opts)
|
38
42
|
else
|
39
|
-
bucket.path_to_url(path, opts)
|
43
|
+
bucket.path_to_url(path, **opts)
|
40
44
|
end
|
41
45
|
end
|
42
46
|
|
@@ -53,7 +57,7 @@ module CarrierWave
|
|
53
57
|
new_file.copy_to(path)
|
54
58
|
else
|
55
59
|
fog_file = new_file.to_file
|
56
|
-
bucket.put(path, fog_file, headers)
|
60
|
+
bucket.put(path, fog_file, **headers)
|
57
61
|
fog_file.close if fog_file && !fog_file.closed?
|
58
62
|
end
|
59
63
|
true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-aliyun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
75
|
+
rubygems_version: 3.1.2
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Aliyun OSS support for Carrierwave
|