jekyll-plantuml 1.3.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +3 -9
- data/Gemfile +6 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -6
- data/Rakefile +19 -2
- data/jekyll-plantuml.gemspec +11 -13
- data/lib/{jekyll-plantuml.rb → jekyll_plantuml.rb} +12 -5
- data/lib/version.rb +4 -2
- data/renovate.json +6 -0
- metadata +13 -23
- data/.github/ISSUE_TEMPLATE.md +0 -12
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
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
|
@@ -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,12 +1,10 @@
|
|
1
|
+
docker:
|
2
|
+
image: yegor256/rultor-image:1.20.0
|
1
3
|
assets:
|
2
4
|
rubygems.yml: yegor256/home#assets/rubygems.yml
|
3
|
-
s3cfg: yegor256/home#assets/s3cfg
|
4
5
|
install: |
|
5
|
-
export GEM_HOME=~/.ruby
|
6
|
-
export GEM_PATH=$GEM_HOME:$GEM_PATH
|
7
|
-
sudo gem install pdd -v 0.20.5
|
8
|
-
bundle install
|
9
6
|
pdd -f /dev/null
|
7
|
+
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
10
8
|
release:
|
11
9
|
script: |-
|
12
10
|
bundle exec rake
|
@@ -20,7 +18,3 @@ release:
|
|
20
18
|
merge:
|
21
19
|
script: |-
|
22
20
|
bundle exec rake
|
23
|
-
deploy:
|
24
|
-
script: |-
|
25
|
-
echo "There is nothing to deploy"
|
26
|
-
exit -1
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
+
[![rake](https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/jekyll-plantuml/actions/workflows/rake.yml)
|
1
2
|
[![Gem Version](https://badge.fury.io/rb/jekyll-plantuml.svg)](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,27 +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
23
|
s.add_runtime_dependency 'jekyll', '>2.0'
|
26
|
-
s.
|
24
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
27
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,18 +40,18 @@ 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
|
-
|
54
|
+
end
|
48
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"
|
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
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 12.0.0
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 12.0.0
|
41
27
|
description: PlantUML diagrams in Jekyll pages
|
42
28
|
email: yegor@tpc2.com
|
43
29
|
executables: []
|
@@ -47,10 +33,12 @@ extra_rdoc_files:
|
|
47
33
|
- LICENSE.txt
|
48
34
|
files:
|
49
35
|
- ".0pdd.yml"
|
50
|
-
- ".github/
|
51
|
-
- ".github/
|
36
|
+
- ".github/workflows/pdd.yml"
|
37
|
+
- ".github/workflows/rake.yml"
|
38
|
+
- ".github/workflows/xcop.yml"
|
52
39
|
- ".gitignore"
|
53
40
|
- ".pdd"
|
41
|
+
- ".rubocop.yml"
|
54
42
|
- ".rultor.yml"
|
55
43
|
- ".travis.yml"
|
56
44
|
- Gemfile
|
@@ -58,12 +46,14 @@ files:
|
|
58
46
|
- README.md
|
59
47
|
- Rakefile
|
60
48
|
- jekyll-plantuml.gemspec
|
61
|
-
- lib/
|
49
|
+
- lib/jekyll_plantuml.rb
|
62
50
|
- lib/version.rb
|
63
|
-
|
51
|
+
- renovate.json
|
52
|
+
homepage: https://github.com/yegor256/jekyll-plantuml
|
64
53
|
licenses:
|
65
54
|
- MIT
|
66
|
-
metadata:
|
55
|
+
metadata:
|
56
|
+
rubygems_mfa_required: 'true'
|
67
57
|
post_install_message:
|
68
58
|
rdoc_options:
|
69
59
|
- "--charset=UTF-8"
|
@@ -80,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
70
|
- !ruby/object:Gem::Version
|
81
71
|
version: '0'
|
82
72
|
requirements: []
|
83
|
-
rubygems_version: 3.
|
73
|
+
rubygems_version: 3.2.15
|
84
74
|
signing_key:
|
85
|
-
specification_version:
|
75
|
+
specification_version: 4
|
86
76
|
summary: Jekyll PlantUML Automation
|
87
77
|
test_files: []
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Make sure the title of the issue explains the problem you are having. Also, the description of the issue must clearly explain what is broken, not what you want us to implement. Go through this checklist and make sure you answer "YES" to all points:
|
2
|
-
|
3
|
-
- You have all pre-requisites listed in README.md installed
|
4
|
-
- You are sure that you are not reporting a duplicate (search all issues)
|
5
|
-
- You say "is broken" or "doesn't work" in the title
|
6
|
-
- You tell us what you are trying to do
|
7
|
-
- You explain the results you are getting
|
8
|
-
- You suggest an alternative result you would like to see
|
9
|
-
|
10
|
-
This article will help you understand what we are looking for: http://www.yegor256.com/2014/11/24/principles-of-bug-tracking.html
|
11
|
-
|
12
|
-
Thank you for your contribution!
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Many thanks for your contribution, we truly appreciate it. We will appreciate it even more, if you make sure that you can say "YES" to each point in this short checklist:
|
2
|
-
|
3
|
-
- You made a small amount of changes (less than 100 lines, less than 10 files)
|
4
|
-
- You made changes related to only one bug (create separate PRs for separate problems)
|
5
|
-
- You are ready to defend your changes (there will be a code review)
|
6
|
-
- You don't touch what you don't understand
|
7
|
-
- You ran the build locally and it passed
|
8
|
-
|
9
|
-
This article will help you understand what we are looking for: http://www.yegor256.com/2015/02/09/serious-code-reviewer.html
|
10
|
-
|
11
|
-
Thank you for your contribution!
|