svg_sprite 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/svg_sprite/svg.rb +6 -2
- data/lib/svg_sprite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 211515d3e3988cbb9ae4e8046b49e922fed1f16f
|
4
|
+
data.tar.gz: 997cc7fd62d49555fd30265d4d579a434e2815b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a994a3e1fc66dbdd450b78e3b9b696b1f29f3a202a5771405d84437b4bd75c8287fe586d1e77f1f57ab9e0d722d33eb810300be777c60693cc82b98ccf50ae75
|
7
|
+
data.tar.gz: 932c235f1862caedfc0002e566c66acc4058ae60569cbb34f0c9a35f1aa849e5bb7e21651408620c9166dac3b31f2350b16d08cde5a4832fb2782a041c6f6b01
|
data/lib/svg_sprite/svg.rb
CHANGED
@@ -23,12 +23,12 @@ module SvgSprite
|
|
23
23
|
|
24
24
|
# Return the <svg>'s width.
|
25
25
|
def width
|
26
|
-
svg["width"]
|
26
|
+
"#{svg["width"]}#{ensure_unit(svg["width"])}"
|
27
27
|
end
|
28
28
|
|
29
29
|
# Return the <svg>'s height.
|
30
30
|
def height
|
31
|
-
svg["height"]
|
31
|
+
"#{svg["height"]}#{ensure_unit(svg["height"])}"
|
32
32
|
end
|
33
33
|
|
34
34
|
# Return the raw content. This content is not optimized by svg_optimizer.
|
@@ -70,5 +70,9 @@ module SvgSprite
|
|
70
70
|
def encoding
|
71
71
|
Encoding.default_external.name
|
72
72
|
end
|
73
|
+
|
74
|
+
private def ensure_unit(number)
|
75
|
+
return "px" if number =~ /\A\d+\z/
|
76
|
+
end
|
73
77
|
end
|
74
78
|
end
|
data/lib/svg_sprite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svg_sprite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: svg_optimizer
|