rasterday 0.1.0 → 0.1.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README +6 -1
  3. data/lib/rasterday.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6aae4a8ec41b12d5fa5ea3d789619cc8384d0e36
4
- data.tar.gz: 6206d66cfcc8d9b9135590fbf8c8451ef833be07
3
+ metadata.gz: cfcb54f906b057c92bcef6ca293fa5ddf1195c51
4
+ data.tar.gz: b96cf98c25c21146a20d34600fb962f04e654fe7
5
5
  SHA512:
6
- metadata.gz: b1b2931de1a1f55271e87a1091ec69805a4329f8e92288ada48df6f607fb1c48126448c9c3db66bb725ccb3b80a6aa12670dbcd8d4cd2dd89ff1bf0a95f1f441
7
- data.tar.gz: 25e5da0d325b63772d410b2c108c897a9cbda5032abd651920a1d57756c2e3deb4bd0279299c39fc65354589fec135dade8c90a4231be2888b57a5feb308ecb4
6
+ metadata.gz: 30a9df10d86e0916965ab9c21b5a9ffb869845c72c97250d3304a29eb165127d58052724bd19dfab9750587be567a6b444b7307f83e0e33b031c0a7accb943fc
7
+ data.tar.gz: aa1cb89e8661bd707ee764c195c367e3a5348e7b66fa5ae1db05418a88a53ec65b4f669b0e42c3e344d988b6f1f72700e1b2cf68d8d7b105dba878cd91a2276a
data/README CHANGED
@@ -1,4 +1,9 @@
1
- The short answer is to put this in your config.ru so that it can intercept SVG
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
 
@@ -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.0
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-16 00:00:00.000000000 Z
11
+ date: 2014-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick