jekyll-plantuml 1.3.3 → 1.4.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 +5 -5
- data/.0pdd.yml +4 -0
- data/.github/workflows/pdd.yml +11 -0
- data/.github/workflows/rake.yml +24 -0
- data/.github/workflows/xcop.yml +11 -0
- data/.rubocop.yml +15 -0
- data/.rultor.yml +9 -12
- data/Gemfile +6 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -6
- data/Rakefile +19 -2
- data/jekyll-plantuml.gemspec +12 -13
- data/lib/{jekyll-plantuml.rb → jekyll_plantuml.rb} +14 -8
- data/lib/version.rb +4 -2
- data/renovate.json +6 -0
- metadata +13 -9
- data/TEAM.md +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2697b42a31945ffb30c6daaffbd25fad42fac637ded85a28d880a901498eae00
|
4
|
+
data.tar.gz: f707a12ea2d90e5b128afc2b98f9d482fcf44041cfc4d0b1671d3a63e71d5ddb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 251252e096489b6522e3d2b0d1a6d72eaacae391dbb4a25191a387ae309ff9a462d19b718bcc6c9c58edd336e65882f992d47b78302ffd93b34f33b39b3b7792
|
7
|
+
data.tar.gz: fa076635bda7053181e182622159ec0274878f41d7c562caec73512f7e46afc0e854da25ca142efc862bbe4df991db475af4ab9198ba0eb30e8d30e29c177b65
|
data/.0pdd.yml
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
name: rake
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
jobs:
|
11
|
+
test:
|
12
|
+
name: test
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
os: [ubuntu-20.04, macos-12]
|
16
|
+
ruby: [2.7, 3.2]
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v3
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
- run: bundle update
|
24
|
+
- run: bundle exec rake
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'bin/**/*'
|
4
|
+
- 'assets/**/*'
|
5
|
+
DisplayCopNames: true
|
6
|
+
TargetRubyVersion: 2.3
|
7
|
+
SuggestExtensions: false
|
8
|
+
NewCops: enable
|
9
|
+
|
10
|
+
Gemspec/RequiredRubyVersion:
|
11
|
+
Enabled: false
|
12
|
+
Metrics/MethodLength:
|
13
|
+
Enabled: false
|
14
|
+
Metrics/AbcSize:
|
15
|
+
Max: 30
|
data/.rultor.yml
CHANGED
@@ -1,10 +1,13 @@
|
|
1
|
+
docker:
|
2
|
+
image: yegor256/rultor-image:1.20.0
|
1
3
|
assets:
|
2
|
-
rubygems.yml:
|
3
|
-
|
4
|
+
rubygems.yml: yegor256/home#assets/rubygems.yml
|
5
|
+
install: |
|
6
|
+
pdd -f /dev/null
|
7
|
+
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
4
8
|
release:
|
5
9
|
script: |-
|
6
|
-
bundle
|
7
|
-
rake
|
10
|
+
bundle exec rake
|
8
11
|
rm -rf *.gem
|
9
12
|
sed -i "s/1\.0\.snapshot/${tag}/g" lib/version.rb
|
10
13
|
git add lib/version.rb
|
@@ -12,12 +15,6 @@ release:
|
|
12
15
|
gem build jekyll-plantuml.gemspec
|
13
16
|
chmod 0600 ../rubygems.yml
|
14
17
|
gem push *.gem --config-file ../rubygems.yml
|
15
|
-
commanders:
|
16
|
-
- yegor256
|
17
|
-
deploy:
|
18
|
-
script: bundle
|
19
|
-
architect:
|
20
|
-
- yegor256
|
21
|
-
- davvd
|
22
18
|
merge:
|
23
|
-
|
19
|
+
script: |-
|
20
|
+
bundle exec rake
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
+
[](https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml)
|
1
2
|
[](http://badge.fury.io/rb/jekyll-plantuml)
|
2
3
|
|
3
|
-
## Install Jekyll plugin
|
4
|
-
|
5
4
|
Install it first:
|
6
5
|
|
7
6
|
```
|
@@ -19,7 +18,7 @@ create a plugin file within your Jekyll project's `_plugins` directory:
|
|
19
18
|
|
20
19
|
```ruby
|
21
20
|
# _plugins/plantuml-plugin.rb
|
22
|
-
require "
|
21
|
+
require "jekyll_plantuml"
|
23
22
|
```
|
24
23
|
|
25
24
|
Highly recommend to use Bundler. If you're using it, add this line
|
@@ -61,7 +60,7 @@ Now, it's time to create a diagram, in your Jekyll blog page:
|
|
61
60
|
{% endplantuml %}
|
62
61
|
```
|
63
62
|
|
64
|
-
|
65
|
-
UML sequence diagram in
|
66
|
-
|
63
|
+
Now, check [this blog post](http://www.yegor256.com/2014/06/01/aop-aspectj-java-method-logging.html):
|
64
|
+
the UML sequence diagram in it is auto-generated using exactly this plugin.
|
65
|
+
The sources of the blog are available in [GitHub](https://github.com/yegor256/blog).
|
67
66
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# (The MIT License)
|
2
4
|
#
|
3
|
-
# Copyright (c) 2014-
|
5
|
+
# Copyright (c) 2014-2023 Yegor Bugayenko
|
4
6
|
#
|
5
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -33,7 +35,7 @@ def version
|
|
33
35
|
Gem::Specification.load(Dir['*.gemspec'].first).version
|
34
36
|
end
|
35
37
|
|
36
|
-
task default: [
|
38
|
+
task default: %i[clean rubocop copyright]
|
37
39
|
|
38
40
|
require 'rdoc/task'
|
39
41
|
desc 'Build RDoc documentation'
|
@@ -43,3 +45,18 @@ Rake::RDocTask.new do |rdoc|
|
|
43
45
|
rdoc.rdoc_files.include('README*')
|
44
46
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
47
|
end
|
48
|
+
|
49
|
+
require 'rubocop/rake_task'
|
50
|
+
desc 'Run RuboCop on all directories'
|
51
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
52
|
+
task.fail_on_error = true
|
53
|
+
task.requires << 'rubocop-rspec'
|
54
|
+
end
|
55
|
+
|
56
|
+
task :copyright do
|
57
|
+
sh "grep -q -r '2014-#{Date.today.strftime('%Y')}' \
|
58
|
+
--include '*.rb' \
|
59
|
+
--include '*.txt' \
|
60
|
+
--include 'Rakefile' \
|
61
|
+
."
|
62
|
+
end
|
data/jekyll-plantuml.gemspec
CHANGED
@@ -1,26 +1,25 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require 'English'
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
4
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
6
|
require 'version'
|
6
7
|
|
7
8
|
Gem::Specification.new do |s|
|
8
|
-
s.
|
9
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
10
|
-
s.rubygems_version = '2.2.2'
|
9
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
11
10
|
s.required_ruby_version = '>= 1.9.3'
|
12
11
|
s.name = 'jekyll-plantuml'
|
13
12
|
s.version = PlantUML::VERSION
|
14
13
|
s.license = 'MIT'
|
15
|
-
s.summary =
|
16
|
-
s.description =
|
17
|
-
s.authors = [
|
14
|
+
s.summary = 'Jekyll PlantUML Automation'
|
15
|
+
s.description = 'PlantUML diagrams in Jekyll pages'
|
16
|
+
s.authors = ['Yegor Bugayenko']
|
18
17
|
s.email = 'yegor@tpc2.com'
|
19
|
-
s.homepage = '
|
20
|
-
s.files = `git ls-files`.split(
|
18
|
+
s.homepage = 'https://github.com/yegor256/jekyll-plantuml'
|
19
|
+
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
21
20
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
-
s.
|
23
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
21
|
+
s.rdoc_options = ['--charset=UTF-8']
|
24
22
|
s.extra_rdoc_files = %w[README.md LICENSE.txt]
|
25
|
-
s.add_runtime_dependency
|
23
|
+
s.add_runtime_dependency 'jekyll', '>2.0'
|
24
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
26
25
|
end
|
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# (The MIT License)
|
2
4
|
#
|
3
|
-
# Copyright (c) 2014-
|
5
|
+
# Copyright (c) 2014-2023 Yegor Bugayenko
|
4
6
|
#
|
5
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -23,7 +25,12 @@
|
|
23
25
|
require 'digest'
|
24
26
|
require 'fileutils'
|
25
27
|
|
28
|
+
# Jekyll main module.
|
29
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
30
|
+
# Copyright:: Copyright (c) 2014-2023 Yegor Bugayenko
|
31
|
+
# License:: MIT
|
26
32
|
module Jekyll
|
33
|
+
# The main class
|
27
34
|
class PlantumlBlock < Liquid::Block
|
28
35
|
def initialize(tag_name, markup, tokens)
|
29
36
|
super
|
@@ -33,27 +40,26 @@ module Jekyll
|
|
33
40
|
def render(context)
|
34
41
|
site = context.registers[:site]
|
35
42
|
name = Digest::MD5.hexdigest(super)
|
36
|
-
|
43
|
+
unless File.exist?(File.join(site.dest, "uml/#{name}.svg"))
|
37
44
|
uml = File.join(site.source, "uml/#{name}.uml")
|
38
45
|
svg = File.join(site.source, "uml/#{name}.svg")
|
39
|
-
if File.
|
46
|
+
if File.exist?(svg)
|
40
47
|
puts "File #{svg} already exists (#{File.size(svg)} bytes)"
|
41
48
|
else
|
42
49
|
FileUtils.mkdir_p(File.dirname(uml))
|
43
|
-
File.open(uml, 'w')
|
50
|
+
File.open(uml, 'w') do |f|
|
44
51
|
f.write("@startuml\n")
|
45
52
|
f.write(super)
|
46
53
|
f.write("\n@enduml")
|
47
|
-
|
48
|
-
system("plantuml -tsvg #{uml}")
|
54
|
+
end
|
55
|
+
system("plantuml -tsvg #{uml}") or raise "PlantUML error: #{super}"
|
49
56
|
site.static_files << Jekyll::StaticFile.new(
|
50
57
|
site, site.source, 'uml', "#{name}.svg"
|
51
58
|
)
|
52
59
|
puts "File #{svg} created (#{File.size(svg)} bytes)"
|
53
60
|
end
|
54
61
|
end
|
55
|
-
"<p><
|
56
|
-
alt='PlantUML SVG diagram' class='plantuml'/></p>"
|
62
|
+
"<p><object data='#{site.baseurl}/uml/#{name}.svg' type='image/svg+xml' #{@html} class='plantuml'></object></p>"
|
57
63
|
end
|
58
64
|
end
|
59
65
|
end
|
data/lib/version.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# (The MIT License)
|
2
4
|
#
|
3
|
-
# Copyright (c) 2014-
|
5
|
+
# Copyright (c) 2014-2023 Yegor Bugayenko
|
4
6
|
#
|
5
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,5 +23,5 @@
|
|
21
23
|
# SOFTWARE.
|
22
24
|
|
23
25
|
module PlantUML
|
24
|
-
VERSION = '1.
|
26
|
+
VERSION = '1.4.0'
|
25
27
|
end
|
data/renovate.json
ADDED
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.4.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: 2023-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -33,22 +33,27 @@ extra_rdoc_files:
|
|
33
33
|
- LICENSE.txt
|
34
34
|
files:
|
35
35
|
- ".0pdd.yml"
|
36
|
+
- ".github/workflows/pdd.yml"
|
37
|
+
- ".github/workflows/rake.yml"
|
38
|
+
- ".github/workflows/xcop.yml"
|
36
39
|
- ".gitignore"
|
37
40
|
- ".pdd"
|
41
|
+
- ".rubocop.yml"
|
38
42
|
- ".rultor.yml"
|
39
43
|
- ".travis.yml"
|
40
44
|
- Gemfile
|
41
45
|
- LICENSE.txt
|
42
46
|
- README.md
|
43
47
|
- Rakefile
|
44
|
-
- TEAM.md
|
45
48
|
- jekyll-plantuml.gemspec
|
46
|
-
- lib/
|
49
|
+
- lib/jekyll_plantuml.rb
|
47
50
|
- lib/version.rb
|
48
|
-
|
51
|
+
- renovate.json
|
52
|
+
homepage: https://github.com/yegor256/jekyll-plantuml
|
49
53
|
licenses:
|
50
54
|
- MIT
|
51
|
-
metadata:
|
55
|
+
metadata:
|
56
|
+
rubygems_mfa_required: 'true'
|
52
57
|
post_install_message:
|
53
58
|
rdoc_options:
|
54
59
|
- "--charset=UTF-8"
|
@@ -65,9 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
70
|
- !ruby/object:Gem::Version
|
66
71
|
version: '0'
|
67
72
|
requirements: []
|
68
|
-
|
69
|
-
rubygems_version: 2.6.8
|
73
|
+
rubygems_version: 3.2.15
|
70
74
|
signing_key:
|
71
|
-
specification_version:
|
75
|
+
specification_version: 4
|
72
76
|
summary: Jekyll PlantUML Automation
|
73
77
|
test_files: []
|