jekyll-drawio 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-drawio/version.rb +1 -1
- data/lib/jekyll-drawio.rb +5 -3
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97d28b88662422e5a90c85b6b01faf9195cdd9041ae302dafb55fff94ddfe101
|
4
|
+
data.tar.gz: a822c03eef5073e26e7d494e3b60c9c6b0ee1bea8d0fcbe922d4a02fb30e9539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af7f6f4063834fee805f7c2b541a98eee83cc95cf2347028d20120280a69277004b003159d32c1be29d74cb3ae5317c7dff374d941785f21b7de7a6cad29345e
|
7
|
+
data.tar.gz: 5c9e365bfef257cd8164f258b1cb97d87e0d16db5f56f96b1661ed1907ffd33fc79ebfdabe5d27c0ebc02b18c00a77c5a83550a751e440f2e5cd2f4cca03d365
|
data/lib/jekyll-drawio.rb
CHANGED
@@ -31,12 +31,12 @@ class DrawIOConverter < Liquid::Tag
|
|
31
31
|
doc = File.open(path) { |f| Nokogiri::XML(f) }
|
32
32
|
diagrams = doc.xpath("//mxfile//diagram")
|
33
33
|
puts "Diagrams found at \"#{ path }\": #{ diagrams.length }. " \
|
34
|
-
"Selected: #{ @selected_diagram_num }. "
|
35
|
-
|
34
|
+
"Selected: #{ @selected_diagram_num }. "
|
35
|
+
|
36
36
|
diagram = diagrams[selected_diagram_num]
|
37
37
|
|
38
38
|
diagram_name = diagram["name"]
|
39
|
-
diagram_content = diagram.content
|
39
|
+
diagram_content = diagram.content.to_s
|
40
40
|
|
41
41
|
return diagram_name, diagram_content
|
42
42
|
end
|
@@ -46,6 +46,8 @@ class DrawIOConverter < Liquid::Tag
|
|
46
46
|
encoded_diagram = ERB::Util.url_encode diagram_content
|
47
47
|
encoded_diagram_name = ERB::Util.url_encode diagram_name
|
48
48
|
|
49
|
+
puts "Parsed diagram: name=#{ diagram_name } length=#{ diagram_content.length } height=#{ @diagram_height }"
|
50
|
+
|
49
51
|
viewer_url_base = "https://viewer.diagrams.net/?highlight=0000ff&edit=_blank&layers=1&nav=1"
|
50
52
|
viewer_url = "#{ viewer_url_base }&title=#{ encoded_diagram_name }\#R#{ encoded_diagram }"
|
51
53
|
viewer_style = "style=\"width:100%;height:#{ @diagram_height }px\""
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-drawio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Illia Gorbatiuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3
|
19
|
+
version: '4.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3
|
26
|
+
version: '4.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.14'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.14'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: erb
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '4.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '4.0'
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- ilya.gorbatiuk@gmail.com
|
@@ -82,8 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
|
86
|
-
rubygems_version: 2.7.6
|
85
|
+
rubygems_version: 3.2.3
|
87
86
|
signing_key:
|
88
87
|
specification_version: 4
|
89
88
|
summary: Jekyll plugin to generate HTML snippets for embedding draw.io diagrams
|