jekyll-diagrams 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -20
- data/features/blockdiag.feature +1 -2
- data/features/graphviz.feature +58 -6
- data/features/mermaid.feature +1 -2
- data/features/nomnoml.feature +2 -22
- data/features/plantuml.feature +17 -8
- data/features/smcat.feature +10 -15
- data/features/support/env.rb +11 -5
- data/features/syntrax.feature +1 -2
- data/features/vega.feature +24 -12
- data/features/wavedrom.feature +2 -8
- data/lib/jekyll-diagrams.rb +64 -1
- data/lib/jekyll-diagrams/block.rb +33 -8
- data/lib/jekyll-diagrams/blockdiag.rb +8 -6
- data/lib/jekyll-diagrams/erd.rb +7 -1
- data/lib/jekyll-diagrams/errors.rb +25 -0
- data/lib/jekyll-diagrams/graphviz.rb +2 -1
- data/lib/jekyll-diagrams/mermaid.rb +4 -5
- data/lib/jekyll-diagrams/nomnoml.rb +2 -2
- data/lib/jekyll-diagrams/plantuml.rb +3 -4
- data/lib/jekyll-diagrams/rendering.rb +67 -0
- data/lib/jekyll-diagrams/smcat.rb +2 -2
- data/lib/jekyll-diagrams/vega.rb +3 -1
- data/lib/jekyll-diagrams/version.rb +1 -1
- data/test/block_test.rb +6 -0
- data/test/blockdiag_test.rb +28 -0
- data/test/erd_test.rb +5 -2
- data/test/rendering_test.rb +20 -0
- data/test/svgbob_test.rb +22 -0
- data/test/test_helper.rb +12 -3
- metadata +118 -39
- data/.coveralls.yml +0 -1
- data/.github/workflows/test.yml +0 -83
- data/.gitignore +0 -4
- data/.rubocop.yml +0 -22
- data/.simplecov +0 -5
- data/.travis.yml +0 -50
- data/Dockerfile +0 -53
- data/Gemfile +0 -8
- data/Rakefile +0 -28
- data/features/svgbob.feature +0 -22
- data/jekyll-diagrams.gemspec +0 -31
- data/lib/jekyll-diagrams/util.rb +0 -95
- data/test/util_test.rb +0 -20
data/test/svgbob_test.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class SvgbobTest < Minitest::Test
|
6
|
+
def setup
|
7
|
+
@block = Jekyll::Diagrams::SvgbobBlock.parse(
|
8
|
+
'svgbob',
|
9
|
+
'',
|
10
|
+
Liquid::Tokenizer.new('test {% endsvgbob %}'),
|
11
|
+
Liquid::ParseContext.new
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_build_command_with_default_config
|
16
|
+
config = {}
|
17
|
+
assert_equal 'svgbob', @block.build_command(config)
|
18
|
+
|
19
|
+
config = { 'scale' => '2' }
|
20
|
+
assert_match '--scale 2', @block.build_command(config)
|
21
|
+
end
|
22
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -3,11 +3,20 @@
|
|
3
3
|
lib = File.expand_path('../lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
# Don't use coveralls in Github Actions
|
7
|
+
unless ENV['GITHUB_ACTIONS']
|
8
|
+
require 'coveralls'
|
9
|
+
Coveralls.wear!
|
10
|
+
end
|
8
11
|
|
9
12
|
require 'minitest/autorun'
|
10
13
|
|
11
14
|
require 'fileutils'
|
12
|
-
require 'jekyll'
|
13
15
|
require 'jekyll-diagrams'
|
16
|
+
|
17
|
+
# Mocking this method for testing
|
18
|
+
class Jekyll::Diagrams::Block
|
19
|
+
def render_with_command(command, _output = :stdout, **_options)
|
20
|
+
command
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-diagrams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zhustec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.8'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '5.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '3.
|
29
|
+
version: '3.8'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5.0'
|
@@ -36,75 +36,150 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 1.15.0
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '3.0'
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.15.0
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '3.0'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: coveralls
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0.8'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.0'
|
40
63
|
type: :development
|
41
64
|
prerelease: false
|
42
65
|
version_requirements: !ruby/object:Gem::Requirement
|
43
66
|
requirements:
|
44
67
|
- - ">="
|
45
68
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0'
|
69
|
+
version: '0.8'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '1.0'
|
47
73
|
- !ruby/object:Gem::Dependency
|
48
74
|
name: cucumber
|
49
75
|
requirement: !ruby/object:Gem::Requirement
|
50
76
|
requirements:
|
51
77
|
- - ">="
|
52
78
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
79
|
+
version: '3.0'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.0'
|
54
83
|
type: :development
|
55
84
|
prerelease: false
|
56
85
|
version_requirements: !ruby/object:Gem::Requirement
|
57
86
|
requirements:
|
58
87
|
- - ">="
|
59
88
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
89
|
+
version: '3.0'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '4.0'
|
61
93
|
- !ruby/object:Gem::Dependency
|
62
94
|
name: minitest
|
63
95
|
requirement: !ruby/object:Gem::Requirement
|
64
96
|
requirements:
|
65
|
-
- - "
|
97
|
+
- - ">="
|
66
98
|
- !ruby/object:Gem::Version
|
67
|
-
version: '5.
|
99
|
+
version: '5.10'
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '6.0'
|
68
103
|
type: :development
|
69
104
|
prerelease: false
|
70
105
|
version_requirements: !ruby/object:Gem::Requirement
|
71
106
|
requirements:
|
72
|
-
- - "
|
107
|
+
- - ">="
|
73
108
|
- !ruby/object:Gem::Version
|
74
|
-
version: '5.
|
109
|
+
version: '5.10'
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '6.0'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: pry
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0.10'
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '1.0'
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0.10'
|
130
|
+
- - "<"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '1.0'
|
75
133
|
- !ruby/object:Gem::Dependency
|
76
134
|
name: rake
|
77
135
|
requirement: !ruby/object:Gem::Requirement
|
78
136
|
requirements:
|
79
137
|
- - ">="
|
80
138
|
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
139
|
+
version: '12.0'
|
140
|
+
- - "<"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '14.0'
|
82
143
|
type: :development
|
83
144
|
prerelease: false
|
84
145
|
version_requirements: !ruby/object:Gem::Requirement
|
85
146
|
requirements:
|
86
147
|
- - ">="
|
87
148
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
149
|
+
version: '12.0'
|
150
|
+
- - "<"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '14.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.70'
|
160
|
+
- - "<"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '1.0'
|
163
|
+
type: :development
|
164
|
+
prerelease: false
|
165
|
+
version_requirements: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0.70'
|
170
|
+
- - "<"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '1.0'
|
89
173
|
description: |
|
90
|
-
Jekyll
|
91
|
-
PlantUML and
|
174
|
+
A Jekyll plugin with support for Blockdiag, Erd, GraphViz, Mermaid,
|
175
|
+
Nomnoml, PlantUML, Svgbob, Syntrax, Vega, Vega-Lite and WaveDrom.
|
92
176
|
email: zhustec@foxmail.com
|
93
177
|
executables: []
|
94
178
|
extensions: []
|
95
179
|
extra_rdoc_files: []
|
96
180
|
files:
|
97
|
-
- ".coveralls.yml"
|
98
|
-
- ".github/workflows/test.yml"
|
99
|
-
- ".gitignore"
|
100
|
-
- ".rubocop.yml"
|
101
|
-
- ".simplecov"
|
102
|
-
- ".travis.yml"
|
103
|
-
- Dockerfile
|
104
|
-
- Gemfile
|
105
181
|
- LICENSE
|
106
182
|
- README.md
|
107
|
-
- Rakefile
|
108
183
|
- features/blockdiag.feature
|
109
184
|
- features/graphviz.feature
|
110
185
|
- features/mermaid.feature
|
@@ -113,29 +188,31 @@ files:
|
|
113
188
|
- features/smcat.feature
|
114
189
|
- features/step_definitions/jekyll-diagrams.rb
|
115
190
|
- features/support/env.rb
|
116
|
-
- features/svgbob.feature
|
117
191
|
- features/syntrax.feature
|
118
192
|
- features/vega.feature
|
119
193
|
- features/wavedrom.feature
|
120
|
-
- jekyll-diagrams.gemspec
|
121
194
|
- lib/jekyll-diagrams.rb
|
122
195
|
- lib/jekyll-diagrams/block.rb
|
123
196
|
- lib/jekyll-diagrams/blockdiag.rb
|
124
197
|
- lib/jekyll-diagrams/erd.rb
|
198
|
+
- lib/jekyll-diagrams/errors.rb
|
125
199
|
- lib/jekyll-diagrams/graphviz.rb
|
126
200
|
- lib/jekyll-diagrams/mermaid.rb
|
127
201
|
- lib/jekyll-diagrams/nomnoml.rb
|
128
202
|
- lib/jekyll-diagrams/plantuml.rb
|
203
|
+
- lib/jekyll-diagrams/rendering.rb
|
129
204
|
- lib/jekyll-diagrams/smcat.rb
|
130
205
|
- lib/jekyll-diagrams/svgbob.rb
|
131
206
|
- lib/jekyll-diagrams/syntrax.rb
|
132
|
-
- lib/jekyll-diagrams/util.rb
|
133
207
|
- lib/jekyll-diagrams/vega.rb
|
134
208
|
- lib/jekyll-diagrams/version.rb
|
135
209
|
- lib/jekyll-diagrams/wavedrom.rb
|
210
|
+
- test/block_test.rb
|
211
|
+
- test/blockdiag_test.rb
|
136
212
|
- test/erd_test.rb
|
213
|
+
- test/rendering_test.rb
|
214
|
+
- test/svgbob_test.rb
|
137
215
|
- test/test_helper.rb
|
138
|
-
- test/util_test.rb
|
139
216
|
- vendor/mermaid_puppeteer_config.json
|
140
217
|
- vendor/plantuml.1.2020.1.jar
|
141
218
|
homepage: https://github.com/zhustec/jekyll-diagrams
|
@@ -150,7 +227,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
227
|
requirements:
|
151
228
|
- - ">="
|
152
229
|
- !ruby/object:Gem::Version
|
153
|
-
version: '
|
230
|
+
version: '2.5'
|
154
231
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
232
|
requirements:
|
156
233
|
- - ">="
|
@@ -160,20 +237,22 @@ requirements: []
|
|
160
237
|
rubygems_version: 3.1.2
|
161
238
|
signing_key:
|
162
239
|
specification_version: 4
|
163
|
-
summary: Jekyll plugins for diagrams support
|
240
|
+
summary: Jekyll plugins for diagrams support.
|
164
241
|
test_files:
|
165
|
-
- features/blockdiag.feature
|
166
242
|
- features/graphviz.feature
|
167
243
|
- features/mermaid.feature
|
168
|
-
- features/
|
169
|
-
- features/plantuml.feature
|
170
|
-
- features/smcat.feature
|
244
|
+
- features/blockdiag.feature
|
171
245
|
- features/step_definitions/jekyll-diagrams.rb
|
172
|
-
- features/support/env.rb
|
173
|
-
- features/svgbob.feature
|
174
246
|
- features/syntrax.feature
|
175
|
-
- features/
|
247
|
+
- features/nomnoml.feature
|
176
248
|
- features/wavedrom.feature
|
249
|
+
- features/vega.feature
|
250
|
+
- features/support/env.rb
|
251
|
+
- features/plantuml.feature
|
252
|
+
- features/smcat.feature
|
177
253
|
- test/erd_test.rb
|
178
254
|
- test/test_helper.rb
|
179
|
-
- test/
|
255
|
+
- test/rendering_test.rb
|
256
|
+
- test/svgbob_test.rb
|
257
|
+
- test/block_test.rb
|
258
|
+
- test/blockdiag_test.rb
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.github/workflows/test.yml
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
name: Test
|
2
|
-
|
3
|
-
on:
|
4
|
-
- push
|
5
|
-
- pull_request
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
build:
|
9
|
-
runs-on: ubuntu-18.04
|
10
|
-
|
11
|
-
strategy:
|
12
|
-
matrix:
|
13
|
-
ruby:
|
14
|
-
- 2.5
|
15
|
-
- 2.6
|
16
|
-
- 2.7
|
17
|
-
|
18
|
-
steps:
|
19
|
-
- name: Checkout reposity
|
20
|
-
uses: actions/checkout@v2
|
21
|
-
|
22
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
23
|
-
uses: actions/setup-ruby@v1
|
24
|
-
with:
|
25
|
-
ruby-version: ${{ matrix.ruby }}
|
26
|
-
|
27
|
-
- name: Install APT stuffs
|
28
|
-
run: |
|
29
|
-
sudo apt-get -qq update
|
30
|
-
sudo apt-get -yqq install cabal-install \
|
31
|
-
cargo \
|
32
|
-
graphviz \
|
33
|
-
default-jre-headless \
|
34
|
-
npm \
|
35
|
-
python3 \
|
36
|
-
python3-pip \
|
37
|
-
python3-setuptools
|
38
|
-
|
39
|
-
# Install packages to "$HOME/.cargo/bin"
|
40
|
-
- name: Install Cargo stuffs
|
41
|
-
run: |
|
42
|
-
cargo install svgbob_cli
|
43
|
-
|
44
|
-
# Install packages to "$HOME/.npm"
|
45
|
-
- name: Install NPM stuffs
|
46
|
-
run: |
|
47
|
-
# Dependencies of mermaid
|
48
|
-
sudo apt-get -yqq install libatk1.0-0 \
|
49
|
-
libatk-bridge2.0-0 \
|
50
|
-
libgtk-3-0 \
|
51
|
-
libx11-xcb1 \
|
52
|
-
libxcomposite1 \
|
53
|
-
libxrandr2 \
|
54
|
-
libxss1
|
55
|
-
npm config set prefix "$HOME/.npm"
|
56
|
-
npm install -g mermaid.cli \
|
57
|
-
nomnoml \
|
58
|
-
state-machine-cat \
|
59
|
-
vega-cli \
|
60
|
-
vega-lite \
|
61
|
-
wavedrom-cli
|
62
|
-
|
63
|
-
# Install packages to "$HOME/.local/bin"
|
64
|
-
- name: Install Pip stuffs
|
65
|
-
run: |
|
66
|
-
# Dependencies of syntrax
|
67
|
-
sudo apt-get -yqq install libpango1.0-dev \
|
68
|
-
libpython3-dev \
|
69
|
-
python3-cairo \
|
70
|
-
python3-gi \
|
71
|
-
python3-gi-cairo
|
72
|
-
pip3 install blockdiag seqdiag actdiag nwdiag syntrax
|
73
|
-
|
74
|
-
- name: Run Test with Rake
|
75
|
-
run: |
|
76
|
-
export PATH="$HOME/.local/bin:$HOME/.npm/bin:$HOME/.cargo/bin:$PATH"
|
77
|
-
bundle install --jobs 4 --retry 3
|
78
|
-
bundle exec rake
|
79
|
-
|
80
|
-
# - name: Coveralls
|
81
|
-
# uses: coverallsapp/github-action@master
|
82
|
-
# with:
|
83
|
-
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Layout/LineLength:
|
2
|
-
Max: 85
|
3
|
-
|
4
|
-
Metrics/MethodLength:
|
5
|
-
Max: 20
|
6
|
-
|
7
|
-
Naming/FileName:
|
8
|
-
Exclude:
|
9
|
-
- lib/jekyll-diagrams.rb
|
10
|
-
- features/step_definitions/jekyll-diagrams.rb
|
11
|
-
|
12
|
-
Style/Documentation:
|
13
|
-
Enabled: false
|
14
|
-
|
15
|
-
Style/HashEachMethods:
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Style/HashTransformKeys:
|
19
|
-
Enabled: true
|
20
|
-
|
21
|
-
Style/HashTransformValues:
|
22
|
-
Enabled: true
|