esvg 2.8.3 → 2.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3c75eeb77428c51bc4e6746328c9e8749b853d6
4
- data.tar.gz: 258aa171b7119d73f4d744770986d075b21a3375
3
+ metadata.gz: 468b3fb08ada71648f16dff2f0e19da9de03692f
4
+ data.tar.gz: 7a071595ad25d2291ffe390b3bbe2028b5537640
5
5
  SHA512:
6
- metadata.gz: 9768ae503d3368438f470917b7740d592f2f679c8681fcbc9d50f3cea7c316a691e2286e68d1d3e0f0cceee59ab6d833df5b93a7dc19197f3fd56fefa68611b3
7
- data.tar.gz: a6eb7131c5168194727cc4e8f6894284fbd551d95b5bf334dfbd99e9548d4878df13cb65772a84ec6eea075aaf611ea2ef15655d42eee234ef5af5f8b7196772
6
+ metadata.gz: 9230646069356e4d2cec172eeb05b31254c6930c02c252a2ea747c9b8dc01337dfb6a901297cd08d581295c34c0c465b69001d766cdee8f7e1c11fe2a1e9036f
7
+ data.tar.gz: e60a28a62d51d499c47fcf8ebfbbf2ffb2c38a71728ad52329d9acc788b062370764e04b260a03558bf8f957b5070b4640b1a711a0c30cb47221b66aa7413ca2
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 2.8.4 (2016-01-05)
4
+ - Fix: Dasherize file names to avoid inconsistencies with underscores or dashes in filenames.
5
+ - Minor test improvements.
6
+
3
7
  ### 2.8.3 (2016-01-04)
4
8
  - Fix: file read throttling
5
9
  - Fix: Caching for Rails helper
@@ -159,8 +159,9 @@ module Esvg
159
159
  end
160
160
 
161
161
  def svg_icon(file, options={})
162
+ name = dasherize(file)
162
163
 
163
- if !exist?(file)
164
+ if !exist?(name)
164
165
  if fallback = options.delete(:fallback)
165
166
  svg_icon(fallback, options)
166
167
  else
@@ -172,7 +173,7 @@ module Esvg
172
173
  end
173
174
  else
174
175
 
175
- embed = use_icon(file)
176
+ embed = use_icon(name)
176
177
  embed = embed.sub(/class="(.+?)"/, 'class="\1 '+options[:class]+'"') if options[:class]
177
178
 
178
179
  if options[:style]
@@ -1,3 +1,3 @@
1
1
  module Esvg
2
- VERSION = "2.8.3"
2
+ VERSION = "2.8.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esvg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.3
4
+ version: 2.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-04 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler