sinatra-cache-assets 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/sinatra/cache_assets.rb +2 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -7,7 +7,7 @@ This Rack middleware will add a Cache-Control header to your Sinatra static asse
|
|
7
7
|
require "sinatra"
|
8
8
|
require "sinatra/cache_assets"
|
9
9
|
|
10
|
-
use Sinatra::CacheAssets, :max_age => 7200 # seconds
|
10
|
+
use Sinatra::CacheAssets, :max_age => 7200 # seconds, defaults to 86400
|
11
11
|
|
12
12
|
get "/" do
|
13
13
|
"some data"
|
data/lib/sinatra/cache_assets.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Sinatra
|
2
2
|
class CacheAssets
|
3
3
|
|
4
|
-
VERSION = "0.0.
|
4
|
+
VERSION = "0.0.3"
|
5
5
|
|
6
6
|
attr_reader :app, :options
|
7
7
|
|
@@ -19,7 +19,7 @@ module Sinatra
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def duration
|
22
|
-
options[:max_age] ||
|
22
|
+
options[:max_age] || 86400
|
23
23
|
end
|
24
24
|
|
25
25
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-cache-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Dollar
|