jekyll-plantuml 1.3.4 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac2e323ded0c0a23181c76586e43737fed9acb33bb21ccb9161a76aaff7e3a9a
4
- data.tar.gz: c14813b4d754e6cad429978a78ff7909d03af3e96efae5d49b86db1abd242ae4
3
+ metadata.gz: 86089f21384efec7b5247e76310cf6f216163302a8503dfb14c0398c6cc3b44c
4
+ data.tar.gz: a0720294a6a0a642117c736544d24f8a839c7adca81e6c2c222be47c9cf1b574
5
5
  SHA512:
6
- metadata.gz: 1eecead38ad73e2a4aed1f6b7a4494f8f02aaac0fc2ec36154ff6690c4a3ca3d5246ebe6051d621cca7d2fab7260e94b7ca23051c912e045ed759cf32cae9731
7
- data.tar.gz: f22bfe23cbdda69a558af0c07977dd1ce939a92847857c7a155210bf4153aef8576b55ec3f6cfc5dc96d35c0f48e95fa6477b598a06fbe23002c22c64c4a70ae
6
+ metadata.gz: 7c1411a7d223784a48c1f24fe9757cdf1454aac992333289e3d1352e546bd2ae0a1f5ba7deaf6a9a38fb16110fa6d6d29304792290a8a660bf64fff6e7ef71cb
7
+ data.tar.gz: 538a39cf5816c611381903cb4b3fd6df1375ff8a5777acea4e65e7e9d35d7502398e5990870c7121e53cd1612db0e7a4fa4bc0f997843f2967d173a0b89a2a32
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: pdd
3
+ on:
4
+ push:
5
+ pull_request:
6
+ jobs:
7
+ pdd:
8
+ runs-on: ubuntu-20.04
9
+ steps:
10
+ - uses: actions/checkout@v3
11
+ - uses: g4s8/pdd-action@master
@@ -0,0 +1,25 @@
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: sudo apt-get -y install plantuml
24
+ - run: bundle update
25
+ - run: bundle exec rake
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: xcop
3
+ on:
4
+ push:
5
+ pull_request:
6
+ jobs:
7
+ xcop:
8
+ runs-on: ubuntu-20.04
9
+ steps:
10
+ - uses: actions/checkout@v3
11
+ - uses: g4s8/xcop-action@master
data/.rubocop.yml ADDED
@@ -0,0 +1,17 @@
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
16
+ Naming/FileName:
17
+ Enabled: false
data/.rultor.yml CHANGED
@@ -1,12 +1,11 @@
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"
8
+ sudo apt-get -y install plantuml
10
9
  release:
11
10
  script: |-
12
11
  bundle exec rake
@@ -20,7 +19,3 @@ release:
20
19
  merge:
21
20
  script: |-
22
21
  bundle exec rake
23
- deploy:
24
- script: |-
25
- echo "There is nothing to deploy"
26
- exit -1
data/Gemfile CHANGED
@@ -1,2 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
  gemspec
