shrine-tus 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/lib/shrine/storage/tus.rb +6 -3
- data/shrine-tus.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b464e4d6d99f84092e1343586bc0102882ada25831fdb9eb8085fe820f823e19
|
4
|
+
data.tar.gz: b1972b8c02e3c9c38a24f0cc4b214fae775d08a20607d2f39c002c7da79c0baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72106677f12aab0d05cbc85918af78fa31467ac08c3dbf2f3ed3528de39282f22be601d9e885a11ad131e388e3d1435ca4fb8e150edee128bde46770b2709253
|
7
|
+
data.tar.gz: 73a95ada3fee3d760702beed96b91fde1f7fc18f0be38b6f44af64365ce339a4d194e87b323df1d839828a8ff0ba9e689516ae134f55cd9171d8d3c6a45154d6
|
data/lib/shrine/storage/tus.rb
CHANGED
@@ -13,7 +13,7 @@ class Shrine
|
|
13
13
|
super(**options)
|
14
14
|
end
|
15
15
|
|
16
|
-
def download(id)
|
16
|
+
def download(id, **options)
|
17
17
|
if tus_storage
|
18
18
|
download_from_tus_storage(tus_uid(id))
|
19
19
|
else
|
@@ -21,7 +21,7 @@ class Shrine
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def open(id)
|
24
|
+
def open(id, **options)
|
25
25
|
if tus_storage
|
26
26
|
open_from_tus_storage(tus_uid(id))
|
27
27
|
else
|
@@ -35,7 +35,10 @@ class Shrine
|
|
35
35
|
tempfile = Tempfile.new("shrine-tus", binmode: true)
|
36
36
|
|
37
37
|
response = get_tus_file(uid)
|
38
|
-
response.each
|
38
|
+
response.each do |chunk|
|
39
|
+
tempfile << chunk
|
40
|
+
chunk.clear # deallocate string
|
41
|
+
end
|
39
42
|
response.close
|
40
43
|
|
41
44
|
tempfile.open
|
data/shrine-tus.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "shrine-tus"
|
3
|
-
gem.version = "1.2.
|
3
|
+
gem.version = "1.2.1"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.1"
|
6
6
|
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
|
16
16
|
gem.add_dependency "shrine", "~> 2.0"
|
17
17
|
gem.add_dependency "tus-server", "~> 2.0"
|
18
|
-
gem.add_dependency "shrine-url", "~> 2.
|
18
|
+
gem.add_dependency "shrine-url", "~> 2.1"
|
19
19
|
|
20
20
|
gem.add_development_dependency "rake"
|
21
21
|
gem.add_development_dependency "minitest"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-tus
|
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
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|