jekyll-plantuml 1.3.3 → 1.4.0

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
- SHA1:
3
- metadata.gz: ddb433e97aba2753342f951882429e3c95db620c
4
- data.tar.gz: a7bc01bc691da40dd44ed4994939d3beae93f2a7
2
+ SHA256:
3
+ metadata.gz: 2697b42a31945ffb30c6daaffbd25fad42fac637ded85a28d880a901498eae00
4
+ data.tar.gz: f707a12ea2d90e5b128afc2b98f9d482fcf44041cfc4d0b1671d3a63e71d5ddb
5
5
  SHA512:
6
- metadata.gz: 31d5062e14bca175c370109613592e477eec865856b79c154eb59e8ed51da9d06d0ee918563f69849cc7fe02c8cb228d046b3c10f0fa21f74204953611985a5e
7
- data.tar.gz: 32c683ea5262636ba4aaf3730893d1fff8f41086285aeb62abe82c59b237c4a54e5c6de74b87c63680a3cfd8aa782bf71ffce30b52b4b589097a3dbaaf3f0655
6
+ metadata.gz: 251252e096489b6522e3d2b0d1a6d72eaacae391dbb4a25191a387ae309ff9a462d19b718bcc6c9c58edd336e65882f992d47b78302ffd93b34f33b39b3b7792
7
+ data.tar.gz: fa076635bda7053181e182622159ec0274878f41d7c562caec73512f7e46afc0e854da25ca142efc862bbe4df991db475af4ab9198ba0eb30e8d30e29c177b65
data/.0pdd.yml CHANGED
@@ -3,3 +3,7 @@ errors:
3
3
  # alerts:
4
4
  # github:
5
5
  # - yegor256
6
+
7
+ tags:
8
+ - pdd
9
+ - bug
@@ -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,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
@@ -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,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: zerocracy/home#assets/rubygems.yml
3
- s3cfg: zerocracy/home#assets/s3cfg
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 install
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
- commanders: []
19
+ script: |-
20
+ bundle exec rake
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-2017 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
  ```
@@ -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 "jekyll-plantuml"
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
- 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-2017 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,7 @@ 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 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
@@ -1,26 +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
- s.add_runtime_dependency('jekyll', '>2.0')
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-2017 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,27 +40,26 @@ 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
- }
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><img src='#{site.baseurl}/uml/#{name}.svg' #{@html}
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-2017 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.3'
26
+ VERSION = '1.4.0'
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
+ }
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.3
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: 2017-05-19 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
@@ -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/jekyll-plantuml.rb
49
+ - lib/jekyll_plantuml.rb
47
50
  - lib/version.rb
48
- homepage: http://github.com/yegor256/jekyll-plantuml
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
- rubyforge_project:
69
- rubygems_version: 2.6.8
73
+ rubygems_version: 3.2.15
70
74
  signing_key:
71
- specification_version: 2
75
+ specification_version: 4
72
76
  summary: Jekyll PlantUML Automation
73
77
  test_files: []
data/TEAM.md DELETED
@@ -1,17 +0,0 @@
1
- ## Team
2
-
3
- The following members are in the project team:
4
-
5
- Role | Members
6
- ---|---
7
- PM | @davvd
8
- CR |
9
- DEV |
10
- IMP |
11
- ARC |
12
- DES |
13
- PO | @yegor256
14
- ITR |
15
- QA |
16
- SA |
17
- HLP |