5
+
6
+ gem 'rake', '13.0.6', require: false
7
+ gem 'rubocop', '1.51.0', require: false
8
+ gem 'rubocop-rspec', '2.22.0', require: false
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2014-2019 Yegor Bugayenko
3
+ Copyright (c) 2014-2023 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/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
  ```
@@ -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
- Check [this blog post](http://www.yegor256.com/2014/06/01/aop-aspectj-java-method-logging.html).
65
- UML sequence diagram in this page is generated with this plugin.
66
- Blog sources are available in [Github](https://github.com/yegor256/blog).
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-2019 Yegor Bugayenko
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,11 @@ def version
33
35
  Gem::Specification.load(Dir['*.gemspec'].first).version
34
36
  end
35
37
 
36
- task default: [:clean]
38
+ task default: %i[clean jekylls rubocop copyright]
39
+
40
+ task :jekylls do
41
+ sh 'cd test-jekylls; make'
42
+ end
37
43
 
38
44
  require 'rdoc/task'
39
45
  desc 'Build RDoc documentation'
@@ -43,3 +49,18 @@ Rake::RDocTask.new do |rdoc|
43
49
  rdoc.rdoc_files.include('README*')
44
50
  rdoc.rdoc_files.include('lib/**/*.rb')
45
51
  end
52
+
53
+ require 'rubocop/rake_task'
54
+ desc 'Run RuboCop on all directories'
55
+ RuboCop::RakeTask.new(:rubocop) do |task|
56
+ task.fail_on_error = true
57
+ task.requires << 'rubocop-rspec'
58
+ end
59
+
60
+ task :copyright do
61
+ sh "grep -q -r '2014-#{Date.today.strftime('%Y')}' \
62
+ --include '*.rb' \
63
+ --include '*.txt' \
64
+ --include 'Rakefile' \
65
+ ."
66
+ end
@@ -1,27 +1,25 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
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.specification_version = 2 if s.respond_to? :specification_version=
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 = "Jekyll PlantUML Automation"
16
- s.description = "PlantUML diagrams in Jekyll pages"
17
- s.authors = ["Yegor Bugayenko"]
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 = 'http://github.com/yegor256/jekyll-plantuml'
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.test_files = s.files.grep(%r{^(test|spec|features)/})
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.add_development_dependency 'rake', '12.0.0'
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-2019 Yegor Bugayenko
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
- if !File.exists?(File.join(site.dest, "uml/#{name}.svg"))
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.exists?(svg)
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') { |f|
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-2019 Yegor Bugayenko
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.3.4'
26
+ VERSION = '1.4.1'
25
27
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:base"
5
+ ]
6
+ }
@@ -0,0 +1,2 @@
1
+ _site/
2
+ uml/
@@ -0,0 +1,13 @@
1
+ .ONESHELL:
2
+ .SHELLFLAGS: -e -o pipefail -c
3
+ .PHONY: clean sa env lint
4
+
5
+ SHELL = bash
6
+
7
+ TESTS = $(wildcard */)
8
+ all:
9
+ for t in ${TESTS}; do
10
+ cd $${t}
11
+ bundle install
12
+ bundle exec jekyll build
13
+ done
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'jekyll', '4.3.2'
6
+ gem 'jekyll-plantuml', path: '../..'
@@ -0,0 +1,6 @@
1
+ title: simple
2
+ markdown: kramdown
3
+ encoding: utf-8
4
+ timezone: Europe/Moscow
5
+ plugins:
6
+ - jekyll-plantuml
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <!DOCTYPE html>
5
+ <html>
6
+ <body>
7
+ {{ content }}
8
+ </body>
9
+ </html>
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: default
3
+ date: 2023-06-02
4
+ title: "Test"
5
+ ---
6
+
7
+ This is just a test:
8
+
9
+ {% plantuml %}
10
+ [First] - [Second]
11
+ {% endplantuml %}
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.3.4
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-10 00:00:00.000000000 Z
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/ISSUE_TEMPLATE.md"
51
- - ".github/PULL_REQUEST_TEMPLATE.md"
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
@@ -60,10 +48,18 @@ files:
60
48
  - jekyll-plantuml.gemspec
61
49
  - lib/jekyll-plantuml.rb
62
50
  - lib/version.rb
63
- homepage: http://github.com/yegor256/jekyll-plantuml
51
+ - renovate.json
52
+ - test-jekylls/.gitignore
53
+ - test-jekylls/Makefile
54
+ - test-jekylls/simple/Gemfile
55
+ - test-jekylls/simple/_config.yml
56
+ - test-jekylls/simple/_layouts/default.html
57
+ - test-jekylls/simple/_posts/2023/06/2023-06-02-test.md
58
+ homepage: https://github.com/yegor256/jekyll-plantuml
64
59
  licenses:
65
60
  - MIT
66
- metadata: {}
61
+ metadata:
62
+ rubygems_mfa_required: 'true'
67
63
  post_install_message:
68
64
  rdoc_options:
69
65
  - "--charset=UTF-8"
@@ -80,8 +76,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
76
  - !ruby/object:Gem::Version
81
77
  version: '0'
82
78
  requirements: []
83
- rubygems_version: 3.0.1
79
+ rubygems_version: 3.2.15
84
80
  signing_key:
85
- specification_version: 2
81
+ specification_version: 4
86
82
  summary: Jekyll PlantUML Automation
87
83
  test_files: []
@@ -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!