kramdown-plantuml 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/mergify.yml +7 -2
- data/.github/workflows/amend.yml +1 -1
- data/.github/workflows/no-java.yml +1 -1
- data/.github/workflows/no-plantuml.yml +1 -1
- data/.github/workflows/ruby.yml +20 -20
- data/bin/net/sourceforge/plantuml/plantuml/{1.2021.16/plantuml-1.2021.16.jar → 1.2022.6/plantuml-1.2022.6.jar} +0 -0
- data/lib/kramdown-plantuml/converter_extension.rb +32 -0
- data/lib/kramdown-plantuml/version.rb +1 -1
- data/lib/kramdown_html.rb +2 -32
- data/pom.xml +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b755b8fc90e54aada29c40ce3b4391858d2b978487a82a9965bef5da8084b08
|
|
4
|
+
data.tar.gz: 0afb90a2bc66c705f7efb6e5c48d26c3e7e3ab83f1fd4ba2300090121b844958
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc479376cac81326afd561679f65d84ae110a762cf85ecd6936713f7dcaf019dbb7031890ea038dd4874955ffcdf7ca71fdca3ad30756d7526579cde89385d87
|
|
7
|
+
data.tar.gz: 605bcc56726601a048cc69599c0b8a72f6845cb1145af7549d35cb832b3aff515aae6dbf560294145509897b86ca698fde5848d21f34cc9230360a0f01517b9a
|
data/.github/mergify.yml
CHANGED
|
@@ -9,10 +9,15 @@ pull_request_rules:
|
|
|
9
9
|
- name: Automatic merge on approval
|
|
10
10
|
conditions:
|
|
11
11
|
- author~=^dependabot(|-preview)\[bot\]$
|
|
12
|
+
- '#commits-behind=0' # Only merge up to date pull requests
|
|
13
|
+
- check-success=test
|
|
14
|
+
- check-success=version
|
|
15
|
+
- check-success=plantuml
|
|
16
|
+
- check-success=gem
|
|
17
|
+
- check-success=shellcheck
|
|
18
|
+
- check-success=license/cla
|
|
12
19
|
actions:
|
|
13
20
|
merge:
|
|
14
|
-
method: merge
|
|
15
|
-
strict: smart
|
|
16
21
|
|
|
17
22
|
- name: Thank contributor
|
|
18
23
|
conditions:
|
data/.github/workflows/amend.yml
CHANGED
data/.github/workflows/ruby.yml
CHANGED
|
@@ -10,18 +10,18 @@ jobs:
|
|
|
10
10
|
version: ${{ steps.variables.outputs.version }}
|
|
11
11
|
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
14
|
with:
|
|
15
15
|
fetch-depth: 0
|
|
16
16
|
|
|
17
17
|
- name: Setup GitVersion
|
|
18
|
-
uses: gittools/actions/gitversion/setup@v0.9.
|
|
18
|
+
uses: gittools/actions/gitversion/setup@v0.9.13
|
|
19
19
|
with:
|
|
20
20
|
versionSpec: '5.x.x'
|
|
21
21
|
|
|
22
22
|
- name: Execute GitVersion
|
|
23
23
|
id: gitversion
|
|
24
|
-
uses: gittools/actions/gitversion/execute@v0.9.
|
|
24
|
+
uses: gittools/actions/gitversion/execute@v0.9.13
|
|
25
25
|
|
|
26
26
|
- name: Create variables
|
|
27
27
|
id: variables
|
|
@@ -34,16 +34,16 @@ jobs:
|
|
|
34
34
|
runs-on: ubuntu-latest
|
|
35
35
|
|
|
36
36
|
steps:
|
|
37
|
-
- uses: actions/checkout@
|
|
37
|
+
- uses: actions/checkout@v3
|
|
38
38
|
|
|
39
39
|
- name: Setup Java
|
|
40
|
-
uses: actions/setup-java@
|
|
40
|
+
uses: actions/setup-java@v3
|
|
41
41
|
with:
|
|
42
42
|
distribution: adopt
|
|
43
43
|
java-version: 14
|
|
44
44
|
|
|
45
45
|
- name: Cache Maven dependencies
|
|
46
|
-
uses: actions/cache@
|
|
46
|
+
uses: actions/cache@v3
|
|
47
47
|
with:
|
|
48
48
|
path: ~/.m2/repository
|
|
49
49
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
run: mvn install
|
|
57
57
|
|
|
58
58
|
- name: Upload plantuml.jar artifact
|
|
59
|
-
uses: actions/upload-artifact@
|
|
59
|
+
uses: actions/upload-artifact@v3
|
|
60
60
|
with:
|
|
61
61
|
name: plantuml.jar
|
|
62
62
|
path: ~/.m2/repository/**/plantuml*.jar
|
|
@@ -69,9 +69,9 @@ jobs:
|
|
|
69
69
|
name: ${{ steps.gem.outputs.name }}
|
|
70
70
|
|
|
71
71
|
steps:
|
|
72
|
-
- uses: actions/checkout@
|
|
72
|
+
- uses: actions/checkout@v3
|
|
73
73
|
|
|
74
|
-
- uses: actions/download-artifact@
|
|
74
|
+
- uses: actions/download-artifact@v3
|
|
75
75
|
with:
|
|
76
76
|
name: plantuml.jar
|
|
77
77
|
path: bin/
|
|
@@ -97,7 +97,7 @@ jobs:
|
|
|
97
97
|
run: bundle exec rspec --format documentation --tag debug
|
|
98
98
|
|
|
99
99
|
- name: Upload code coverage (debug)
|
|
100
|
-
uses: actions/upload-artifact@
|
|
100
|
+
uses: actions/upload-artifact@v3
|
|
101
101
|
with:
|
|
102
102
|
name: rspec-debug-coverage
|
|
103
103
|
path: ./coverage
|
|
@@ -109,7 +109,7 @@ jobs:
|
|
|
109
109
|
run: bundle exec rake
|
|
110
110
|
|
|
111
111
|
- name: Upload code coverage
|
|
112
|
-
uses: actions/upload-artifact@
|
|
112
|
+
uses: actions/upload-artifact@v3
|
|
113
113
|
with:
|
|
114
114
|
name: rspec-coverage
|
|
115
115
|
path: ./coverage
|
|
@@ -125,7 +125,7 @@ jobs:
|
|
|
125
125
|
git checkout HEAD -- Gemfile
|
|
126
126
|
|
|
127
127
|
- name: Upload code coverage (Jekyll)
|
|
128
|
-
uses: actions/upload-artifact@
|
|
128
|
+
uses: actions/upload-artifact@v3
|
|
129
129
|
with:
|
|
130
130
|
name: rspec-jekyll-coverage
|
|
131
131
|
path: ./coverage
|
|
@@ -138,7 +138,7 @@ jobs:
|
|
|
138
138
|
run: .github/scripts/build-gem.sh --ref ${{ github.ref }} --verbose
|
|
139
139
|
|
|
140
140
|
- name: Upload gem
|
|
141
|
-
uses: actions/upload-artifact@
|
|
141
|
+
uses: actions/upload-artifact@v3
|
|
142
142
|
with:
|
|
143
143
|
name: ${{ steps.gem.outputs.name }}
|
|
144
144
|
path: ${{ steps.gem.outputs.name }}
|
|
@@ -150,7 +150,7 @@ jobs:
|
|
|
150
150
|
run: .github/scripts/test-gem.sh --workdir "${{ github.workspace }}/spec/examples" --gemdir "${{ github.workspace }}" --verbose
|
|
151
151
|
|
|
152
152
|
- name: Upload code coverage (gem)
|
|
153
|
-
uses: actions/upload-artifact@
|
|
153
|
+
uses: actions/upload-artifact@v3
|
|
154
154
|
with:
|
|
155
155
|
name: gem-coverage
|
|
156
156
|
path: ./coverage
|
|
@@ -166,15 +166,15 @@ jobs:
|
|
|
166
166
|
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
|
|
167
167
|
|
|
168
168
|
steps:
|
|
169
|
-
- uses: actions/checkout@
|
|
169
|
+
- uses: actions/checkout@v3
|
|
170
170
|
if: ${{ github.event_name != 'pull_request_target' }}
|
|
171
171
|
|
|
172
|
-
- uses: actions/checkout@
|
|
172
|
+
- uses: actions/checkout@v3
|
|
173
173
|
if: ${{ github.event_name == 'pull_request_target' }}
|
|
174
174
|
with:
|
|
175
175
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
176
176
|
|
|
177
|
-
- uses: actions/download-artifact@
|
|
177
|
+
- uses: actions/download-artifact@v3
|
|
178
178
|
with:
|
|
179
179
|
name: ${{ needs.gem.outputs.name }}
|
|
180
180
|
|
|
@@ -200,7 +200,7 @@ jobs:
|
|
|
200
200
|
run: .github/scripts/test-gem.sh --workdir "${{ github.workspace }}/spec/examples" --version ${{ needs.version.outputs.version }} --token "${{ secrets.GPR_TOKEN }}" --verbose --theme-name c2a3b0 --theme-directory "${{ github.workspace }}/spec/examples"
|
|
201
201
|
|
|
202
202
|
- name: Upload Jekyll site
|
|
203
|
-
uses: actions/upload-artifact@
|
|
203
|
+
uses: actions/upload-artifact@v3
|
|
204
204
|
if: always()
|
|
205
205
|
with:
|
|
206
206
|
name: site
|
|
@@ -212,9 +212,9 @@ jobs:
|
|
|
212
212
|
if: startsWith(github.ref, 'refs/tags/') # Only publish tagged commits
|
|
213
213
|
|
|
214
214
|
steps:
|
|
215
|
-
- uses: actions/checkout@
|
|
215
|
+
- uses: actions/checkout@v3
|
|
216
216
|
|
|
217
|
-
- uses: actions/download-artifact@
|
|
217
|
+
- uses: actions/download-artifact@v3
|
|
218
218
|
with:
|
|
219
219
|
name: ${{ needs.gem.outputs.name }}
|
|
220
220
|
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Kramdown
|
|
4
|
+
module PlantUml
|
|
5
|
+
# Plugs into Kramdown::Converter::Html to provide conversion of PlantUML markup
|
|
6
|
+
# into beautiful SVG.
|
|
7
|
+
module ConverterExtension
|
|
8
|
+
def convert_codeblock(element, indent)
|
|
9
|
+
return super(element, indent) unless plantuml? element
|
|
10
|
+
|
|
11
|
+
convert_plantuml(element.value)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def plantuml?(element)
|
|
17
|
+
element.attr['class'] == 'language-plantuml'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def convert_plantuml(plantuml)
|
|
21
|
+
puml_opts = PlantUml::Options.new(@options)
|
|
22
|
+
diagram = PlantUml::PlantUmlDiagram.new(plantuml, puml_opts)
|
|
23
|
+
diagram.svg.to_s
|
|
24
|
+
rescue StandardError => e
|
|
25
|
+
raise e if puml_opts.nil? || puml_opts.raise_errors?
|
|
26
|
+
|
|
27
|
+
logger = PlantUml::LogWrapper.init
|
|
28
|
+
logger.error "Error while converting diagram: #{e.inspect}"
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/lib/kramdown_html.rb
CHANGED
|
@@ -6,36 +6,6 @@ require_relative 'kramdown-plantuml/log_wrapper'
|
|
|
6
6
|
require_relative 'kramdown-plantuml/plantuml_error'
|
|
7
7
|
require_relative 'kramdown-plantuml/options'
|
|
8
8
|
require_relative 'kramdown-plantuml/plantuml_diagram'
|
|
9
|
+
require_relative 'kramdown-plantuml/converter_extension'
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
module Converter
|
|
12
|
-
# Plugs into Kramdown::Converter::Html to provide conversion of PlantUML markup
|
|
13
|
-
# into beautiful SVG.
|
|
14
|
-
class Html
|
|
15
|
-
alias super_convert_codeblock convert_codeblock
|
|
16
|
-
|
|
17
|
-
def convert_codeblock(element, indent)
|
|
18
|
-
return super_convert_codeblock(element, indent) unless plantuml? element
|
|
19
|
-
|
|
20
|
-
convert_plantuml(element.value)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
def plantuml?(element)
|
|
26
|
-
element.attr['class'] == 'language-plantuml'
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def convert_plantuml(plantuml)
|
|
30
|
-
puml_opts = ::Kramdown::PlantUml::Options.new(@options)
|
|
31
|
-
diagram = ::Kramdown::PlantUml::PlantUmlDiagram.new(plantuml, puml_opts)
|
|
32
|
-
diagram.svg.to_s
|
|
33
|
-
rescue StandardError => e
|
|
34
|
-
raise e if puml_opts.nil? || puml_opts.raise_errors?
|
|
35
|
-
|
|
36
|
-
logger = ::Kramdown::PlantUml::LogWrapper.init
|
|
37
|
-
logger.error "Error while converting diagram: #{e.inspect}"
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
11
|
+
Kramdown::Converter::Html.prepend Kramdown::PlantUml::ConverterExtension
|
data/pom.xml
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kramdown-plantuml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.3
|
|
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: 2022-07-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: htmlentities
|
|
@@ -194,11 +194,12 @@ files:
|
|
|
194
194
|
- LICENSE
|
|
195
195
|
- README.md
|
|
196
196
|
- Rakefile
|
|
197
|
-
- bin/net/sourceforge/plantuml/plantuml/1.
|
|
197
|
+
- bin/net/sourceforge/plantuml/plantuml/1.2022.6/plantuml-1.2022.6.jar
|
|
198
198
|
- kramdown-plantuml.gemspec
|
|
199
199
|
- lib/kramdown-plantuml.rb
|
|
200
200
|
- lib/kramdown-plantuml/bool_env.rb
|
|
201
201
|
- lib/kramdown-plantuml/console_logger.rb
|
|
202
|
+
- lib/kramdown-plantuml/converter_extension.rb
|
|
202
203
|
- lib/kramdown-plantuml/executor.rb
|
|
203
204
|
- lib/kramdown-plantuml/jekyll_provider.rb
|
|
204
205
|
- lib/kramdown-plantuml/log_wrapper.rb
|