carrierwave-aliyun 1.2.0 → 1.2.1
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 +9 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03a96d213f40d85c4e9cb135f1e32490fd3dcd2c38e1fe4c5fb866a0c06f8813
|
4
|
+
data.tar.gz: 372720e762645aed633542bce67a177b1718a1282ddf0012ca8d52eab554718d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4957fb8b0998385cd932c142688cfd6dd8a2d9a971822a0fbf345e26382f2b44055e9a68e59a6ebc9c2ffae64a225eac6e30b97e43c4499ba177684982d38c0
|
7
|
+
data.tar.gz: 808b8d986b14cf9fcc25fd551c752a81e55bf59cd42db1b08b3c124a0de920254ea1f79fa5ca91a6c45ace1078716c097579f15f824edfa1117f5229a1b0c6db
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
module CarrierWave
|
4
4
|
module Storage
|
5
5
|
class AliyunFile
|
6
|
+
attr_writer :file
|
6
7
|
attr_reader :uploader, :path
|
7
8
|
|
8
9
|
alias_method :filename, :path
|
@@ -12,6 +13,14 @@ module CarrierWave
|
|
12
13
|
@uploader, @path, @base = uploader, escape(path), base
|
13
14
|
end
|
14
15
|
|
16
|
+
def file
|
17
|
+
@file ||= bucket.get(path).try(:first)
|
18
|
+
end
|
19
|
+
|
20
|
+
def size
|
21
|
+
file.headers[:content_length].to_i rescue nil
|
22
|
+
end
|
23
|
+
|
15
24
|
def escape(path)
|
16
25
|
CGI.escape(path).gsub("%2F", "/")
|
17
26
|
end
|
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|
@@ -57,7 +57,7 @@ homepage: https://github.com/huacnlee/carrierwave-aliyun
|
|
57
57
|
licenses:
|
58
58
|
- MIT
|
59
59
|
metadata: {}
|
60
|
-
post_install_message:
|
60
|
+
post_install_message:
|
61
61
|
rdoc_options: []
|
62
62
|
require_paths:
|
63
63
|
- lib
|
@@ -72,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
76
|
-
signing_key:
|
75
|
+
rubygems_version: 3.1.4
|
76
|
+
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Aliyun OSS support for Carrierwave
|
79
79
|
test_files: []
|