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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c86f9dc623d2143af39f2d2ae4bb955442caa39acfc0557b48e866345b673c91
4
- data.tar.gz: a3c1549e07d6282679d56e8ddae7e770aed14994d1d2e84ce80322046b34cb95
3
+ metadata.gz: b464e4d6d99f84092e1343586bc0102882ada25831fdb9eb8085fe820f823e19
4
+ data.tar.gz: b1972b8c02e3c9c38a24f0cc4b214fae775d08a20607d2f39c002c7da79c0baf
5
5
  SHA512:
6
- metadata.gz: b02d26741bf7c938602603afbf74974fdc6349dbca89fb478579e40f1d0f74b0516df64933bfff4d4a63ec6aeb0e27476d8b22474ba516298e6a8aeb85b7b1ca
7
- data.tar.gz: 58d1245d3c22b8c4375559fae4b1fa5abe8de316f9e5d3b9188c183cfcacd16041b99465e439db4e011c46ac5086d2550be430524b630f10c4d1f7716c6015cc
6
+ metadata.gz: 72106677f12aab0d05cbc85918af78fa31467ac08c3dbf2f3ed3528de39282f22be601d9e885a11ad131e388e3d1435ca4fb8e150edee128bde46770b2709253
7
+ data.tar.gz: 73a95ada3fee3d760702beed96b91fde1f7fc18f0be38b6f44af64365ce339a4d194e87b323df1d839828a8ff0ba9e689516ae134f55cd9171d8d3c6a45154d6
@@ -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 { |chunk| tempfile << chunk }
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-tus"
3
- gem.version = "1.2.0"
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.0"
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.0
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-02 00:00:00.000000000 Z
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.0'
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.0'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement