adsf 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +6 -0
- data/lib/adsf/rack.rb +1 -0
- data/lib/adsf/rack/caching.rb +20 -0
- data/lib/adsf/server.rb +1 -0
- data/lib/adsf/version.rb +1 -1
- 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: 608cd6d78a018a24ab8ec8da75184a2ea34062f1609988c2085b56c08d79a119
|
4
|
+
data.tar.gz: e7eee425e40d6006b077c97613d79683b55f60d6538547869dfc2811c4006703
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2783ef7c786763aeefed982b8d1939571a66c7c52d64b9f63180036a6d2b0bdfa17b0f0d04107f5397f16490a82fc5a16e6f8d92f8cd6005989254c2f121e7a4
|
7
|
+
data.tar.gz: 84df43c4013ce3bb1a865d74ccc127c501439880eb222e1836b8cb18b3c9baf4f0c1a5a119b1e825199f2b204655ce3274c4c5ec08a86ce987f2ecae530c0e6d
|
data/NEWS.md
CHANGED
data/lib/adsf/rack.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Adsf::Rack
|
4
|
+
class Caching
|
5
|
+
def initialize(app)
|
6
|
+
@app = app
|
7
|
+
end
|
8
|
+
|
9
|
+
def call(env)
|
10
|
+
status, headers, body = *@app.call(env)
|
11
|
+
|
12
|
+
new_headers =
|
13
|
+
headers.merge(
|
14
|
+
'Cache-Control' => 'max-age=0, stale-while-error=0',
|
15
|
+
)
|
16
|
+
|
17
|
+
[status, new_headers, body]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/adsf/server.rb
CHANGED
data/lib/adsf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adsf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- bin/adsf
|
43
43
|
- lib/adsf.rb
|
44
44
|
- lib/adsf/rack.rb
|
45
|
+
- lib/adsf/rack/caching.rb
|
45
46
|
- lib/adsf/rack/cors.rb
|
46
47
|
- lib/adsf/rack/index_file_finder.rb
|
47
48
|
- lib/adsf/server.rb
|
@@ -65,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
66
|
- !ruby/object:Gem::Version
|
66
67
|
version: '0'
|
67
68
|
requirements: []
|
68
|
-
|
69
|
-
rubygems_version: 2.7.4
|
69
|
+
rubygems_version: 3.0.3
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: a tiny static file server
|