esvg 1.1.0 → 1.1.1

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: 2c5712f3b740b3238193d1d2ef3d2babd708e8be
4
- data.tar.gz: 9d04de7f13bd73bd42d72dcda666894a74bd89d0
3
+ metadata.gz: bc49e968dc9968f8fe72bae00d4efcbb8e1e4e52
4
+ data.tar.gz: 428208a9c3c9426a199361c225e7e6625234ac40
5
5
  SHA512:
6
- metadata.gz: 81f741e63a224d7385f574e7406f5898240bc0ba6f11083c2f5a35d0d9a33887a1d60f7bda7fe0d2f217cc8488ee01b3e8dcebd3c629deb27542fc6979cbd376
7
- data.tar.gz: 82279d2eedce5e102b124fe63ba8f0a98da2a207aaaba018b7ff2b446a3e873ca30b060e0b827e39797c72f9c32259030ea3c8c56c2c755d439e1ed0f0615db4
6
+ metadata.gz: 9f59e82c496aeed8819c3e2a8e953d17b682d5f99ae578a9dd576fbc3c875ab76d0db3a0f7988c9a9112759a282f1c8912c3745769285332328a7fa7802e61e2
7
+ data.tar.gz: 26ba8e38c78eb82e7861a847bc31a5f0601dcf231ea7fb99cee4befc99062887e8d65167b5365eb1776b5fef45a43c10dfefc113cbe11f220c3ad07ddd45696b
@@ -1,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.1.1 (2015-06-29)
4
+
5
+ - Fix: Moved methods from Esvg module to SVG class. Oops.
6
+
3
7
  ### 1.1.0 (2015-06-29)
4
8
 
5
- - Now `embed_svgs` accepts an array, allowing a subset of icons to be embedded per page.
9
+ - New `embed_svgs` accepts an array, allowing a subset of icons to be embedded per page.
6
10
 
7
11
  ## 1.0.0 (2015-06-29)
8
12
 
@@ -27,25 +27,11 @@ module Esvg
27
27
  end
28
28
 
29
29
  def svg_icon(name, options={})
30
- name = icons.icon_name(name)
31
- %Q{<svg class="icon #{name} #{options[:class] || ""}"><use xlink:href="##{name}"/>#{title(options)}#{desc(options)}</svg>}.html_safe
30
+ icons.svg_icon(name, options)
32
31
  end
33
32
 
34
33
  def rails?
35
34
  defined?(Rails)
36
35
  end
37
36
 
38
- private
39
-
40
- def title(options)
41
- if options[:title]
42
- "<title>#{options[:title]}</title>"
43
- end
44
- end
45
-
46
- def desc(options)
47
- if options[:desc]
48
- "<desc>#{options[:desc]}</desc>"
49
- end
50
- end
51
37
  end
@@ -1,6 +1,6 @@
1
1
  module Esvg::Helpers
2
2
  def embed_svgs(names=[])
3
- Esvg.embed_svgs(Array(names))
3
+ Esvg.embed_svgs(names)
4
4
  end
5
5
 
6
6
  def svg_icon(name, options={})
@@ -119,6 +119,18 @@ module Esvg
119
119
  %Q{<svg class="#{config[:base_class]} #{name} #{options[:class] || ""}"><use xlink:href="##{name}"/>#{title(options)}#{desc(options)}</svg>}.html_safe
120
120
  end
121
121
 
122
+ def title(options)
123
+ if options[:title]
124
+ "<title>#{options[:title]}</title>"
125
+ end
126
+ end
127
+
128
+ def desc(options)
129
+ if options[:desc]
130
+ "<desc>#{options[:desc]}</desc>"
131
+ end
132
+ end
133
+
122
134
  def config(options={})
123
135
  @config ||= begin
124
136
  paths = [options[:config_file], 'config/esvg.yml', 'esvg.yml'].compact
@@ -1,3 +1,3 @@
1
1
  module Esvg
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esvg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis