esvg 4.2.4 → 4.2.5

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: 1381c5860ef655f9a00182855cd1b3000a04ca60
4
- data.tar.gz: a01013c3fcc860731af45ce62cf03b7e684f4150
3
+ metadata.gz: 090e8ae35b7794a277519a8430f4bc713f570e03
4
+ data.tar.gz: acc98374a8c3a8c3f67e97158a59e3d5e532bde4
5
5
  SHA512:
6
- metadata.gz: db44e7974abca942acf1e1ef096c1d8ebabae7a2c61e28dba86fdf58082d563b005328924aecef3ffbfef954388ca1459198b960ace849e271423a7a4c90d6c7
7
- data.tar.gz: 69d1a74e01b6d8c640a7828b51ab74ec383ac61f401aaab636ec7775fc509a8fbd8c4638d061f5f0139c0707ee7096d7fbc172df0afb15c74ec525f12f8991cf
6
+ metadata.gz: a7d301d33ccb35f27b5167b3b85d2c6538f85bde71e5cbe7b8a0f1d0d1597e8e44d65f1ee634434b52cf1767c4694b8353e0514a6c1120281e4febe9e0a4ab84
7
+ data.tar.gz: 08c58866f0f855ca1244815f17389c0cf82dd8cdf8db4113a4aedd90c9a2174acd9deefb97b46af57a31d22040af9474b36699d40112a597c17d00f151290275
@@ -36,13 +36,7 @@ module Esvg
36
36
  end
37
37
 
38
38
  def embed(names=nil)
39
- if rails? && Rails.env.production?
40
- html_safe build_paths(names).each do |path|
41
- javascript_include_tag(path, async: true)
42
- end.join("\n")
43
- else
44
- html_safe find_svgs(names).map{|s| s.embed_script(names) }.join
45
- end
39
+ html_safe find_svgs(names).map{|s| s.embed_script(names) }.join
46
40
  end
47
41
 
48
42
  def build_paths(names=nil)
@@ -1,7 +1,11 @@
1
1
  module Esvg::Helpers
2
2
 
3
3
  def embed_svgs(*keys)
4
- Esvg.embed(keys)
4
+ if Rails.env.production?
5
+ Esvg.build_paths(keys).map { |path| javascript_include_tag(path, async: true) }.join("\n").html_safe
6
+ else
7
+ Esvg.embed(keys)
8
+ end
5
9
  end
6
10
 
7
11
  def use_svg(name, options={}, &block)
@@ -1,3 +1,3 @@
1
1
  module Esvg
2
- VERSION = "4.2.4"
2
+ VERSION = "4.2.5"
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: 4.2.4
4
+ version: 4.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-31 00:00:00.000000000 Z
11
+ date: 2017-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler