jekyll-diagrams 0.4.2 → 0.5.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
2
  SHA256:
3
- metadata.gz: 2e7a08e5324e821b0b1958e73575be47055fb70eadb246fdf10ee026fdf86297
4
- data.tar.gz: 717098d97341644e3c99bbd72b0e1aa71e6365267819731852d71e200aba7029
3
+ metadata.gz: 94652913742bd24e2f69b464a8836a424358ecd5babb10724428b8c3991a70b3
4
+ data.tar.gz: b6b21032b1dfb7cc19c986cdfcf55d7eeee43d5aa54657a9fb58928965dfad31
5
5
  SHA512:
6
- metadata.gz: 6e926f6a15028e3e903eb59ee2f30fc3e409402e7a87fe9e5ea63ae6010820e2e6a1ef1619c23b3759b1e9ca7bbbc7ac41c1e3d55eff15e4756bcbcbe1f991af
7
- data.tar.gz: 358c0bb931fe98b75e153e5475375e7f65d199c0f9ad1541406bb3e481abdc4b98921812c9e4853d3cd2512c5a5ae747600f83f1d19d6d5b84a87706f84be241
6
+ metadata.gz: 552cf35767c1a2d057acfd791f819b24050d352b8797a6a9809689ac67be94ea23bec365a006cee4b4807b6a87f728f67e3bf30b5251901d667b487a3174fb5d
7
+ data.tar.gz: 2565847c3a1fdbd14dc10d574ca9f92d0069010da7748d1d4a6f0be16274a3a5e35f8c1a7c05b4742a39e0e68c9d0ad28ae86869ff1732e2e7a1880580c9505a
data/.gitignore CHANGED
@@ -1,10 +1,8 @@
1
1
  /.bundle/
2
- /.yardoc
3
2
  /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
3
  /doc/
7
4
  /pkg/
8
- /spec/reports/
5
+ /test/dest/
6
+ /test/fixtures/.jekyll-cache/
9
7
  /tmp/
10
8
  *.gem
data/.travis.yml CHANGED
@@ -1,9 +1,12 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
- - 2.3.7
4
- - 2.4.4
5
- - 2.5.1
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
6
7
 
7
8
  before_install:
