rasterday 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +6 -1
- data/lib/rasterday.rb +1 -1
- 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: cfcb54f906b057c92bcef6ca293fa5ddf1195c51
|
4
|
+
data.tar.gz: b96cf98c25c21146a20d34600fb962f04e654fe7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30a9df10d86e0916965ab9c21b5a9ffb869845c72c97250d3304a29eb165127d58052724bd19dfab9750587be567a6b444b7307f83e0e33b031c0a7accb943fc
|
7
|
+
data.tar.gz: aa1cb89e8661bd707ee764c195c367e3a5348e7b66fa5ae1db05418a88a53ec65b4f669b0e42c3e344d988b6f1f72700e1b2cf68d8d7b105dba878cd91a2276a
|
data/README
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
|
1
|
+
Rasterday is a piece of Rack middleware to let you use SVGs transparently, even
|
2
|
+
in the face of browsers that hate SVGs. It does this by conditionally
|
3
|
+
translating your application's SVG images to GIFs or PNGs when it thinks the
|
4
|
+
browser won't handle the SVG properly, or on a trigger you specify.
|
5
|
+
|
6
|
+
The short version is to put this in your config.ru so that it can intercept SVG
|
2
7
|
images that come back from anything deeper in the stack (e.g., your application,
|
3
8
|
or Rack::Static, or similar).
|
4
9
|
|
data/lib/rasterday.rb
CHANGED
@@ -94,7 +94,7 @@ class Rasterday
|
|
94
94
|
def bad_browsers(env, *)
|
95
95
|
ua = env['HTTP_USER_AGENT']
|
96
96
|
# IE hates SVGs:
|
97
|
-
return true if ua.include?('MSIE')
|
97
|
+
return true if ua.include?('MSIE') || ua.include?('Trident/')
|
98
98
|
# Older versions of Firefox:
|
99
99
|
ff = /Firefox\/(\d+(\.\d+))/.match(ua)
|
100
100
|
if ff != nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasterday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Elmore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmagick
|