asset 0.2.3 → 0.2.4
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/asset.gemspec +2 -2
- data/lib/assets/router.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fda219195a03f0fb380dbecb39b7868bc6dc2451
|
4
|
+
data.tar.gz: f7d78090632fc8e1e3f70ffcae1dd299b289b849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1bdf0fdb346bbf1cfcd64bfad68684b8949b11aa6f2b8ec91ab0ac7b59c6f4ea5a2c4ded5d55a1821546460c0bece8c430937dd42239dbe9822917ae25edb06
|
7
|
+
data.tar.gz: 5aebf309f608d7d5a14570820d738b9f59f083feb23e892db339b5194d7584962e11088c8bebdaefb59920420f03c59a8bca157cec05a46db9a7061e0d5efaf7
|
data/CHANGELOG.md
CHANGED
data/asset.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'asset'
|
3
|
-
s.version = '0.2.
|
4
|
-
s.date = '
|
3
|
+
s.version = '0.2.4'
|
4
|
+
s.date = '2018-05-14'
|
5
5
|
s.summary = "Compress and serve your CSS and JS assets automatically"
|
6
6
|
s.description = "The only thing you need for your assets."
|
7
7
|
s.authors = ["Fugroup Limited"]
|
data/lib/assets/router.rb
CHANGED
@@ -19,7 +19,7 @@ module Asset
|
|
19
19
|
# Call
|
20
20
|
def call!(env)
|
21
21
|
# Setting up request
|
22
|
-
@request = Rack::Request.new(env)
|
22
|
+
@request = ::Rack::Request.new(env)
|
23
23
|
|
24
24
|
# The routes
|
25
25
|
case @request.path_info
|
@@ -58,7 +58,7 @@ module Asset
|
|
58
58
|
def found(item)
|
59
59
|
content = item.content(!!@key)
|
60
60
|
[ 200, {'Content-Type' => MIME[item.type],
|
61
|
-
'Content-Length' => content.
|
61
|
+
'Content-Length' => content.bytesize,
|
62
62
|
'Cache-Control' => 'public, max-age=86400',
|
63
63
|
'Expires' => (Time.now.utc + (86400 * 30)).httpdate,
|
64
64
|
'Last-Modified' => item.modified.httpdate,
|
@@ -73,7 +73,7 @@ module Asset
|
|
73
73
|
# Robots
|
74
74
|
def robots
|
75
75
|
s = %{Sitemap: #{@request.scheme}://#{@request.host}/sitemap.xml}
|
76
|
-
[200, {'Content-Type' => MIME['txt'],'Content-Length' => s.
|
76
|
+
[200, {'Content-Type' => MIME['txt'],'Content-Length' => s.bytesize}, [s]]
|
77
77
|
end
|
78
78
|
|
79
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fugroup Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|