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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51daf562588034598bf5b90637effc7597bfc2dba215ccaad8e0c9f9aa2dd285
4
- data.tar.gz: 72a2fa53f9024c0dfc1a8170d0bf8cb8d3f0b556d67e35623a01ae2204d24112
3
+ metadata.gz: 28129a00eff58d52229ade0dc74dc009b052597309bf6e9758401aeb0308b8e3
4
+ data.tar.gz: b44e4f4c8d9cfdfe98c179f775b519a6a57dd57ad9ac6fe0c2487592416bd6d0
5
5
  SHA512:
6
- metadata.gz: 68f2e0c80212045b46d6e975e72ab6c17340084f60f952ed20f296e7c54b2f625e994016f70ddfabfe3c7f083f8d0d3858ac7036ea3c9fdfe0470cc200cc9141
7
- data.tar.gz: 26a44da82ea8780bccdd2f1134423ffd6fc7c2b75b1968c668f755d4b35f5ea16801ee6760975388c0342376bdeaee66fcca72fc5bf75881acf6fab4aedd185f
6
+ metadata.gz: bcc87236d47ad23085ed51ae65f2927f80e73795cddc9be4b1c6ccc67986ed96447c588cc89aaa99370f7b46bd24e0c2abae50cad57553edbcc441a2991d1180
7
+ data.tar.gz: d55476f68d7cdc8a4809283dc8e79dfee6eb793fd9126192def60a284ac23e2087c31e9586f8c9fccc37229e325929a4316deae9d8e90cf58a1407a654309c52
data/.0pdd.yml CHANGED
@@ -1,3 +1,6 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
1
4
  errors:
2
5
  - yegor256@gmail.com
3
6
  # alerts:
@@ -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
- runs-on: ubuntu-22.04
12
+ timeout-minutes: 15
13
+ runs-on: ubuntu-24.04
10
14
  steps:
11
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
15
+ - uses: actions/checkout@v6
12
16
  - uses: ruby/setup-ruby@v1
13
17
  with:
14
- ruby-version: 2.7
15
- - run: sudo apt-get -y install plantuml
16
- - run: bundle update
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@v4.0.0-beta.3
24
+ - uses: codecov/codecov-action@v5
19
25
  with:
20
26
  token: ${{ secrets.CODECOV_TOKEN }}
21
- file: coverage/.resultset.json
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
@@ -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
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
13
17
  steps:
14
- - uses: actions/checkout@v4
18
+ - uses: actions/checkout@v6
15
19
  - uses: volodya-lombrozo/pdd-action@master
@@ -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-20.04]
16
- ruby: [2.7, 3.2]
17
+ os: [ubuntu-24.04]
18
+ ruby: [3.3]
17
19
  runs-on: ${{ matrix.os }}
18
20
  steps:
19
- - uses: actions/checkout@v4
21
+ - uses: actions/checkout@v6
20
22
  - uses: ruby/setup-ruby@v1
21
23
  with:
22
24
  ruby-version: ${{ matrix.ruby }}
23
- - run: sudo apt-get -y install plantuml
24
- - run: bundle update
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
@@ -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
- runs-on: ubuntu-22.04
11
+ timeout-minutes: 15
12
+ runs-on: ubuntu-24.04
9
13
  steps:
10
- - uses: actions/checkout@v4
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
@@ -1,5 +1,11 @@
1
- Gemfile.lock
2
- *.gem
3
1
  .bundle/
4
2
  .DS_Store
