jekyll-inline-svg 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -15
- data/jekyll-inline-svg.gemspec +1 -1
- data/lib/jekyll-inline-svg.rb +1 -1
- data/spec/fixtures/index.html +3 -0
- data/spec/jekyll-inline-svg_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71aed70353a552101f603465c9171bda0aacf0b47c81875e0df4915194f70b2c
|
4
|
+
data.tar.gz: ce5302aef4d1ed320f72c2778981b9dc0bcc77c2662a23128d20184d6bbd6f22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735fb13dfa5a512fbf7f61493b024209748b2823f4f66ad0d5d49b674a6c944267590ac2f71168c9c6ba7a275ae1cd743c1dd85ce9d73a0b562231f409051e55
|
7
|
+
data.tar.gz: f7fb0ff7b992621e1fca5dde512459764f021f0f0c626af83e60085bcccd4924cca345a00bf97a75ebf2fd0a3eabbe5f1f6c77069a9b85c8afd4d430f0962207
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jekyll-inline-svg (1.
|
4
|
+
jekyll-inline-svg (1.1.2)
|
5
5
|
jekyll (~> 3.3)
|
6
6
|
svg_optimizer (= 0.1.0)
|
7
7
|
|
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
addressable (2.5.2)
|
12
12
|
public_suffix (>= 2.0.2, < 4.0)
|
13
13
|
colorator (1.1.0)
|
14
|
-
concurrent-ruby (1.
|
14
|
+
concurrent-ruby (1.1.4)
|
15
15
|
diff-lcs (1.3)
|
16
16
|
em-websocket (0.5.1)
|
17
17
|
eventmachine (>= 0.12.9)
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
http_parser.rb (0.6.0)
|
23
23
|
i18n (0.9.5)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
|
-
jekyll (3.8.
|
25
|
+
jekyll (3.8.5)
|
26
26
|
addressable (~> 2.4)
|
27
27
|
colorator (~> 1.0)
|
28
28
|
em-websocket (~> 0.5)
|
@@ -37,26 +37,26 @@ GEM
|
|
37
37
|
safe_yaml (~> 1.0)
|
38
38
|
jekyll-sass-converter (1.5.2)
|
39
39
|
sass (~> 3.4)
|
40
|
-
jekyll-watch (2.
|
40
|
+
jekyll-watch (2.1.2)
|
41
41
|
listen (~> 3.0)
|
42
42
|
kramdown (1.17.0)
|
43
|
-
liquid (4.0.
|
43
|
+
liquid (4.0.1)
|
44
44
|
listen (3.1.5)
|
45
45
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
46
46
|
rb-inotify (~> 0.9, >= 0.9.7)
|
47
47
|
ruby_dep (~> 1.2)
|
48
48
|
mercenary (0.3.6)
|
49
|
-
mini_portile2 (2.
|
50
|
-
nokogiri (1.
|
51
|
-
mini_portile2 (~> 2.
|
52
|
-
pathutil (0.16.
|
49
|
+
mini_portile2 (2.4.0)
|
50
|
+
nokogiri (1.10.0)
|
51
|
+
mini_portile2 (~> 2.4.0)
|
52
|
+
pathutil (0.16.2)
|
53
53
|
forwardable-extended (~> 2.6)
|
54
|
-
public_suffix (3.0.
|
54
|
+
public_suffix (3.0.3)
|
55
55
|
rake (12.0.0)
|
56
56
|
rb-fsevent (0.10.3)
|
57
|
-
rb-inotify (0.
|
58
|
-
ffi (
|
59
|
-
rouge (3.
|
57
|
+
rb-inotify (0.10.0)
|
58
|
+
ffi (~> 1.0)
|
59
|
+
rouge (3.3.0)
|
60
60
|
rspec (3.6.0)
|
61
61
|
rspec-core (~> 3.6.0)
|
62
62
|
rspec-expectations (~> 3.6.0)
|
@@ -72,7 +72,7 @@ GEM
|
|
72
72
|
rspec-support (3.6.0)
|
73
73
|
ruby_dep (1.5.0)
|
74
74
|
safe_yaml (1.0.4)
|
75
|
-
sass (3.
|
75
|
+
sass (3.7.2)
|
76
76
|
sass-listen (~> 4.0.0)
|
77
77
|
sass-listen (4.0.0)
|
78
78
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
@@ -90,4 +90,4 @@ DEPENDENCIES
|
|
90
90
|
rspec (~> 3.6)
|
91
91
|
|
92
92
|
BUNDLED WITH
|
93
|
-
1.
|
93
|
+
1.17.1
|
data/jekyll-inline-svg.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
A Liquid tag to inline and optimize SVG images in your HTML
|
8
8
|
Supports custom DOM Attributes parameters and variables interpretation.
|
9
9
|
EOF
|
10
|
-
spec.version = "1.1.
|
10
|
+
spec.version = "1.1.3"
|
11
11
|
spec.authors = ["Sebastien DUMETZ"]
|
12
12
|
spec.email = "s.dumetz@holusion.com"
|
13
13
|
spec.homepage = "https://github.com/sdumetz/jekyll-inline-svg"
|
data/lib/jekyll-inline-svg.rb
CHANGED
@@ -19,7 +19,7 @@ module Jekyll
|
|
19
19
|
include Jekyll::LiquidExtensions
|
20
20
|
|
21
21
|
# For interpoaltion, look for liquid variables
|
22
|
-
VARIABLE = /\{\{\s*([\w]
|
22
|
+
VARIABLE = /\{\{\s*([\w.\-]+)\s*\}\}/i
|
23
23
|
|
24
24
|
#Separate file path from other attributes
|
25
25
|
PATH_SYNTAX = %r!
|
data/spec/fixtures/index.html
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
svgname: square
|
3
|
+
foo-bar: "hyphens-var-test"
|
3
4
|
svgclass: hello
|
4
5
|
---
|
5
6
|
Hello world
|
@@ -31,6 +32,8 @@ Hello world
|
|
31
32
|
<label>Interpret embedded variables</label>
|
32
33
|
{% svg /files/{{page.svgname}}.svg %}
|
33
34
|
{% svg /files/square.svg id="name-{{page.svgname}}" class="class-{{page.svgclass}}" %}
|
35
|
+
{% svg /files/square.svg id="test-hyphens" class="{{page.foo-bar}}" %}
|
36
|
+
|
34
37
|
</div>
|
35
38
|
|
36
39
|
<div id="optimize">
|
@@ -115,10 +115,11 @@ describe(Jekyll::Tags::JekyllInlineSvg) do
|
|
115
115
|
it "interpret variables" do
|
116
116
|
data = @data.css("#interpret").css("svg")
|
117
117
|
ref = @base.to_xml
|
118
|
-
expect(data.size).to eq(
|
118
|
+
expect(data.size).to eq(3)
|
119
119
|
expect(data[0].to_xml).to eql(ref)
|
120
120
|
expect(data[1].get_attribute("id")).to eql("name-square")
|
121
121
|
expect(data[1].get_attribute("class")).to eql("class-hello")
|
122
|
+
expect(data[2].get_attribute("class")).to eql("hyphens-var-test")
|
122
123
|
end
|
123
124
|
it "#{is_opt ? "do" : "do not"} optimize" do
|
124
125
|
data = @data.css("#optimize").css("svg")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-inline-svg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien DUMETZ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|