8
- - gem update --system
9
- - gem install bundler
9
+ - sudo apt update && sudo apt install -y graphviz
10
+ - sudo apt install -y python3 python3-pip python3-setuptools
11
+ - sudo pip3 install blockdiag seqdiag actdiag nwdiag
12
+ - gem update --system && gem install bundler
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'coveralls', require: false
4
-
5
3
  gemspec
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Travis](https://img.shields.io/travis/zhustec/jekyll-diagrams.svg?style=flat-square)](https://travis-ci.com/zhustec/jekyll-diagrams)
4
4
  [![Gem](https://img.shields.io/gem/v/jekyll-diagrams.svg?style=flat-square)](https://rubygems.org/gems/jekyll-diagrams)
5
- [![Coveralls github](https://img.shields.io/coveralls/github/zhustec/jekyll-diagrams/master.svg?style=flat-square)](https://coveralls.io/github/zhustec/jekyll-diagrams)
6
5
  [![Depfu](https://img.shields.io/depfu/zhustec/jekyll-diagrams.svg?style=flat-square)](https://depfu.com/repos/zhustec/jekyll-diagrams)
7
6
  [![license](https://img.shields.io/github/license/zhustec/jekyll-diagrams.svg?style=flat-square)](https://github.com/zhustec/jekyll-diagrams/blob/master/LICENSE)
8
7
 
@@ -84,7 +83,7 @@ S -> A [label=a];
84
83
  S -> B [label=b];
85
84
  A -> D [label=c];
86
85
  B -> D [label=d];
87
- {% endgraphviz %}
86
+ {% enddigraph %}
88
87
  ```
89
88
 
90
89
  ### Blockdiag
@@ -132,14 +131,15 @@ seqdiag {
132
131
 
133
132
  ## Configuration
134
133
 
135
- A simple configuration shows below:
134
+ You need to provide a configuration.
135
+ A simple configuration is shown below:
136
136
 
137
137
  ```yaml
138
138
  diagrams:
139
139
  graphviz:
140
140
  engine: dot
141
141
  options: '-Tsvg'
142
- diag:
142
+ blockdiag:
143
143
  options: '-Tsvg --nodoctype'
144
144
  ```
145
145
 
@@ -164,11 +164,11 @@ digraph {
164
164
  {% endgraphviz %}
165
165
  ```
166
166
 
167
- `options` is the command line options, and will be appended to the command. Default is set to '-Tsvg'.
167
+ `options` is the command line options, and will be appended to the command.
168
168
 
169
- ### Blockiag
169
+ ### Blockdiag
170
170
 
171
- `options` is the command line options, and will be appended to the command. Default is set to '-Tsvg --nodoctype'.
171
+ `options` is the command line options, and will be appended to the command.
172
172
 
173
173
  ## Contributing
174
174
 
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
2
  require "rake/testtask"
3
3
 
4
4
  Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
5
+ t.libs << 'test'
6
+ t.libs << 'lib'
7
7
  t.test_files = FileList['test/**/*_test.rb']
8
8
  end
9
9
 
@@ -1,30 +1,28 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
- require 'jekyll/diagrams/version'
4
+ require 'jekyll-diagrams/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.required_ruby_version = '>= 2.3.7'
8
-
9
7
  spec.name = 'jekyll-diagrams'
8
+ spec.summary = 'Jekyll plugins for diagrams support'
10
9
  spec.version = Jekyll::Diagrams::VERSION
11
10
  spec.authors = ['zhustec']
12
11
  spec.email = ['zhustec@foxmail.com']
13
-
14
- spec.summary = 'Jekyll plugins for diagrams support'
15
- spec.description = 'Jekyll plugins for diagrams support, including Graphviz, Blockdiag, Seqdiag and so on.'
16
12
  spec.homepage = 'https://github.com/zhustec/jekyll-diagrams'
17
13
  spec.license = 'MIT'
14
+ spec.description = 'Jekyll plugins for diagrams support, including Graphviz, Blockdiag, Seqdiag and so on.'
18
15
 
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
- end
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.test_files = spec.files.grep(%r!^(test|spec|features)!)
22
18
 
23
19
  spec.require_paths = ['lib']
24
20
 
25
- spec.add_dependency 'jekyll', '~> 3.6'
21
+ spec.required_ruby_version = '>= 2.3.0'
22
+
23
+ spec.add_dependency 'jekyll', '>= 3.7', '< 5.0'
26
24
 
27
- spec.add_development_dependency 'bundler', '~> 1.16'
28
- spec.add_development_dependency 'rake', '~> 12.3'
29
- spec.add_development_dependency 'minitest', '~> 5.1'
25
+ spec.add_development_dependency 'bundler'
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'minitest', '~> 5.0'
30
28
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Diagrams
3
- VERSION = "0.4.2"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
@@ -0,0 +1,6 @@
1
+ diagrams:
2
+ graphviz:
3
+ engine: dot
4
+ options: '-Tsvg'
5
+ blockdiag:
6
+ options: '-Tsvg --nodoctype'
@@ -0,0 +1,8 @@
1
+ <html>
2
+ <head>
3
+ <title>Jekyll Diagrams Testing Page</title>
4
+ </head>
5
+ <body>
6
+ {{ content }}
7
+ </body>
8
+ </html>
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: A post with blockdiag
3
+ description: A post with blockdiag
4
+ layout: default
5
+ ---
6
+
7
+ {% blockdiag %}
8
+ blockdiag {
9
+ A -> B -> C -> D;
10
+ A -> E -> F -> G;
11
+ }
12
+ {% endblockdiag %}
13
+
14
+ {% seqdiag %}
15
+ seqdiag {
16
+ browser -> webserver [label = "GET /index.html"];
17
+ browser <-- webserver;
18
+ browser -> webserver [label = "POST /blog/comment"];
19
+ webserver -> database [label = "INSERT comment"];
20
+ webserver <-- database;
21
+ browser <-- webserver;
22
+ }
23
+ {% endseqdiag %}
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: A post with graphviz
3
+ description: A post with graphviz
4
+ layout: default
5
+ ---
6
+
7
+ {% graphviz %}
8
+ digraph {
9
+ node [shape=circle, style=filled];
10
+ S [fillcolor=green];
11
+ A [fillcolor=yellow];
12
+ B [fillcolor=yellow];
13
+ C [fillcolor=yellow];
14
+ D [shape=doublecircle, fillcolor=green];
15
+ S -> A [label=a];
16
+ S -> B [label=b];
17
+ A -> D [label=c];
18
+ B -> D [label=d];
19
+ }
20
+ {% endgraphviz %}
21
+
22
+ {% digraph %}
23
+ node [shape=circle, style=filled];
24
+ S [fillcolor=green];
25
+ A [fillcolor=yellow];
26
+ B [fillcolor=yellow];
27
+ C [fillcolor=yellow];
28
+ D [shape=doublecircle, fillcolor=green];
29
+ S -> A [label=a];
30
+ S -> B [label=b];
31
+ A -> D [label=c];
32
+ B -> D [label=d];
33
+ {% enddigraph %}
34
+
35
+ {% graphviz neato %}
36
+ digraph {
37
+ node [shape=circle, style=filled];
38
+ S [fillcolor=green];
39
+ A [fillcolor=yellow];
40
+ B [fillcolor=yellow];
41
+ C [fillcolor=yellow];
42
+ D [shape=doublecircle, fillcolor=green];
43
+ S -> A [label=a];
44
+ S -> B [label=b];
45
+ A -> D [label=c];
46
+ B -> D [label=d];
47
+ }
48
+ {% endgraphviz %}
@@ -0,0 +1,25 @@
1
+ require 'test_helper'
2
+
3
+ class TestJekyllDiagrams < Minitest::Test
4
+ def setup
5
+ @config = Jekyll.configuration({
6
+ source: source_dir,
7
+ destination: dest_dir,
8
+ url: 'http://example.org'
9
+ })
10
+
11
+ @site = Jekyll::Site.new(@config)
12
+ @site.process
13
+ @graphviz_contents = File.read(dest_dir('2019/08/25/graphviz.html'))
14
+ @blockdiag_contents = File.read(dest_dir('2019/08/25/blockdiag.html'))
15
+ end
16
+
17
+
18
+ def test_render_graphviz
19
+ assert_match %r!<div class="graphviz">!, @graphviz_contents
20
+ end
21
+
22
+ def test_render_blockdiag
23
+ assert_match %r!<div class="diag \w+">!, @blockdiag_contents
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ require 'jekyll'
2
+ require 'fileutils'
3
+ require File.expand_path('../lib/jekyll-diagrams', __dir__)
4
+
5
+ Jekyll.logger.log_level = :error
6
+
7
+ SOURCE_DIR = File.expand_path("fixtures", __dir__)
8
+ DEST_DIR = File.expand_path("dest", __dir__)
9
+
10
+ def source_dir(*files)
11
+ File.join(SOURCE_DIR, *files)
12
+ end
13
+
14
+ def dest_dir(*files)
15
+ File.join(DEST_DIR, *files)
16
+ end
17
+
18
+ require 'minitest/autorun'
metadata CHANGED
@@ -1,71 +1,77 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-diagrams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhustec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '3.6'
22
+ version: '5.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '3.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '3.6'
32
+ version: '5.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: '1.16'
39
+ version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "~>"
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: '1.16'
46
+ version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '12.3'
53
+ version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '12.3'
60
+ version: '0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '5.1'
67
+ version: '5.0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '5.1'
74
+ version: '5.0'
69
75
  description: Jekyll plugins for diagrams support, including Graphviz, Blockdiag, Seqdiag
70
76
  and so on.
71
77
  email:
@@ -82,10 +88,16 @@ files:
82
88
  - Rakefile
83
89
  - jekyll-diagrams.gemspec
84
90
  - lib/jekyll-diagrams.rb
91
+ - lib/jekyll-diagrams/version.rb
85
92
  - lib/jekyll/diagrams.rb
86
93
  - lib/jekyll/diagrams/blockdiag.rb
87
94
  - lib/jekyll/diagrams/graphviz.rb
88
- - lib/jekyll/diagrams/version.rb
95
+ - test/fixtures/_config.yml
96
+ - test/fixtures/_layouts/default.html
97
+ - test/fixtures/_posts/2019-08-25-blockdiag.md
98
+ - test/fixtures/_posts/2019-08-25-graphviz.md
99
+ - test/jekyll-diagrams_test.rb
100
+ - test/test_helper.rb
89
101
  homepage: https://github.com/zhustec/jekyll-diagrams
90
102
  licenses:
91
103
  - MIT
@@ -98,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
110
  requirements:
99
111
  - - ">="
100
112
  - !ruby/object:Gem::Version
101
- version: 2.3.7
113
+ version: 2.3.0
102
114
  required_rubygems_version: !ruby/object:Gem::Requirement
103
115
  requirements:
104
116
  - - ">="
@@ -106,8 +118,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
118
  version: '0'
107
119
  requirements: []
108
120
  rubyforge_project:
109
- rubygems_version: 2.7.6
121
+ rubygems_version: 2.7.6.2
110
122
  signing_key:
111
123
  specification_version: 4
112
124
  summary: Jekyll plugins for diagrams support
113
- test_files: []
125
+ test_files:
126
+ - test/fixtures/_config.yml
127
+ - test/fixtures/_layouts/default.html
128
+ - test/fixtures/_posts/2019-08-25-blockdiag.md
129
+ - test/fixtures/_posts/2019-08-25-graphviz.md
130
+ - test/jekyll-diagrams_test.rb
131
+ - test/test_helper.rb