activestorage_upyun 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a1a49cc2be589a8801185a27f87bfcab3fbf97299f1075d48d9bbba213ee68b
|
4
|
+
data.tar.gz: f19761541aef40916fab6b03cce9fdde46d9e56eceefb0a581421432fd16ecf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34bcc7fb8348dac77d6efb4e0b8b7197725efa56594f518bd0bdb43e44178497c6d166b04c1df5983276b96c0cb529bfe81dbb8d4db7175c155fdf533ff61083
|
7
|
+
data.tar.gz: 330afc7754b0a809e3f1c1bb32aa4a9b2a2ed8d56fa57c3f078e2e92faf32ce20c02ea3c67f48b80a281420fe2ea11af522eccfb75e5fdbde079fbef6102c029
|
@@ -63,6 +63,13 @@ module ActiveStorage
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
def download_chunk(key, range)
|
67
|
+
instrument :download_chunk, key: key, range: range do
|
68
|
+
range_end = range.exclude_end? ? range.end - 1 : range.end
|
69
|
+
@upyun.get(path_for(key), nil, headers: {range: "bytes=#{range.begin}-#{range_end}"})
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
66
73
|
def exist?(key)
|
67
74
|
instrument :exist, key: key do |payload|
|
68
75
|
answer = upyun.getinfo(path_for(key))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activestorage_upyun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- doabit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage
|