jekyll-plantuml 1.4.2 → 1.5.0
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/.0pdd.yml +3 -0
- data/.github/workflows/actionlint.yml +25 -0
- data/.github/workflows/codecov.yml +14 -8
- data/.github/workflows/copyrights.yml +19 -0
- data/.github/workflows/markdown-lint.yml +19 -0
- data/.github/workflows/pdd.yml +7 -3
- data/.github/workflows/rake.yml +11 -7
- data/.github/workflows/reuse.yml +19 -0
- data/.github/workflows/typos.yml +19 -0
- data/.github/workflows/xcop.yml +7 -3
- data/.github/workflows/yamllint.yml +19 -0
- data/.gitignore +9 -3
- data/.rubocop.yml +11 -2
- data/.rultor.yml +6 -2
- data/Gemfile +17 -5
- data/LICENSE.txt +1 -1
- data/LICENSES/MIT.txt +21 -0
- data/README.md +57 -31
- data/REUSE.toml +37 -0
- data/Rakefile +4 -31
- data/jekyll-plantuml.gemspec +4 -1
- data/lib/jekyll-plantuml-file.rb +49 -0
- data/lib/jekyll-plantuml.rb +4 -22
- data/lib/version.rb +3 -22
- data/test/schema.puml +3 -0
- data/test/test__helper.rb +26 -20
- data/test/test_plantuml-file.rb +39 -0
- data/test/test_plantuml.rb +3 -23
- data/test-jekylls/.gitignore +1 -1
- data/test-jekylls/Makefile +4 -1
- data/test-jekylls/jekyll-3/Gemfile +5 -2
- data/test-jekylls/jekyll-3/_config.yml +3 -0
- data/test-jekylls/jekyll-3/_layouts/default.html +3 -0
- data/test-jekylls/jekyll-4/Gemfile +5 -2
- data/test-jekylls/jekyll-4/_config.yml +3 -0
- data/test-jekylls/jekyll-4/_layouts/default.html +3 -0
- metadata +13 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 28129a00eff58d52229ade0dc74dc009b052597309bf6e9758401aeb0308b8e3
|
|
4
|
+
data.tar.gz: b44e4f4c8d9cfdfe98c179f775b519a6a57dd57ad9ac6fe0c2487592416bd6d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcc87236d47ad23085ed51ae65f2927f80e73795cddc9be4b1c6ccc67986ed96447c588cc89aaa99370f7b46bd24e0c2abae50cad57553edbcc441a2991d1180
|
|
7
|
+
data.tar.gz: d55476f68d7cdc8a4809283dc8e79dfee6eb793fd9126192def60a284ac23e2087c31e9586f8c9fccc37229e325929a4316deae9d8e90cf58a1407a654309c52
|
data/.0pdd.yml
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
5
|
+
name: actionlint
|
|
6
|
+
'on':
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
actionlint:
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- name: Download actionlint
|
|
20
|
+
id: get_actionlint
|
|
21
|
+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
|
22
|
+
shell: bash
|
|
23
|
+
- name: Check workflow files
|
|
24
|
+
run: ${{ steps.get_actionlint.outputs.executable }} -color
|
|
25
|
+
shell: bash
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
1
3
|
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
2
5
|
name: codecov
|
|
3
|
-
on:
|
|
6
|
+
'on':
|
|
4
7
|
push:
|
|
5
8
|
branches:
|
|
6
9
|
- master
|
|
7
10
|
jobs:
|
|
8
11
|
codecov:
|
|
9
|
-
|
|
12
|
+
timeout-minutes: 15
|
|
13
|
+
runs-on: ubuntu-24.04
|
|
10
14
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v6
|
|
12
16
|
- uses: ruby/setup-ruby@v1
|
|
13
17
|
with:
|
|
14
|
-
ruby-version:
|
|
15
|
-
|
|
16
|
-
- run:
|
|
18
|
+
ruby-version: 3.4.8
|
|
19
|
+
bundler-cache: true
|
|
20
|
+
- run: sudo apt-get install --yes plantuml
|
|
21
|
+
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
|
22
|
+
- run: bundle install --no-color
|
|
17
23
|
- run: bundle exec rake
|
|
18
|
-
- uses: codecov/codecov-action@
|
|
24
|
+
- uses: codecov/codecov-action@v5
|
|
19
25
|
with:
|
|
20
26
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
21
|
-
|
|
27
|
+
files: coverage/.resultset.json
|
|
22
28
|
fail_ci_if_error: true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
5
|
+
name: copyrights
|
|
6
|
+
'on':
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
copyrights:
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- uses: yegor256/copyrights-action@0.0.12
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
5
|
+
name: markdown-lint
|
|
6
|
+
'on':
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
markdown-lint:
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- uses: DavidAnson/markdownlint-cli2-action@v22.0.0
|
data/.github/workflows/pdd.yml
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
1
3
|
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
2
5
|
name: pdd
|
|
3
|
-
on:
|
|
6
|
+
'on':
|
|
4
7
|
push:
|
|
5
8
|
branches:
|
|
6
9
|
- master
|
|
@@ -9,7 +12,8 @@ on:
|
|
|
9
12
|
- master
|
|
10
13
|
jobs:
|
|
11
14
|
pdd:
|
|
12
|
-
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
13
17
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v6
|
|
15
19
|
- uses: volodya-lombrozo/pdd-action@master
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
1
3
|
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
2
5
|
name: rake
|
|
3
|
-
on:
|
|
6
|
+
'on':
|
|
4
7
|
push:
|
|
5
8
|
branches:
|
|
6
9
|
- master
|
|
@@ -9,17 +12,18 @@ on:
|
|
|
9
12
|
- master
|
|
10
13
|
jobs:
|
|
11
14
|
test:
|
|
12
|
-
name: test
|
|
13
15
|
strategy:
|
|
14
16
|
matrix:
|
|
15
|
-
os: [ubuntu-
|
|
16
|
-
ruby: [
|
|
17
|
+
os: [ubuntu-24.04]
|
|
18
|
+
ruby: [3.3]
|
|
17
19
|
runs-on: ${{ matrix.os }}
|
|
18
20
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v6
|
|
20
22
|
- uses: ruby/setup-ruby@v1
|
|
21
23
|
with:
|
|
22
24
|
ruby-version: ${{ matrix.ruby }}
|
|
23
|
-
|
|
24
|
-
- run:
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
- run: sudo apt-get install --yes plantuml
|
|
27
|
+
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
|
28
|
+
- run: bundle install --no-color
|
|
25
29
|
- run: bundle exec rake
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
5
|
+
name: reuse
|
|
6
|
+
'on':
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
reuse:
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- uses: fsfe/reuse-action@v6
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
5
|
+
name: typos
|
|
6
|
+
'on':
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
typos:
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- uses: crate-ci/typos@v1.40.0
|
data/.github/workflows/xcop.yml
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
1
3
|
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
2
5
|
name: xcop
|
|
3
|
-
on:
|
|
6
|
+
'on':
|
|
4
7
|
push:
|
|
5
8
|
pull_request:
|
|
6
9
|
jobs:
|
|
7
10
|
xcop:
|
|
8
|
-
|
|
11
|
+
timeout-minutes: 15
|
|
12
|
+
runs-on: ubuntu-24.04
|
|
9
13
|
steps:
|
|
10
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v6
|
|
11
15
|
- uses: g4s8/xcop-action@master
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
5
|
+
name: yamllint
|
|
6
|
+
'on':
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
yamllint:
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- uses: ibiqlik/action-yamllint@v3
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
1
4
|
AllCops:
|
|
2
5
|
Exclude:
|
|
3
6
|
- 'bin/**/*'
|
|
4
7
|
- 'assets/**/*'
|
|
8
|
+
- 'vendor/**/*'
|
|
5
9
|
DisplayCopNames: true
|
|
6
10
|
TargetRubyVersion: 2.3
|
|
7
11
|
SuggestExtensions: false
|
|
8
12
|
NewCops: enable
|
|
9
|
-
|
|
13
|
+
plugins:
|
|
14
|
+
- rubocop-rake
|
|
15
|
+
- rubocop-minitest
|
|
16
|
+
- rubocop-performance
|
|
17
|
+
Minitest/EmptyLineBeforeAssertionMethods:
|
|
18
|
+
Enabled: false
|
|
10
19
|
Gemspec/RequiredRubyVersion:
|
|
11
20
|
Enabled: false
|
|
12
21
|
Metrics/MethodLength:
|
|
13
22
|
Enabled: false
|
|
14
23
|
Metrics/AbcSize:
|
|
15
|
-
Max:
|
|
24
|
+
Max: 50
|
|
16
25
|
Naming/FileName:
|
|
17
26
|
Enabled: false
|
|
18
27
|
Style/ClassAndModuleChildren:
|
data/.rultor.yml
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
---
|
|
4
|
+
# yamllint disable rule:line-length
|
|
1
5
|
docker:
|
|
2
|
-
image: yegor256/rultor-image:1.
|
|
6
|
+
image: yegor256/rultor-image:1.24.0
|
|
3
7
|
assets:
|
|
4
8
|
rubygems.yml: yegor256/home#assets/rubygems.yml
|
|
5
9
|
install: |
|
|
6
10
|
pdd -f /dev/null
|
|
7
11
|
bundle install --no-color
|
|
8
|
-
sudo apt-get
|
|
12
|
+
sudo apt-get install --yes plantuml
|
|
9
13
|
release:
|
|
10
14
|
pre: false
|
|
11
15
|
script: |-
|
data/Gemfile
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
3
6
|
source 'https://rubygems.org'
|
|
4
7
|
gemspec
|
|
5
8
|
|
|
6
|
-
gem '
|
|
7
|
-
gem '
|
|
8
|
-
gem '
|
|
9
|
-
gem '
|
|
10
|
-
gem '
|
|
9
|
+
gem 'base64', '~>0.3', require: false
|
|
10
|
+
gem 'bigdecimal', '~>4.0', require: false
|
|
11
|
+
gem 'kramdown-parser-gfm', '~>1.1', require: false
|
|
12
|
+
gem 'logger', '~>1.7', require: false
|
|
13
|
+
gem 'minitest', '~>6.0', require: false
|
|
14
|
+
gem 'minitest-reporters', '~>1.7', require: false
|
|
15
|
+
gem 'rake', '~>13.2', require: false
|
|
16
|
+
gem 'rdoc', '~>7.0', require: false
|
|
17
|
+
gem 'rubocop', '~>1.64', require: false
|
|
18
|
+
gem 'rubocop-minitest', '>0', require: false
|
|
19
|
+
gem 'rubocop-performance', '>0', require: false
|
|
20
|
+
gem 'rubocop-rake', '>0', require: false
|
|
21
|
+
gem 'simplecov', '~>0.22', require: false
|
|
22
|
+
gem 'simplecov-cobertura', '~>3.1', require: false
|
data/LICENSE.txt
CHANGED
data/LICENSES/MIT.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[](https://www.jetbrains.com/ruby/)
|
|
1
|
+
# PlantUML Diagrams in Jekyll Static Sites
|
|
3
2
|
|
|
4
|
-
[![
|
|
5
|
-
[![
|
|
6
|
-
|
|
3
|
+
[![DevOps By Rultor.com][rultor-badge]][rultor]
|
|
4
|
+
[![We recommend RubyMine][rubymine-badge]][rubymine]
|
|
5
|
+
|
|
6
|
+
[![rake][rake-badge]][rake]
|
|
7
|
+
[![Gem Version][gem-badge]][gem]
|
|
8
|
+
[![Test Coverage][codecov-badge]][codecov]
|
|
7
9
|
|
|
8
10
|
Install it first:
|
|
9
11
|
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
+
```bash
|
|
13
|
+
gem install jekyll-plantuml
|
|
12
14
|
```
|
|
13
15
|
|
|
14
16
|
With Jekyll 2, simply add the gem to your `_config.yml` gems list:
|
|
@@ -25,31 +27,29 @@ create a plugin file within your Jekyll project's `_plugins` directory:
|
|
|
25
27
|
require "jekyll-plantuml"
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
We highly recommend using Bundler. If you're using it, add this line
|
|
29
31
|
to your `Gemfile`:
|
|
30
32
|
|
|
31
|
-
```
|
|
33
|
+
```ruby
|
|
32
34
|
gem "jekyll-plantuml"
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
The plugin is compatible with
|
|
36
|
-
[Jekyll 3.
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
[here](https://github.com/yegor256/jekyll-plantuml/tree/master/test-jekylls).
|
|
37
|
+
The plugin is compatible with [Jekyll 3.9.3][jekyll-3]
|
|
38
|
+
and [Jekyll 4.3.2][jekyll-4].
|
|
39
|
+
You can find our [integration tests][test-jekylls],
|
|
40
|
+
which prove the compatibility.
|
|
40
41
|
|
|
41
42
|
## Install plantuml.jar
|
|
42
43
|
|
|
43
|
-
Then, make sure [PlantUML]
|
|
44
|
-
is installed on your build machine, and can
|
|
44
|
+
Then, make sure [PlantUML][plantuml] is installed on your build machine, and can
|
|
45
45
|
be executed with a simple `plantuml` command.
|
|
46
46
|
|
|
47
47
|
On Ubuntu, just `apt-get install -y plantuml` should work.
|
|
48
48
|
However, if it doesn't, you can create a `/usr/bin/plantuml` with the
|
|
49
49
|
following content:
|
|
50
50
|
|
|
51
|
-
```
|
|
52
|
-
#!/bin/bash
|
|
51
|
+
```bash
|
|
52
|
+
#!/usr/bin/env bash
|
|
53
53
|
java -jar /home/user/Downloads/plantuml.jar "$1" "$2"
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -57,34 +57,60 @@ Remember to change the path to the `plantuml.jar` file.
|
|
|
57
57
|
|
|
58
58
|
Then, set the executable permission of the file:
|
|
59
59
|
|
|
60
|
-
```
|
|
61
|
-
|
|
60
|
+
```bash
|
|
61
|
+
chmod +x /usr/bin/plantuml
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
## Test
|
|
65
65
|
|
|
66
|
-
Now, it's time to create a diagram
|
|
66
|
+
Now, it's time to create a diagram in your Jekyll blog page:
|
|
67
67
|
|
|
68
|
-
```
|
|
68
|
+
```text
|
|
69
69
|
{% plantuml %}
|
|
70
70
|
[First] - [Second]
|
|
71
71
|
{% endplantuml %}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
You can also include a file:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
{% plantuml_file foo.uml %}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Now, check [this blog post][blog-post]:
|
|
75
81
|
the UML sequence diagram in it is auto-generated using exactly this plugin.
|
|
76
|
-
The sources of the blog are available in [GitHub]
|
|
82
|
+
The sources of the blog are available in [GitHub][blog-sources].
|
|
77
83
|
|
|
78
84
|
## How to contribute
|
|
79
85
|
|
|
80
|
-
Read [these guidelines]
|
|
81
|
-
Make sure
|
|
82
|
-
your pull request. You will need to have [Ruby]
|
|
83
|
-
[Bundler]
|
|
86
|
+
Read [these guidelines][guidelines].
|
|
87
|
+
Make sure your build is green before you contribute
|
|
88
|
+
your pull request. You will need to have [Ruby][ruby] 2.3+ and
|
|
89
|
+
[Bundler][bundler] installed. Then:
|
|
84
90
|
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
```bash
|
|
92
|
+
bundle update
|
|
93
|
+
bundle exec rake
|
|
88
94
|
```
|
|
89
95
|
|
|
90
96
|
If it's clean and you don't see any error messages, submit your pull request.
|
|
97
|
+
|
|
98
|
+
[rultor-badge]: https://www.rultor.com/b/yegor256/jekyll-plantuml
|
|
99
|
+
[rultor]: https://www.rultor.com/p/yegor256/jekyll-plantuml
|
|
100
|
+
[rubymine-badge]: https://www.elegantobjects.org/rubymine.svg
|
|
101
|
+
[rubymine]: https://www.jetbrains.com/ruby/
|
|
102
|
+
[rake-badge]: https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml/badge.svg
|
|
103
|
+
[rake]: https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml
|
|
104
|
+
[gem-badge]: https://badge.fury.io/rb/jekyll-plantuml.svg
|
|
105
|
+
[gem]: https://badge.fury.io/rb/jekyll-plantuml
|
|
106
|
+
[codecov-badge]: https://img.shields.io/codecov/c/github/yegor256/jekyll-plantuml.svg
|
|
107
|
+
[codecov]: https://codecov.io/github/yegor256/jekyll-plantuml?branch=master
|
|
108
|
+
[jekyll-3]: https://jekyllrb.com/news/2023/01/29/jekyll-3-9-3-released/
|
|
109
|
+
[jekyll-4]: https://jekyllrb.com/news/2023/01/20/jekyll-4-3-2-released/
|
|
110
|
+
[test-jekylls]: https://github.com/yegor256/jekyll-plantuml/tree/master/test-jekylls
|
|
111
|
+
[plantuml]: http://plantuml.sourceforge.net/download.html
|
|
112
|
+
[blog-post]: http://www.yegor256.com/2014/06/01/aop-aspectj-java-method-logging.html
|
|
113
|
+
[blog-sources]: https://github.com/yegor256/blog
|
|
114
|
+
[guidelines]: https://www.yegor256.com/2014/04/15/github-guidelines.html
|
|
115
|
+
[ruby]: https://www.ruby-lang.org/en/
|
|
116
|
+
[bundler]: https://bundler.io/
|
data/REUSE.toml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
version = 1
|
|
5
|
+
[[annotations]]
|
|
6
|
+
path = [
|
|
7
|
+
".DS_Store",
|
|
8
|
+
".gitattributes",
|
|
9
|
+
".gitignore",
|
|
10
|
+
".pdd",
|
|
11
|
+
"**.json",
|
|
12
|
+
"**.md",
|
|
13
|
+
"**.png",
|
|
14
|
+
"**.svg",
|
|
15
|
+
"**.txt",
|
|
16
|
+
"**/.DS_Store",
|
|
17
|
+
"**/.gitignore",
|
|
18
|
+
"**/.pdd",
|
|
19
|
+
"**/*.csv",
|
|
20
|
+
"**/*.jpg",
|
|
21
|
+
"**/*.json",
|
|
22
|
+
"**/*.md",
|
|
23
|
+
"**/*.pdf",
|
|
24
|
+
"**/*.png",
|
|
25
|
+
"**/*.svg",
|
|
26
|
+
"**/*.txt",
|
|
27
|
+
"**/*.vm",
|
|
28
|
+
"**/CNAME",
|
|
29
|
+
"test/schema.puml",
|
|
30
|
+
"**/Gemfile.lock",
|
|
31
|
+
"Gemfile.lock",
|
|
32
|
+
"README.md",
|
|
33
|
+
"renovate.json",
|
|
34
|
+
]
|
|
35
|
+
precedence = "override"
|
|
36
|
+
SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
|
|
37
|
+
SPDX-License-Identifier = "MIT"
|
data/Rakefile
CHANGED
|
@@ -1,26 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# (
|
|
4
|
-
#
|
|
5
|
-
# Copyright (c) 2014-2024 Yegor Bugayenko
|
|
6
|
-
#
|
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
# furnished to do so, subject to the following conditions:
|
|
13
|
-
#
|
|
14
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
# copies or substantial portions of the Software.
|
|
16
|
-
#
|
|
17
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
24
5
|
|
|
25
6
|
require 'rubygems'
|
|
26
7
|
require 'rake'
|
|
@@ -35,7 +16,7 @@ def version
|
|
|
35
16
|
Gem::Specification.load(Dir['*.gemspec'].first).version
|
|
36
17
|
end
|
|
37
18
|
|
|
38
|
-
task default: %i[clean test jekylls rubocop
|
|
19
|
+
task default: %i[clean test jekylls rubocop]
|
|
39
20
|
|
|
40
21
|
require 'rake/testtask'
|
|
41
22
|
desc 'Run all unit tests'
|
|
@@ -47,6 +28,7 @@ Rake::TestTask.new(:test) do |test|
|
|
|
47
28
|
test.verbose = false
|
|
48
29
|
end
|
|
49
30
|
|
|
31
|
+
desc 'Test with different versions of Jekyll'
|
|
50
32
|
task :jekylls do
|
|
51
33
|
sh 'cd test-jekylls; make'
|
|
52
34
|
end
|
|
@@ -64,13 +46,4 @@ require 'rubocop/rake_task'
|
|
|
64
46
|
desc 'Run RuboCop on all directories'
|
|
65
47
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
66
48
|
task.fail_on_error = true
|
|
67
|
-
task.requires << 'rubocop-rspec'
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
task :copyright do
|
|
71
|
-
sh "grep -q -r '2014-#{Date.today.strftime('%Y')}' \
|
|
72
|
-
--include '*.rb' \
|
|
73
|
-
--include '*.txt' \
|
|
74
|
-
--include 'Rakefile' \
|
|
75
|
-
."
|
|
76
49
|
end
|
data/jekyll-plantuml.gemspec
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
3
6
|
require 'English'
|
|
4
7
|
lib = File.expand_path('lib', __dir__)
|
|
5
8
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
@@ -20,6 +23,6 @@ Gem::Specification.new do |s|
|
|
|
20
23
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
21
24
|
s.rdoc_options = ['--charset=UTF-8']
|
|
22
25
|
s.extra_rdoc_files = %w[README.md LICENSE.txt]
|
|
23
|
-
s.
|
|
26
|
+
s.add_dependency 'jekyll', '>2.0'
|
|
24
27
|
s.metadata['rubygems_mfa_required'] = 'true'
|
|
25
28
|
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
6
|
+
require 'jekyll'
|
|
7
|
+
require 'liquid'
|
|
8
|
+
require 'digest'
|
|
9
|
+
require 'fileutils'
|
|
10
|
+
|
|
11
|
+
# Jekyll main module.
|
|
12
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
13
|
+
# Copyright:: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
14
|
+
# License:: MIT
|
|
15
|
+
class Jekyll::PlantumlFile < Liquid::Block
|
|
16
|
+
def initialize(tag_name, markup, tokens)
|
|
17
|
+
super
|
|
18
|
+
@html = (markup or '').strip
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def render(context)
|
|
22
|
+
site = context.registers[:site]
|
|
23
|
+
relative_file_name = super.to_s
|
|
24
|
+
full_file_name = File.join(site.source, relative_file_name)
|
|
25
|
+
body = File.read(full_file_name)
|
|
26
|
+
name = Digest::MD5.hexdigest(body)
|
|
27
|
+
unless File.exist?(File.join(site.dest, "uml/#{name}.svg"))
|
|
28
|
+
# uml = File.join(site.source, "uml/#{name}.uml")
|
|
29
|
+
svg = File.join(site.source, "uml/#{name}.svg")
|
|
30
|
+
if File.exist?(svg)
|
|
31
|
+
puts "File #{svg} already exists (#{File.size(svg)} bytes)"
|
|
32
|
+
else
|
|
33
|
+
uml = File.join(site.source, "uml/#{name}.uml")
|
|
34
|
+
FileUtils.mkdir_p(File.dirname(uml))
|
|
35
|
+
IO.copy_stream(full_file_name, uml)
|
|
36
|
+
unless system("plantuml -tsvg #{uml} 2>&1")
|
|
37
|
+
raise "PlantUML failed to compile the following snippet (see logs above):\n#{body}\n"
|
|
38
|
+
end
|
|
39
|
+
site.static_files << Jekyll::StaticFile.new(
|
|
40
|
+
site, site.source, 'uml', "#{name}.svg"
|
|
41
|
+
)
|
|
42
|
+
puts "\nFile #{svg} created (#{File.size(svg)} bytes)"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
"<p><object data='#{site.baseurl}/uml/#{name}.svg' type='image/svg+xml' #{@html} class='plantuml'></object></p>"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
Liquid::Template.register_tag('plantuml_file', Jekyll::PlantumlFile)
|
data/lib/jekyll-plantuml.rb
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# (
|
|
4
|
-
#
|
|
5
|
-
# Copyright (c) 2014-2024 Yegor Bugayenko
|
|
6
|
-
#
|
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
# furnished to do so, subject to the following conditions:
|
|
13
|
-
#
|
|
14
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
# copies or substantial portions of the Software.
|
|
16
|
-
#
|
|
17
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
24
5
|
|
|
25
6
|
require 'jekyll'
|
|
26
7
|
require 'liquid'
|
|
27
8
|
require 'digest'
|
|
28
9
|
require 'fileutils'
|
|
10
|
+
require_relative 'jekyll-plantuml-file'
|
|
29
11
|
|
|
30
12
|
# Jekyll main module.
|
|
31
13
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2014-
|
|
14
|
+
# Copyright:: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
33
15
|
# License:: MIT
|
|
34
16
|
class Jekyll::PlantumlBlock < Liquid::Block
|
|
35
17
|
def initialize(tag_name, markup, tokens)
|
data/lib/version.rb
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# (
|
|
4
|
-
#
|
|
5
|
-
# Copyright (c) 2014-2024 Yegor Bugayenko
|
|
6
|
-
#
|
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
# furnished to do so, subject to the following conditions:
|
|
13
|
-
#
|
|
14
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
# copies or substantial portions of the Software.
|
|
16
|
-
#
|
|
17
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
24
5
|
|
|
25
6
|
module PlantUML
|
|
26
|
-
VERSION = '1.
|
|
7
|
+
VERSION = '1.5.0'
|
|
27
8
|
end
|
data/test/schema.puml
ADDED
data/test/test__helper.rb
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2014-
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
22
5
|
|
|
23
6
|
$stdout.sync = true
|
|
24
7
|
|
|
25
8
|
require 'simplecov'
|
|
26
|
-
|
|
9
|
+
require 'simplecov-cobertura'
|
|
10
|
+
unless SimpleCov.running
|
|
11
|
+
SimpleCov.command_name('test')
|
|
12
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
|
13
|
+
[
|
|
14
|
+
SimpleCov::Formatter::HTMLFormatter,
|
|
15
|
+
SimpleCov::Formatter::CoberturaFormatter
|
|
16
|
+
]
|
|
17
|
+
)
|
|
18
|
+
SimpleCov.minimum_coverage 80
|
|
19
|
+
SimpleCov.minimum_coverage_by_file 80
|
|
20
|
+
SimpleCov.start do
|
|
21
|
+
add_filter 'test/'
|
|
22
|
+
add_filter 'vendor/'
|
|
23
|
+
add_filter 'target/'
|
|
24
|
+
track_files 'lib/**/*.rb'
|
|
25
|
+
track_files '*.rb'
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
require 'minitest/autorun'
|
|
30
|
+
require 'minitest/reporters'
|
|
31
|
+
Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new]
|
|
32
|
+
Minitest.load :minitest_reporter
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
6
|
+
require 'liquid'
|
|
7
|
+
require 'tmpdir'
|
|
8
|
+
require_relative 'test__helper'
|
|
9
|
+
require_relative '../lib/jekyll-plantuml-file'
|
|
10
|
+
|
|
11
|
+
# PlantumlBlock test.
|
|
12
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
13
|
+
# Copyright:: Copyright (c) 2023-2025 Yegor Bugayenko
|
|
14
|
+
# License:: MIT
|
|
15
|
+
class PlantumlFileTest < Minitest::Test
|
|
16
|
+
def test_failure
|
|
17
|
+
schema_file = File.join(Dir.getwd, 'test/schema.puml')
|
|
18
|
+
puts "Schema file: #{schema_file}"
|
|
19
|
+
Dir.mktmpdir 'test' do |dir|
|
|
20
|
+
template = Liquid::Template.parse('{% plantuml_file %}schema.puml{% endplantuml_file %}')
|
|
21
|
+
source_dir = File.join(dir, 'source')
|
|
22
|
+
target_file = File.join(source_dir, 'schema.puml')
|
|
23
|
+
puts "Target file: #{target_file}"
|
|
24
|
+
puts "Folder exists: #{File.exist?(dir)}"
|
|
25
|
+
puts "File exists: #{File.exist?(schema_file)}"
|
|
26
|
+
FileUtils.mkdir_p(source_dir)
|
|
27
|
+
FileUtils.cp(schema_file, target_file)
|
|
28
|
+
puts "File exists after: #{File.exist?(target_file)}"
|
|
29
|
+
config = {
|
|
30
|
+
'destination' => File.join(dir, 'dest'),
|
|
31
|
+
'source' => source_dir
|
|
32
|
+
}
|
|
33
|
+
context = Liquid::Context.new({}, {}, { site: Jekyll::Site.new(Jekyll.configuration(config)) })
|
|
34
|
+
block = template.root.nodelist.first
|
|
35
|
+
output = block.render(context)
|
|
36
|
+
assert(output.start_with?('<p><object'))
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
data/test/test_plantuml.rb
CHANGED
|
@@ -1,36 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# (
|
|
4
|
-
#
|
|
5
|
-
# Copyright (c) 2014-2024 Yegor Bugayenko
|
|
6
|
-
#
|
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
# furnished to do so, subject to the following conditions:
|
|
13
|
-
#
|
|
14
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
# copies or substantial portions of the Software.
|
|
16
|
-
#
|
|
17
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
24
5
|
|
|
25
6
|
require 'liquid'
|
|
26
7
|
require 'tmpdir'
|
|
27
|
-
require 'minitest/autorun'
|
|
28
8
|
require_relative 'test__helper'
|
|
29
9
|
require_relative '../lib/jekyll-plantuml'
|
|
30
10
|
|
|
31
11
|
# PlantumlBlock test.
|
|
32
12
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
33
|
-
# Copyright:: Copyright (c) 2023-
|
|
13
|
+
# Copyright:: Copyright (c) 2023-2025 Yegor Bugayenko
|
|
34
14
|
# License:: MIT
|
|
35
15
|
class PlantumlBlockTest < Minitest::Test
|
|
36
16
|
def test_failure
|
data/test-jekylls/.gitignore
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
_site/
|
|
2
|
-
uml/
|
|
2
|
+
uml/
|
data/test-jekylls/Makefile
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
1
4
|
.ONESHELL:
|
|
2
5
|
.SHELLFLAGS: -e -o pipefail -c
|
|
3
6
|
.PHONY: clean sa env lint
|
|
@@ -10,4 +13,4 @@ all:
|
|
|
10
13
|
cd $${t}
|
|
11
14
|
bundle install
|
|
12
15
|
bundle exec jekyll build
|
|
13
|
-
done
|
|
16
|
+
done
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
3
6
|
source 'https://rubygems.org'
|
|
4
7
|
|
|
5
|
-
gem 'jekyll', '4.
|
|
8
|
+
gem 'jekyll', '4.4.1'
|
|
6
9
|
gem 'jekyll-plantuml', path: '../..'
|
|
7
|
-
gem 'kramdown', '2.
|
|
10
|
+
gem 'kramdown', '2.5.1'
|
|
8
11
|
gem 'kramdown-parser-gfm', '1.1.0'
|
|
9
12
|
gem 'liquid', '4.0.4'
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
3
6
|
source 'https://rubygems.org'
|
|
4
7
|
|
|
5
|
-
gem 'jekyll', '4.
|
|
8
|
+
gem 'jekyll', '4.4.1'
|
|
6
9
|
gem 'jekyll-plantuml', path: '../..'
|
|
7
|
-
gem 'kramdown', '2.
|
|
10
|
+
gem 'kramdown', '2.5.1'
|
|
8
11
|
gem 'liquid', '4.0.4'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-plantuml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-12-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -33,19 +33,28 @@ extra_rdoc_files:
|
|
|
33
33
|
- LICENSE.txt
|
|
34
34
|
files:
|
|
35
35
|
- ".0pdd.yml"
|
|
36
|
+
- ".github/workflows/actionlint.yml"
|
|
36
37
|
- ".github/workflows/codecov.yml"
|
|
38
|
+
- ".github/workflows/copyrights.yml"
|
|
39
|
+
- ".github/workflows/markdown-lint.yml"
|
|
37
40
|
- ".github/workflows/pdd.yml"
|
|
38
41
|
- ".github/workflows/rake.yml"
|
|
42
|
+
- ".github/workflows/reuse.yml"
|
|
43
|
+
- ".github/workflows/typos.yml"
|
|
39
44
|
- ".github/workflows/xcop.yml"
|
|
45
|
+
- ".github/workflows/yamllint.yml"
|
|
40
46
|
- ".gitignore"
|
|
41
47
|
- ".pdd"
|
|
42
48
|
- ".rubocop.yml"
|
|
43
49
|
- ".rultor.yml"
|
|
44
50
|
- Gemfile
|
|
45
51
|
- LICENSE.txt
|
|
52
|
+
- LICENSES/MIT.txt
|
|
46
53
|
- README.md
|
|
54
|
+
- REUSE.toml
|
|
47
55
|
- Rakefile
|
|
48
56
|
- jekyll-plantuml.gemspec
|
|
57
|
+
- lib/jekyll-plantuml-file.rb
|
|
49
58
|
- lib/jekyll-plantuml.rb
|
|
50
59
|
- lib/version.rb
|
|
51
60
|
- renovate.json
|
|
@@ -59,7 +68,9 @@ files:
|
|
|
59
68
|
- test-jekylls/jekyll-4/_config.yml
|
|
60
69
|
- test-jekylls/jekyll-4/_layouts/default.html
|
|
61
70
|
- test-jekylls/jekyll-4/_posts/2023/06/2023-06-02-test.md
|
|
71
|
+
- test/schema.puml
|
|
62
72
|
- test/test__helper.rb
|
|
73
|
+
- test/test_plantuml-file.rb
|
|
63
74
|
- test/test_plantuml.rb
|
|
64
75
|
homepage: https://github.com/yegor256/jekyll-plantuml
|
|
65
76
|
licenses:
|