esvg 4.1.6 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/esvg +1 -1
- data/lib/esvg/helpers.rb +3 -27
- data/lib/esvg/svg-old.rb +717 -0
- data/lib/esvg/svg.rb +48 -696
- data/lib/esvg/svgs.rb +320 -0
- data/lib/esvg/symbol.rb +249 -0
- data/lib/esvg/utils.rb +52 -0
- data/lib/esvg/version.rb +1 -1
- data/lib/esvg.rb +62 -3
- metadata +6 -3
- data/lib/esvg/symbols.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e72d63ad2c2cfef588743462ff62a67dafa89223
|
4
|
+
data.tar.gz: 17be6a677e527aa9f510b70814e7917856ebfc19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25445968d27bf910caa4931d703536a11cf059925bdb6ec134b8a7685d06fc80de19d36a475888cc4d0863d99b7f61edacfb4842e38cc8bb43eca225e05202b4
|
7
|
+
data.tar.gz: 8a35b1ab01151de2de062bd20847cf5f4f58974d9f51a44274fe286f2781afa8477553a75918057df96d82add97fa3ac703402c397ab4018eb9be39cd46a8953
|
data/exe/esvg
CHANGED
data/lib/esvg/helpers.rb
CHANGED
@@ -1,36 +1,12 @@
|
|
1
1
|
module Esvg::Helpers
|
2
2
|
|
3
|
-
def esvg
|
4
|
-
svgs = Esvg.svgs || Esvg.new()
|
5
|
-
|
6
|
-
svgs.read_files if Rails.env.development?
|
7
|
-
|
8
|
-
svgs
|
9
|
-
end
|
10
|
-
|
11
|
-
|
12
3
|
def embed_svgs(*keys)
|
13
|
-
|
14
|
-
esvg.build_paths(keys).map do |path|
|
15
|
-
javascript_include_tag(path)
|
16
|
-
end.join("\n").html_safe
|
17
|
-
else
|
18
|
-
esvg.embed_script(keys).html_safe
|
19
|
-
end
|
4
|
+
Esvg.embed(keys)
|
20
5
|
end
|
21
6
|
|
22
7
|
def use_svg(name, options={}, &block)
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def use_svg_with_files(files, name, options, &block)
|
29
|
-
|
30
|
-
if block_given?
|
31
|
-
options[:content] = capture(&block)
|
32
|
-
end
|
8
|
+
options[:content] = capture(&block).html_safe if block_given?
|
33
9
|
|
34
|
-
|
10
|
+
Esvg.use(name, options)
|
35
11
|
end
|
36
12
|
end
|