5
- coverage/
3
+ .idea/
4
+ .yardoc/
5
+ *.gem
6
+ coverage/
7
+ doc/
8
+ Gemfile.lock
9
+ node_modules/
10
+ rdoc/
11
+ vendor/
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: 30
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.22.0
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 -y install plantuml
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 'minitest', '5.22.0', require: false
7
- gem 'rake', '13.1.0', require: false
8
- gem 'rubocop', '1.60.2', require: false
9
- gem 'rubocop-rspec', '2.26.1', require: false
10
- gem 'simplecov', '0.22.0', require: false
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
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2014-2024 Yegor Bugayenko
3
+ Copyright (c) 2014-2025 Yegor Bugayenko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the 'Software'), to deal
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
- [![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/jekyll-plantuml)](http://www.rultor.com/p/yegor256/jekyll-plantuml)
2
- [![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
1
+ # PlantUML Diagrams in Jekyll Static Sites
3
2
 
4
- [![rake](https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml)
5
- [![Gem Version](https://badge.fury.io/rb/jekyll-plantuml.svg)](http://badge.fury.io/rb/jekyll-plantuml)
6
- [![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/jekyll-plantuml.svg)](https://codecov.io/github/yegor256/jekyll-plantuml?branch=master)
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
- $ gem install jekyll-plantuml
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
- Highly recommend to use Bundler. If you're using it, add this line
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.9.3](https://jekyllrb.com/news/2023/01/29/jekyll-3-9-3-released/) and
37
- [Jekyll 4.3.2](https://jekyllrb.com/news/2023/01/20/jekyll-4-3-2-released/).
38
- You can find our integration tests, which prove the compatibility,
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](http://plantuml.sourceforge.net/download.html)
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
- $ chmod +x /usr/bin/plantuml
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, in your Jekyll blog page:
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
- Now, check [this blog post](http://www.yegor256.com/2014/06/01/aop-aspectj-java-method-logging.html):
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](https://github.com/yegor256/blog).
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](https://www.yegor256.com/2014/04/15/github-guidelines.html).
81
- Make sure you build is green before you contribute
82
- your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
83
- [Bundler](https://bundler.io/) installed. Then:
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
- $ bundle update
87
- $ bundle exec rake
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
- # (The MIT License)
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 copyright]
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
@@ -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.add_runtime_dependency 'jekyll', '>2.0'
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)
@@ -1,35 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
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-2024 Yegor Bugayenko
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
- # (The MIT License)
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.4.2'
7
+ VERSION = '1.5.0'
27
8
  end
data/test/schema.puml ADDED
@@ -0,0 +1,3 @@
1
+ @startuml
2
+ [A] -> [B]
3
+ @enduml
data/test/test__helper.rb CHANGED
@@ -1,26 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2014-2024 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 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
- SimpleCov.start
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
@@ -1,36 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
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-2024 Yegor Bugayenko
13
+ # Copyright:: Copyright (c) 2023-2025 Yegor Bugayenko
34
14
  # License:: MIT
35
15
  class PlantumlBlockTest < Minitest::Test
36
16
  def test_failure
@@ -1,2 +1,2 @@
1
1
  _site/
2
- uml/
2
+ uml/
@@ -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.3.3'
8
+ gem 'jekyll', '4.4.1'
6
9
  gem 'jekyll-plantuml', path: '../..'
7
- gem 'kramdown', '2.4.0'
10
+ gem 'kramdown', '2.5.1'
8
11
  gem 'kramdown-parser-gfm', '1.1.0'
9
12
  gem 'liquid', '4.0.4'
@@ -1,3 +1,6 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
1
4
  title: simple
2
5
  markdown: kramdown
3
6
  encoding: utf-8
@@ -1,4 +1,7 @@
1
1
  ---
2
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
3
+ # SPDX-License-Identifier: MIT
4
+
2
5
  layout: default
3
6
  ---
4
7
  <!DOCTYPE html>
@@ -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.3.3'
8
+ gem 'jekyll', '4.4.1'
6
9
  gem 'jekyll-plantuml', path: '../..'
7
- gem 'kramdown', '2.4.0'
10
+ gem 'kramdown', '2.5.1'
8
11
  gem 'liquid', '4.0.4'
@@ -1,3 +1,6 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
1
4
  title: simple
2
5
  markdown: kramdown
3
6
  encoding: utf-8
@@ -1,4 +1,7 @@
1
1
  ---
2
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
3
+ # SPDX-License-Identifier: MIT
4
+
2
5
  layout: default
3
6
  ---
4
7
  <!DOCTYPE html>
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.2
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: 2024-02-06 00:00:00.000000000 Z
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: