jekyll-diagrams 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +83 -0
  3. data/.gitignore +4 -5
  4. data/.rubocop.yml +22 -0
  5. data/.simplecov +5 -0
  6. data/.travis.yml +48 -1
  7. data/Dockerfile +14 -12
  8. data/Gemfile +4 -1
  9. data/README.md +49 -21
  10. data/Rakefile +20 -2
  11. data/features/blockdiag.feature +20 -0
  12. data/features/graphviz.feature +22 -0
  13. data/features/mermaid.feature +21 -0
  14. data/features/nomnoml.feature +36 -0
  15. data/features/plantuml.feature +24 -0
  16. data/features/smcat.feature +29 -0
  17. data/features/step_definitions/jekyll-diagrams.rb +25 -0
  18. data/features/support/env.rb +33 -0
  19. data/features/svgbob.feature +22 -0
  20. data/features/syntrax.feature +22 -0
  21. data/features/vega.feature +32 -0
  22. data/features/wavedrom.feature +22 -0
  23. data/jekyll-diagrams.gemspec +13 -7
  24. data/lib/jekyll-diagrams.rb +3 -2
  25. data/lib/jekyll-diagrams/block.rb +5 -4
  26. data/lib/jekyll-diagrams/blockdiag.rb +9 -7
  27. data/lib/jekyll-diagrams/erd.rb +9 -6
  28. data/lib/jekyll-diagrams/graphviz.rb +12 -17
  29. data/lib/jekyll-diagrams/mermaid.rb +21 -18
  30. data/lib/jekyll-diagrams/nomnoml.rb +6 -4
  31. data/lib/jekyll-diagrams/plantuml.rb +8 -4
  32. data/lib/jekyll-diagrams/smcat.rb +10 -7
  33. data/lib/jekyll-diagrams/svgbob.rb +6 -4
  34. data/lib/jekyll-diagrams/syntrax.rb +8 -6
  35. data/lib/jekyll-diagrams/util.rb +78 -11
  36. data/lib/jekyll-diagrams/vega.rb +8 -5
  37. data/lib/jekyll-diagrams/version.rb +4 -2
  38. data/lib/jekyll-diagrams/wavedrom.rb +6 -4
  39. data/test/erd_test.rb +22 -0
  40. data/test/test_helper.rb +4 -7
  41. data/test/util_test.rb +20 -0
  42. metadata +54 -11
  43. data/lib/jekyll-diagrams/renderer.rb +0 -53
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.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhustec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -45,7 +45,7 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
- name: rake
48
+ name: cucumber
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
@@ -72,21 +72,51 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '5.0'
75
- description: Jekyll plugins for diagrams support.
76
- email:
77
- - zhustec@foxmail.com
75
+ - !ruby/object:Gem::Dependency
76
+ name: rake
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ description: |
90
+ Jekyll plugins for diagrams support, including Graphviz, Blockdiag,
91
+ PlantUML and so on.
92
+ email: zhustec@foxmail.com
78
93
  executables: []
79
94
  extensions: []
80
95
  extra_rdoc_files: []
81
96
  files:
82
97
  - ".coveralls.yml"
98
+ - ".github/workflows/test.yml"
83
99
  - ".gitignore"
100
+ - ".rubocop.yml"
101
+ - ".simplecov"
84
102
  - ".travis.yml"
85
103
  - Dockerfile
86
104
  - Gemfile
87
105
  - LICENSE
88
106
  - README.md
89
107
  - Rakefile
108
+ - features/blockdiag.feature
109
+ - features/graphviz.feature
110
+ - features/mermaid.feature
111
+ - features/nomnoml.feature
112
+ - features/plantuml.feature
113
+ - features/smcat.feature
114
+ - features/step_definitions/jekyll-diagrams.rb
115
+ - features/support/env.rb
116
+ - features/svgbob.feature
117
+ - features/syntrax.feature
118
+ - features/vega.feature
119
+ - features/wavedrom.feature
90
120
  - jekyll-diagrams.gemspec
91
121
  - lib/jekyll-diagrams.rb
92
122
  - lib/jekyll-diagrams/block.rb
@@ -96,7 +126,6 @@ files:
96
126
  - lib/jekyll-diagrams/mermaid.rb
97
127
  - lib/jekyll-diagrams/nomnoml.rb
98
128
  - lib/jekyll-diagrams/plantuml.rb
99
- - lib/jekyll-diagrams/renderer.rb
100
129
  - lib/jekyll-diagrams/smcat.rb
101
130
  - lib/jekyll-diagrams/svgbob.rb
102
131
  - lib/jekyll-diagrams/syntrax.rb
@@ -104,7 +133,9 @@ files:
104
133
  - lib/jekyll-diagrams/vega.rb
105
134
  - lib/jekyll-diagrams/version.rb
106
135
  - lib/jekyll-diagrams/wavedrom.rb
136
+ - test/erd_test.rb
107
137
  - test/test_helper.rb
138
+ - test/util_test.rb
108
139
  - vendor/mermaid_puppeteer_config.json
109
140
  - vendor/plantuml.1.2020.1.jar
110
141
  homepage: https://github.com/zhustec/jekyll-diagrams
@@ -126,11 +157,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
157
  - !ruby/object:Gem::Version
127
158
  version: '0'
128
159
  requirements: []
129
- rubyforge_project:
130
- rubygems_version: 2.7.6.2
160
+ rubygems_version: 3.1.2
131
161
  signing_key:
132
162
  specification_version: 4
133
- summary: Jekyll plugins for diagrams support, including Graphviz, Blockdiag, PlantUML
134
- and so on.
163
+ summary: Jekyll plugins for diagrams support
135
164
  test_files:
165
+ - features/blockdiag.feature
166
+ - features/graphviz.feature
167
+ - features/mermaid.feature
168
+ - features/nomnoml.feature
169
+ - features/plantuml.feature
170
+ - features/smcat.feature
171
+ - features/step_definitions/jekyll-diagrams.rb
172
+ - features/support/env.rb
173
+ - features/svgbob.feature
174
+ - features/syntrax.feature
175
+ - features/vega.feature
176
+ - features/wavedrom.feature
177
+ - test/erd_test.rb
136
178
  - test/test_helper.rb
179
+ - test/util_test.rb
@@ -1,53 +0,0 @@
1
- require 'open3'
2
- require 'tempfile'
3
-
4
- module Jekyll
5
- module Diagrams
6
- module Renderer
7
- extend self
8
-
9
- def render_with_stdin_stdout(command, content)
10
- command = yield command if block_given?
11
-
12
- render_with_command(command, :stdout, stdin_data: content, binmode: true)
13
- end
14
-
15
- def render_with_stdin(command, content)
16
- Tempfile.open(['jekyll_diagrams_output', ".svg"]) do |output|
17
- output.close
18
- command = yield command, output.path if block_given?
19
-
20
- render_with_command(command, output.path, stdin_data: content)
21
- end
22
- end
23
-
24
- def render_with_tempfile(command, content, stdout: false)
25
- Tempfile.open('jekyll_diagrams_input') do |input|
26
- File.write(input.path, content)
27
-
28
- if stdout == true
29
- command = yield command, input.path
30
-
31
- render_with_command(command, :stdout)
32
- else
33
- output = Tempfile.open(['jekyll_diagrams_output', ".svg"])
34
- output.close
35
- command = yield command, input.path, output.path
36
-
37
- render_with_command(command, output.path)
38
- end
39
- end
40
- end
41
-
42
- def render_with_command(command, output, options = {})
43
- stdout, stderr, status = Open3.capture3(command, options)
44
-
45
- if !status.success?
46
- raise "#{command} failed: #{stdout.empty? ? stderr : stdout}"
47
- end
48
-
49
- output == :stdout ? stdout : File.read(output)
50
- end
51
- end
52
- end
53
- end