asset 0.2.3 → 0.2.4

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
  SHA1:
3
- metadata.gz: b2e695e92a2765c5ff62bf824c39aca5d69f1128
4
- data.tar.gz: 6eb80b88a1ef13e3202b52c847e8681a024217e8
3
+ metadata.gz: fda219195a03f0fb380dbecb39b7868bc6dc2451
4
+ data.tar.gz: f7d78090632fc8e1e3f70ffcae1dd299b289b849
5
5
  SHA512:
6
- metadata.gz: 20da49ead628319cb2732126191dce97ff374a716185f3223dad0b30a577530ead58751d5d704c7ca5e8690d6b3f2d680d4c113a806706f08641d643dfba9d96
7
- data.tar.gz: e0fde4e9f08d48050af04dad593b35b2ae3eb4150a55734cac2056de1453951d41540bb41e229812bd44140935225102e5808e284153407c66a85ef204990ca6
6
+ metadata.gz: c1bdf0fdb346bbf1cfcd64bfad68684b8949b11aa6f2b8ec91ab0ac7b59c6f4ea5a2c4ded5d55a1821546460c0bece8c430937dd42239dbe9822917ae25edb06
7
+ data.tar.gz: 5aebf309f608d7d5a14570820d738b9f59f083feb23e892db339b5194d7584962e11088c8bebdaefb59920420f03c59a8bca157cec05a46db9a7061e0d5efaf7
@@ -1,3 +1,7 @@
1
+ **Version 0.2.4** - *2018-05-14*
2
+
3
+ - Content length calculated by bytesize
4
+
1
5
  **Version 0.2.3** - *2017-07-13*
2
6
 
3
7
  - Thread safe for some web servers
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'asset'
3
- s.version = '0.2.3'
4
- s.date = '2017-07-13'
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"]
@@ -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.size,
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.size}, [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.3
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: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack