kramdown-plantuml 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/codecov.yml +2 -0
- data/.github/dependabot.yml +23 -0
- data/.github/mergify.yml +22 -0
- data/.github/scripts/amend.sh +176 -0
- data/.github/scripts/build-gem.sh +6 -0
- data/.github/scripts/inspect-gem.sh +72 -0
- data/.github/scripts/publish-gem.sh +121 -0
- data/.github/scripts/test-gem.sh +170 -0
- data/.github/scripts/variables.sh +72 -0
- data/.github/workflows/amend.yml +19 -0
- data/.github/workflows/no-java.yml +22 -0
- data/.github/workflows/no-plantuml.yml +23 -0
- data/.github/workflows/ruby.yml +176 -0
- data/.github/workflows/shell.yml +11 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/.rubocop.yml +18 -0
- data/CODE_OF_CONDUCT.md +131 -0
- data/Gemfile +8 -0
- data/GitVersion.yml +5 -0
- data/LICENSE +201 -0
- data/README.md +208 -0
- data/Rakefile +40 -0
- data/bin/net/sourceforge/plantuml/plantuml/1.2021.8/plantuml-1.2021.8.jar +0 -0
- data/kramdown-plantuml.gemspec +48 -0
- data/lib/kramdown-plantuml.rb +5 -0
- data/lib/kramdown-plantuml/bool_env.rb +24 -0
- data/lib/kramdown-plantuml/console_logger.rb +56 -0
- data/lib/kramdown-plantuml/converter.rb +42 -0
- data/lib/kramdown-plantuml/executor.rb +48 -0
- data/lib/kramdown-plantuml/hash.rb +14 -0
- data/lib/kramdown-plantuml/logger.rb +68 -0
- data/lib/kramdown-plantuml/plantuml_error.rb +33 -0
- data/lib/kramdown-plantuml/plantuml_result.rb +49 -0
- data/lib/kramdown-plantuml/themer.rb +50 -0
- data/lib/kramdown-plantuml/version.rb +7 -0
- data/lib/kramdown_html.rb +27 -0
- data/lib/which.rb +15 -0
- data/pom.xml +16 -0
- metadata +148 -10
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'kramdown'
|
4
|
+
require 'kramdown-parser-gfm'
|
5
|
+
require_relative 'kramdown-plantuml/converter'
|
6
|
+
require_relative 'kramdown-plantuml/logger'
|
7
|
+
require_relative 'kramdown-plantuml/plantuml_error'
|
8
|
+
|
9
|
+
module Kramdown
|
10
|
+
module Converter
|
11
|
+
# Plugs into Kramdown::Converter::Html to provide conversion of PlantUML markup
|
12
|
+
# into beautiful SVG.
|
13
|
+
class Html
|
14
|
+
alias super_convert_codeblock convert_codeblock
|
15
|
+
|
16
|
+
def convert_codeblock(element, indent)
|
17
|
+
return super_convert_codeblock(element, indent) if element.attr['class'] != 'language-plantuml'
|
18
|
+
|
19
|
+
plantuml = element.value
|
20
|
+
plantuml_options = @options.key?(:plantuml) ? @options[:plantuml] : {}
|
21
|
+
converter = ::Kramdown::PlantUml::Converter.new(plantuml_options || {})
|
22
|
+
|
23
|
+
converter.convert_plantuml_to_svg(plantuml)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/which.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Wraps the `which` Unix utility
|
4
|
+
class Which
|
5
|
+
def self.which(cmd)
|
6
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
|
7
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
8
|
+
exts.each do |ext|
|
9
|
+
exe = File.join(path, "#{cmd}#{ext}")
|
10
|
+
return exe if File.executable?(exe) && !File.directory?(exe)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
end
|
data/pom.xml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
2
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
3
|
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
4
|
+
<modelVersion>4.0.0</modelVersion>
|
5
|
+
<groupId>com.swedbankpay</groupId>
|
6
|
+
<artifactId>kramdown-plantuml</artifactId>
|
7
|
+
<version>INVALID</version>
|
8
|
+
<name>Kramdown::PlantUml</name>
|
9
|
+
<dependencies>
|
10
|
+
<dependency>
|
11
|
+
<groupId>net.sourceforge.plantuml</groupId>
|
12
|
+
<artifactId>plantuml</artifactId>
|
13
|
+
<version>1.2021.9</version>
|
14
|
+
</dependency>
|
15
|
+
</dependencies>
|
16
|
+
</project>
|
metadata
CHANGED
@@ -1,29 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kramdown-plantuml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Swedbank Pay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: kramdown
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: kramdown-parser-gfm
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: open3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.1'
|
13
55
|
- !ruby/object:Gem::Dependency
|
14
56
|
name: rake
|
15
57
|
requirement: !ruby/object:Gem::Requirement
|
16
58
|
requirements:
|
17
59
|
- - "~>"
|
18
60
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
61
|
+
version: '13.0'
|
20
62
|
type: :development
|
21
63
|
prerelease: false
|
22
64
|
version_requirements: !ruby/object:Gem::Requirement
|
23
65
|
requirements:
|
24
66
|
- - "~>"
|
25
67
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
68
|
+
version: '13.0'
|
27
69
|
- !ruby/object:Gem::Dependency
|
28
70
|
name: rspec
|
29
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,13 +80,108 @@ dependencies:
|
|
38
80
|
- - "~>"
|
39
81
|
- !ruby/object:Gem::Version
|
40
82
|
version: '3.2'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-its
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.12'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.12'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.6'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.6'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.4'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.4'
|
41
139
|
description:
|
42
140
|
email:
|
43
|
-
-
|
141
|
+
- opensource@swedbankpay.com
|
44
142
|
executables: []
|
45
143
|
extensions: []
|
46
144
|
extra_rdoc_files: []
|
47
|
-
files:
|
145
|
+
files:
|
146
|
+
- ".github/codecov.yml"
|
147
|
+
- ".github/dependabot.yml"
|
148
|
+
- ".github/mergify.yml"
|
149
|
+
- ".github/scripts/amend.sh"
|
150
|
+
- ".github/scripts/build-gem.sh"
|
151
|
+
- ".github/scripts/inspect-gem.sh"
|
152
|
+
- ".github/scripts/publish-gem.sh"
|
153
|
+
- ".github/scripts/test-gem.sh"
|
154
|
+
- ".github/scripts/variables.sh"
|
155
|
+
- ".github/workflows/amend.yml"
|
156
|
+
- ".github/workflows/no-java.yml"
|
157
|
+
- ".github/workflows/no-plantuml.yml"
|
158
|
+
- ".github/workflows/ruby.yml"
|
159
|
+
- ".github/workflows/shell.yml"
|
160
|
+
- ".gitignore"
|
161
|
+
- ".rspec"
|
162
|
+
- ".rubocop.yml"
|
163
|
+
- CODE_OF_CONDUCT.md
|
164
|
+
- Gemfile
|
165
|
+
- GitVersion.yml
|
166
|
+
- LICENSE
|
167
|
+
- README.md
|
168
|
+
- Rakefile
|
169
|
+
- bin/net/sourceforge/plantuml/plantuml/1.2021.8/plantuml-1.2021.8.jar
|
170
|
+
- kramdown-plantuml.gemspec
|
171
|
+
- lib/kramdown-plantuml.rb
|
172
|
+
- lib/kramdown-plantuml/bool_env.rb
|
173
|
+
- lib/kramdown-plantuml/console_logger.rb
|
174
|
+
- lib/kramdown-plantuml/converter.rb
|
175
|
+
- lib/kramdown-plantuml/executor.rb
|
176
|
+
- lib/kramdown-plantuml/hash.rb
|
177
|
+
- lib/kramdown-plantuml/logger.rb
|
178
|
+
- lib/kramdown-plantuml/plantuml_error.rb
|
179
|
+
- lib/kramdown-plantuml/plantuml_result.rb
|
180
|
+
- lib/kramdown-plantuml/themer.rb
|
181
|
+
- lib/kramdown-plantuml/version.rb
|
182
|
+
- lib/kramdown_html.rb
|
183
|
+
- lib/which.rb
|
184
|
+
- pom.xml
|
48
185
|
homepage: https://github.com/SwedbankPay/kramdown-plantuml
|
49
186
|
licenses:
|
50
187
|
- MIT
|
@@ -59,15 +196,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
196
|
requirements:
|
60
197
|
- - ">="
|
61
198
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.
|
199
|
+
version: 2.5.0
|
63
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
201
|
requirements:
|
65
202
|
- - ">="
|
66
203
|
- !ruby/object:Gem::Version
|
67
204
|
version: '0'
|
68
205
|
requirements: []
|
69
|
-
rubygems_version: 3.1.
|
206
|
+
rubygems_version: 3.1.6
|
70
207
|
signing_key:
|
71
208
|
specification_version: 4
|
72
|
-
summary:
|
209
|
+
summary: kramdown-plantuml allows you to use PlantUML syntax within fenced code blocks
|
210
|
+
with Kramdown (Jekyll's default Markdown parser).
|
73
211
|
test_files: []
|