tus-server 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1e0b6de3b8d7235547c83c2cbbb68070db193ba
4
- data.tar.gz: b66d6f3fa1a83fe8edf090b110ba96dd1f73f679
3
+ metadata.gz: d611f90e1f935c7caa84d040fe50cc3a9c49e6f6
4
+ data.tar.gz: a4095bfb0a87f0241336ec3ce78cb4f5b4442609
5
5
  SHA512:
6
- metadata.gz: 2b91c48408c262844816d2f0a4747c80da01a6cc69743b1a18c5a2c2026cd9ce05ffe9caafda4d8e4d344768e866d741f344a96bf971be958de215416ac5ec05
7
- data.tar.gz: 87467de1991030125c12b3b8747b6436d09472c6ab26f540b16feffd4a593d4d94e1fa6b5aeb3cdb2ec1045b261508a8a6815cba236862acb4014d5d8826da80
6
+ metadata.gz: 12860dfff41aa4178d926618915e7cdbc6198599b139eb5a9dc2117ca4dbfed165fda92ff63620d70389562b222227831f3d7ee070f2b12562bb555424c75462
7
+ data.tar.gz: db9fcba3e6d4f40dffc90cab9d8bea3921727fb60ebba7cd8926b872ce305cedc9766eadcdeafee2f2e040f394b8555d21dc3b2bbd307a3d5d0e55a17f8ccf20
data/README.md CHANGED
@@ -106,9 +106,10 @@ Tus::Server.opts[:max_size] = nil # no limit
106
106
 
107
107
  ### Expiration
108
108
 
109
- By default both partially and fully uploaded files will get deleted after one
110
- week, and the interval of checking for expired files is 1 hour. You can change
111
- both of these:
109
+ The expiration date is automatically set on each created file, and is refreshed
110
+ on each PATCH request. By default the expiration date is 1 week from the last
111
+ POST or PATCH request, and the interval of checking expired files is 1 hour,
112
+ but this can be changed:
112
113
 
113
114
  ```rb
114
115
  require "tus/server"
data/lib/tus/server.rb CHANGED
@@ -165,8 +165,9 @@ module Tus
165
165
  storage.patch_file(uid, content)
166
166
 
167
167
  info["Upload-Offset"] = (info.offset + content.length).to_s
168
- storage.update_info(uid, info.to_h)
168
+ info["Upload-Expires"] = (Time.now + expiration_time).httpdate
169
169
 
170
+ storage.update_info(uid, info.to_h)
170
171
  response.headers.update(info.to_h)
171
172
 
172
173
  no_content!
data/tus-server.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "tus-server"
3
- gem.version = "0.1.1"
3
+ gem.version = "0.2.0"
4
4
 
5
5
  gem.required_ruby_version = ">= 2.1"
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tus-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-21 00:00:00.000000000 Z
11
+ date: 2016-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roda