jekyll-kroki 0.4.0 → 0.6.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 +4 -4
- data/.devcontainer/devcontainer.json +1 -1
- data/.rubocop.yml +2 -2
- data/README.md +27 -7
- data/lib/jekyll/kroki/config.rb +48 -0
- data/lib/jekyll/kroki/version.rb +1 -1
- data/lib/jekyll/kroki.rb +53 -52
- metadata +19 -6
- data/jekyll-kroki.gemspec +0 -45
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f2efa9a6bac231d6efdac15ccf493e387cdb1a9890f1b774ddf839b8fb0b599
|
|
4
|
+
data.tar.gz: f51d26aa98904cd284f8bea24113f6225fdc5511651c0b7a1d432898f47397fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b4685d93410a2d8ea9ce9a3c97049f28ea2d4fdfcea144357ae388e0c59af9d93fdadb8c872ea80d7b48510358bd9cfedd980ae72cdfef7f586ce6ac49d915b
|
|
7
|
+
data.tar.gz: 3158b7e07f81b144d249161984b0874c48a383187a3c82c564a818864cc3401b9a5938d2b5e3632a1ed3993acb3f356d42861f6b8ed1d014ce109405537b2ef7
|
data/.rubocop.yml
CHANGED
|
@@ -5,7 +5,7 @@ plugins:
|
|
|
5
5
|
|
|
6
6
|
AllCops:
|
|
7
7
|
NewCops: enable
|
|
8
|
-
TargetRubyVersion:
|
|
8
|
+
TargetRubyVersion: 3.0
|
|
9
9
|
|
|
10
10
|
Gemspec/DevelopmentDependencies:
|
|
11
11
|
EnforcedStyle: gemspec
|
|
@@ -23,4 +23,4 @@ Layout/LineLength:
|
|
|
23
23
|
Metrics/ClassLength:
|
|
24
24
|
Max: 120
|
|
25
25
|
Metrics/MethodLength:
|
|
26
|
-
Max:
|
|
26
|
+
Max: 16
|
data/README.md
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
[](https://badge.fury.io/rb/jekyll-kroki)
|
|
3
3
|
|
|
4
4
|
# jekyll-kroki
|
|
5
|
+
|
|
5
6
|
A [Jekyll](https://jekyllrb.com/) plugin to convert diagram descriptions into images using [Kroki](https://kroki.io/).
|
|
6
7
|
|
|
7
8
|
## Installation
|
|
9
|
+
|
|
8
10
|
Add the `jekyll-kroki` Gem to the `:jekyll_plugins` group of your site's Gemfile:
|
|
9
11
|
|
|
10
12
|
```ruby
|
|
@@ -14,6 +16,7 @@ end
|
|
|
14
16
|
```
|
|
15
17
|
|
|
16
18
|
## Usage
|
|
19
|
+
|
|
17
20
|
Kroki supports over 25 popular diagram scripting languages, including Blockdiag, D2, GraphViz, Mermaid, and PlantUML. The [examples](https://kroki.io/examples.html) page and complete list of [supported diagram languages](https://kroki.io/#support) provide a taste of what's possible.
|
|
18
21
|
|
|
19
22
|
In Markdown, simply write your diagram descriptions inside a fenced code block with the language specified:
|
|
@@ -28,37 +31,53 @@ Kroki --> Jekyll: Rendered diagram in SVG format
|
|
|
28
31
|
```
|
|
29
32
|
````
|
|
30
33
|
|
|
31
|
-
When Jekyll builds your site, the `jekyll-kroki` plugin
|
|
34
|
+
When Jekyll builds your site, the `jekyll-kroki` plugin encodes the diagram descriptions, renders them as SVG images using the Kroki server, then embeds them in the generated HTML:
|
|
32
35
|
|
|
33
36
|

|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
Since the images are rendered and embedded at build-time, the Jekyll site remains completely static and doesn't depend on access to the Kroki server later on. This also eliminates all of the client-side processing that is typically used to render diagrams into images.
|
|
36
39
|
|
|
37
40
|
### Advantages
|
|
38
41
|
|
|
39
42
|
#### Consistent syntax
|
|
43
|
+
|
|
40
44
|
Instead of using Liquid tags, `jekyll-kroki` leverages the same Markdown fenced code block syntax used by both [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) and [GitHub](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams) to display diagrams. Besides being more consistent, this means that diagram descriptions in Markdown files can be displayed consistently as images across the GitLab/GitHub UI and on GitLab/GitHub Pages sites generated using Jekyll. GitLab currently supports Mermaid and PlantUML, while GitHub only supports Mermaid.
|
|
41
45
|
|
|
42
46
|
#### Seamless GitLab integration
|
|
47
|
+
|
|
43
48
|
Self-managed GitLab instances can additionally enable the [Kroki integration](https://docs.gitlab.com/ee/administration/integration/kroki.html), which adds support for all the same diagram scripting languages used by `jekyll-kroki`. Furthermore, by pointing both GitLab and `jekyll-kroki` to the same Kroki instance, you can guarantee that diagrams are generated using identical versions of the diagram libraries.
|
|
44
49
|
|
|
45
50
|
#### Speed
|
|
46
|
-
|
|
51
|
+
|
|
52
|
+
The server-side nature of Kroki means that you don't have to deal with installing or updating any diagram library dependencies on your machine. Jekyll sites that are generated in CI/CD pipelines can bypass these steps and will thus build faster.
|
|
47
53
|
|
|
48
54
|
#### Flexibility
|
|
49
|
-
|
|
55
|
+
|
|
56
|
+
Kroki is available either as a free service or self-hosted using Docker. Organisations that frequently build large Jekyll sites with many diagrams or want maximum control over their data can choose to operate their own Kroki instance to ensure consistency and use compute resources efficiently. For individuals, you can also opt to run Kroki locally.
|
|
50
57
|
|
|
51
58
|
### Configuration
|
|
52
|
-
|
|
59
|
+
|
|
60
|
+
You can specify the following parameters in the Jekyll `_config.yml` file:
|
|
61
|
+
|
|
62
|
+
| Parameter | Default value | Description |
|
|
63
|
+
| --------- | ------------- | ----------- |
|
|
64
|
+
| `url` | `https://kroki.io` | The URL of the Kroki instance to use |
|
|
65
|
+
| `http_retries` | `3` | The number of HTTP retries |
|
|
66
|
+
| `http_timeout` | `15` | The HTTP timeout value in seconds |
|
|
67
|
+
| `max_concurrent_docs` | `8` | The maximum number of Jekyll documents to render concurrently |
|
|
68
|
+
|
|
69
|
+
For example:
|
|
53
70
|
|
|
54
71
|
```yaml
|
|
55
72
|
kroki:
|
|
56
73
|
url: "https://my-kroki.server"
|
|
74
|
+
http_retries: 3
|
|
75
|
+
http_timeout: 15
|
|
76
|
+
max_concurrent_docs: 8
|
|
57
77
|
```
|
|
58
78
|
|
|
59
|
-
This is useful if you want to run a Kroki instance locally or your organisation maintains its own private Kroki server. The public Kroki instance https://kroki.io is used by default.
|
|
60
|
-
|
|
61
79
|
### Security
|
|
80
|
+
|
|
62
81
|
Embedding diagrams as SVGs directly within HTML files can be dangerous. You should only use a Kroki instance that you trust (or run your own!). For additional security, you can configure a [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) using custom Webrick headers in the Jekyll `_config.yml` file:
|
|
63
82
|
|
|
64
83
|
```yaml
|
|
@@ -68,4 +87,5 @@ webrick:
|
|
|
68
87
|
```
|
|
69
88
|
|
|
70
89
|
## Contributing
|
|
90
|
+
|
|
71
91
|
Bug reports and pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Jekyll
|
|
4
|
+
class Kroki
|
|
5
|
+
# Reads, validates, and exposes the jekyll-kroki configuration from the Jekyll site config.
|
|
6
|
+
class Config
|
|
7
|
+
DEFAULT_KROKI_URL = "https://kroki.io"
|
|
8
|
+
DEFAULT_HTTP_RETRIES = 3
|
|
9
|
+
DEFAULT_HTTP_TIMEOUT = 15
|
|
10
|
+
DEFAULT_MAX_CONCURRENT_DOCS = 8
|
|
11
|
+
|
|
12
|
+
attr_reader :kroki_url, :http_retries, :http_timeout, :max_concurrent_docs
|
|
13
|
+
|
|
14
|
+
# @param [Hash] The Jekyll site configuration.
|
|
15
|
+
# @raise [TypeError] If any parameter has an incorrect type.
|
|
16
|
+
# @raise [ArgumentError] If any parameter is out of the valid range.
|
|
17
|
+
def initialize(site_config)
|
|
18
|
+
kroki_config = site_config.fetch("kroki", {})
|
|
19
|
+
|
|
20
|
+
@kroki_url = parse_url(kroki_config)
|
|
21
|
+
@http_retries = parse_integer(kroki_config, "http_retries", DEFAULT_HTTP_RETRIES, min: 0)
|
|
22
|
+
@http_timeout = parse_integer(kroki_config, "http_timeout", DEFAULT_HTTP_TIMEOUT, min: 0)
|
|
23
|
+
@max_concurrent_docs = parse_integer(kroki_config, "max_concurrent_docs", DEFAULT_MAX_CONCURRENT_DOCS, min: 1)
|
|
24
|
+
|
|
25
|
+
freeze
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def parse_url(kroki_config)
|
|
31
|
+
param_name = "url"
|
|
32
|
+
raw = kroki_config.fetch(param_name, DEFAULT_KROKI_URL)
|
|
33
|
+
uri = URI.parse(raw)
|
|
34
|
+
raise TypeError, "'#{param_name}' is not a valid HTTP URL" unless uri.is_a?(URI::HTTP)
|
|
35
|
+
|
|
36
|
+
uri
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def parse_integer(kroki_config, param_name, default, min:)
|
|
40
|
+
value = kroki_config.fetch(param_name, default)
|
|
41
|
+
raise TypeError, "'#{param_name}' must be an integer" unless value.is_a?(Integer)
|
|
42
|
+
raise ArgumentError, "'#{param_name}' must be >= #{min}" if value < min
|
|
43
|
+
|
|
44
|
+
value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
data/lib/jekyll/kroki/version.rb
CHANGED
data/lib/jekyll/kroki.rb
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative "kroki/config"
|
|
3
4
|
require_relative "kroki/version"
|
|
4
5
|
|
|
5
6
|
require "async"
|
|
6
7
|
require "async/semaphore"
|
|
7
8
|
require "base64"
|
|
9
|
+
require "concurrent-ruby"
|
|
10
|
+
require "digest"
|
|
8
11
|
require "faraday"
|
|
9
12
|
require "faraday/retry"
|
|
10
13
|
require "httpx/adapters/faraday"
|
|
@@ -15,50 +18,49 @@ require "zlib"
|
|
|
15
18
|
module Jekyll
|
|
16
19
|
# Converts diagram descriptions into images using Kroki.
|
|
17
20
|
class Kroki
|
|
18
|
-
KROKI_DEFAULT_URL = "https://kroki.io"
|
|
19
|
-
SUPPORTED_LANGUAGES = %w[actdiag blockdiag bpmn bytefield c4plantuml d2 dbml diagramsnet ditaa erd excalidraw
|
|
20
|
-
graphviz mermaid nomnoml nwdiag packetdiag pikchr plantuml rackdiag seqdiag structurizr
|
|
21
|
-
svgbob symbolator tikz umlet vega vegalite wavedrom wireviz].freeze
|
|
22
21
|
EXPECTED_HTML_TAGS = %w[code div].freeze
|
|
23
|
-
HTTP_MAX_RETRIES = 3
|
|
24
22
|
HTTP_RETRY_INTERVAL_BACKOFF_FACTOR = 2
|
|
25
23
|
HTTP_RETRY_INTERVAL_RANDOMNESS = 0.5
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
HTTP_RETRY_INTERVAL = 0.1
|
|
25
|
+
SUPPORTED_LANGUAGES = %w[actdiag blockdiag bpmn bytefield c4plantuml d2 dbml diagramsnet ditaa erd excalidraw
|
|
26
|
+
graphviz mermaid nomnoml nwdiag packetdiag pikchr plantuml rackdiag seqdiag structurizr
|
|
27
|
+
svgbob symbolator tikz umlet vega vegalite wavedrom wireviz].freeze
|
|
28
|
+
|
|
29
|
+
@diagram_cache = Concurrent::Map.new
|
|
29
30
|
|
|
30
31
|
class << self
|
|
31
32
|
# Renders and embeds all diagram descriptions in the given Jekyll site using Kroki.
|
|
32
33
|
#
|
|
33
34
|
# @param [Jekyll::Site] The Jekyll site to embed diagrams in.
|
|
34
35
|
def embed_site(site)
|
|
35
|
-
|
|
36
|
-
connection = setup_connection(kroki_url)
|
|
36
|
+
config = Config.new(site.config)
|
|
37
|
+
connection = setup_connection(config.kroki_url, config.http_retries, config.http_timeout)
|
|
37
38
|
|
|
38
|
-
rendered_diag = embed_docs_in_site(site, connection)
|
|
39
|
+
rendered_diag = embed_docs_in_site(site, connection, config.max_concurrent_docs)
|
|
39
40
|
unless rendered_diag.zero?
|
|
40
|
-
puts "[jekyll-kroki] Rendered #{rendered_diag} diagrams using Kroki instance at '#{kroki_url}'"
|
|
41
|
+
puts "[jekyll-kroki] Rendered #{rendered_diag} diagrams using Kroki instance at '#{config.kroki_url}'"
|
|
41
42
|
end
|
|
42
43
|
rescue StandardError => e
|
|
43
|
-
|
|
44
|
+
fatal_error(e)
|
|
44
45
|
end
|
|
45
46
|
|
|
46
47
|
# Renders the diagram descriptions in all Jekyll pages and documents in the given Jekyll site. Pages / documents
|
|
47
|
-
# are rendered concurrently up to the limit defined by
|
|
48
|
+
# are rendered concurrently up to the limit defined by max_concurrent_docs.
|
|
48
49
|
#
|
|
49
50
|
# @param [Jekyll::Site] The Jekyll site to embed diagrams in.
|
|
50
51
|
# @param [Faraday::Connection] The Faraday connection to use.
|
|
52
|
+
# @param [Integer] The maximum number of documents to render concurrently.
|
|
51
53
|
# @return [Integer] The number of successfully rendered diagrams.
|
|
52
|
-
def embed_docs_in_site(site, connection)
|
|
54
|
+
def embed_docs_in_site(site, connection, max_concurrent_docs)
|
|
53
55
|
rendered_diag = 0
|
|
54
|
-
semaphore = Async::Semaphore.new(
|
|
56
|
+
semaphore = Async::Semaphore.new(max_concurrent_docs)
|
|
55
57
|
|
|
56
58
|
Async do |task|
|
|
57
|
-
tasks = (site.pages + site.documents).
|
|
59
|
+
tasks = (site.pages + site.documents).filter_map do |doc|
|
|
58
60
|
next unless embeddable?(doc)
|
|
59
61
|
|
|
60
62
|
async_embed_single_doc(task, semaphore, connection, doc)
|
|
61
|
-
end
|
|
63
|
+
end
|
|
62
64
|
|
|
63
65
|
rendered_diag = tasks.sum(&:wait)
|
|
64
66
|
end
|
|
@@ -66,8 +68,8 @@ module Jekyll
|
|
|
66
68
|
rendered_diag
|
|
67
69
|
end
|
|
68
70
|
|
|
69
|
-
# Renders the supported diagram descriptions in a single document
|
|
70
|
-
# imposed by the
|
|
71
|
+
# Renders the supported diagram descriptions in a single document. Multiple documents can be rendered concurrently
|
|
72
|
+
# up to the limit imposed by the given semaphore.
|
|
71
73
|
#
|
|
72
74
|
# @param [Async::Task] The parent async task to spawn a child task from.
|
|
73
75
|
# @param [Async::Semaphore] A semaphore to limit concurrency.
|
|
@@ -83,8 +85,8 @@ module Jekyll
|
|
|
83
85
|
end
|
|
84
86
|
end
|
|
85
87
|
|
|
86
|
-
# Renders the supported diagram descriptions in a single document and embeds them as inline SVGs in
|
|
87
|
-
# source.
|
|
88
|
+
# Renders the supported diagram descriptions in a single document sequentially and embeds them as inline SVGs in
|
|
89
|
+
# the HTML source.
|
|
88
90
|
#
|
|
89
91
|
# @param [Faraday::Connection] The Faraday connection to use.
|
|
90
92
|
# @param [Jekyll::Page, Jekyll::Document] The document to process.
|
|
@@ -109,26 +111,37 @@ module Jekyll
|
|
|
109
111
|
rendered_diag
|
|
110
112
|
end
|
|
111
113
|
|
|
112
|
-
# Renders a single diagram description using Kroki.
|
|
114
|
+
# Renders a single diagram description using Kroki. The rendered diagram is cached to avoid redundant HTTP
|
|
115
|
+
# requests across documents, using the diagram language and the SHA1 of the diagram description as the key.
|
|
113
116
|
#
|
|
114
117
|
# @param [Faraday::Connection] The Faraday connection to use.
|
|
115
118
|
# @param [String] The diagram description.
|
|
116
119
|
# @param [String] The language of the diagram description.
|
|
117
120
|
# @return [String] The rendered diagram in SVG format.
|
|
118
121
|
def render_diagram(connection, diagram_desc, language)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
diagram_text = diagram_desc.text
|
|
123
|
+
cache_key = "#{language}:#{Digest::SHA1.hexdigest(diagram_text)}"
|
|
124
|
+
@diagram_cache.compute_if_absent(cache_key) do
|
|
125
|
+
begin
|
|
126
|
+
response = connection.get("#{language}/svg/#{encode_diagram(diagram_text)}")
|
|
127
|
+
rescue Faraday::Error => e
|
|
128
|
+
raise e.message
|
|
129
|
+
end
|
|
130
|
+
validate_content_type(response)
|
|
131
|
+
sanitise_diagram(response.body)
|
|
123
132
|
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Validates that the Kroki response has the expected SVG content type.
|
|
136
|
+
#
|
|
137
|
+
# @param [Faraday::Response] The response to validate.
|
|
138
|
+
def validate_content_type(response)
|
|
124
139
|
expected_content_type = "image/svg+xml"
|
|
125
140
|
returned_content_type = response.headers[:content_type]
|
|
126
|
-
if returned_content_type
|
|
127
|
-
raise "Kroki returned an incorrect content type: " \
|
|
128
|
-
"expected '#{expected_content_type}', received '#{returned_content_type}'"
|
|
141
|
+
return if returned_content_type == expected_content_type
|
|
129
142
|
|
|
130
|
-
|
|
131
|
-
|
|
143
|
+
raise "Kroki returned an incorrect content type: " \
|
|
144
|
+
"expected '#{expected_content_type}', received '#{returned_content_type}'"
|
|
132
145
|
end
|
|
133
146
|
|
|
134
147
|
# Sanitises a rendered diagram. Only <script> elements are removed, which is the most minimal / naive
|
|
@@ -154,14 +167,16 @@ module Jekyll
|
|
|
154
167
|
# Sets up a new Faraday connection.
|
|
155
168
|
#
|
|
156
169
|
# @param [URI::HTTP] The URL of the Kroki instance.
|
|
170
|
+
# @param [Integer] The number of retries.
|
|
171
|
+
# @param [Integer] The timeout value in seconds.
|
|
157
172
|
# @return [Faraday::Connection] The Faraday connection.
|
|
158
|
-
def setup_connection(kroki_url)
|
|
159
|
-
retry_options = { max:
|
|
173
|
+
def setup_connection(kroki_url, retries, timeout)
|
|
174
|
+
retry_options = { max: retries, interval: HTTP_RETRY_INTERVAL,
|
|
160
175
|
interval_randomness: HTTP_RETRY_INTERVAL_RANDOMNESS,
|
|
161
176
|
backoff_factor: HTTP_RETRY_INTERVAL_BACKOFF_FACTOR,
|
|
162
177
|
exceptions: [Faraday::RequestTimeoutError, Faraday::ServerError] }
|
|
163
178
|
|
|
164
|
-
Faraday.new(url: kroki_url, request: { timeout:
|
|
179
|
+
Faraday.new(url: kroki_url, request: { timeout: timeout }) do |builder|
|
|
165
180
|
builder.adapter :httpx, persistent: true
|
|
166
181
|
builder.request :retry, retry_options
|
|
167
182
|
builder.response :json, content_type: /\bjson$/
|
|
@@ -169,24 +184,10 @@ module Jekyll
|
|
|
169
184
|
end
|
|
170
185
|
end
|
|
171
186
|
|
|
172
|
-
#
|
|
173
|
-
#
|
|
174
|
-
# @param The Jekyll site configuration.
|
|
175
|
-
# @return [URI::HTTP] The URL of the Kroki instance.
|
|
176
|
-
def kroki_url(config)
|
|
177
|
-
if config.key?("kroki") && config["kroki"].key?("url")
|
|
178
|
-
url = config["kroki"]["url"]
|
|
179
|
-
raise TypeError, "'url' is not a valid HTTP URL" unless URI.parse(url).is_a?(URI::HTTP)
|
|
180
|
-
else
|
|
181
|
-
url = KROKI_DEFAULT_URL
|
|
182
|
-
end
|
|
183
|
-
URI(url)
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
# Determines whether a document may contain embeddable diagram descriptions - it is in HTML format and is either
|
|
187
|
+
# Determines whether a document may contain embeddable diagram descriptions; it is in HTML format and is either
|
|
187
188
|
# a Jekyll::Page or writeable Jekyll::Document.
|
|
188
189
|
#
|
|
189
|
-
# @param [Jekyll::Page or Jekyll::Document] The document to check for
|
|
190
|
+
# @param [Jekyll::Page or Jekyll::Document] The document to check for embeddable diagrams.
|
|
190
191
|
def embeddable?(doc)
|
|
191
192
|
doc.output_ext == ".html" && (doc.is_a?(Jekyll::Page) || doc.write?)
|
|
192
193
|
end
|
|
@@ -199,7 +200,7 @@ module Jekyll
|
|
|
199
200
|
# calling method. To specify the calling method's caller, pass in 2.
|
|
200
201
|
#
|
|
201
202
|
# Source: https://www.mslinn.com/ruby/2200-crash-exit.html
|
|
202
|
-
def
|
|
203
|
+
def fatal_error(error, caller_index = 1)
|
|
203
204
|
raise error
|
|
204
205
|
rescue StandardError => e
|
|
205
206
|
file, line_number, caller = e.backtrace[caller_index].split(":")
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-kroki
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Felix van Oost
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -23,6 +23,20 @@ dependencies:
|
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '2.25'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: concurrent-ruby
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.3'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.3'
|
|
26
40
|
- !ruby/object:Gem::Dependency
|
|
27
41
|
name: faraday
|
|
28
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -190,14 +204,13 @@ files:
|
|
|
190
204
|
- LICENSE
|
|
191
205
|
- README.md
|
|
192
206
|
- Rakefile
|
|
193
|
-
- jekyll-kroki.gemspec
|
|
194
207
|
- lib/jekyll/kroki.rb
|
|
208
|
+
- lib/jekyll/kroki/config.rb
|
|
195
209
|
- lib/jekyll/kroki/version.rb
|
|
196
210
|
homepage: https://github.com/felixvanoost/jekyll-kroki
|
|
197
211
|
licenses:
|
|
198
212
|
- MIT
|
|
199
213
|
metadata:
|
|
200
|
-
homepage_uri: https://github.com/felixvanoost/jekyll-kroki
|
|
201
214
|
source_code_uri: https://github.com/felixvanoost/jekyll-kroki
|
|
202
215
|
rubygems_mfa_required: 'true'
|
|
203
216
|
rdoc_options: []
|
|
@@ -207,14 +220,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
207
220
|
requirements:
|
|
208
221
|
- - ">="
|
|
209
222
|
- !ruby/object:Gem::Version
|
|
210
|
-
version:
|
|
223
|
+
version: 3.0.0
|
|
211
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
225
|
requirements:
|
|
213
226
|
- - ">="
|
|
214
227
|
- !ruby/object:Gem::Version
|
|
215
228
|
version: '0'
|
|
216
229
|
requirements: []
|
|
217
|
-
rubygems_version: 3.6.
|
|
230
|
+
rubygems_version: 3.6.9
|
|
218
231
|
specification_version: 4
|
|
219
232
|
summary: A Jekyll plugin to convert diagram descriptions into images using Kroki
|
|
220
233
|
test_files: []
|
data/jekyll-kroki.gemspec
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/jekyll/kroki/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "jekyll-kroki"
|
|
7
|
-
spec.version = Jekyll::Kroki::VERSION
|
|
8
|
-
spec.authors = ["Felix van Oost"]
|
|
9
|
-
|
|
10
|
-
spec.summary = "A Jekyll plugin to convert diagram descriptions into images using Kroki"
|
|
11
|
-
spec.description = "A Jekyll plugin to convert diagram descriptions written in over 25 popular diagram scripting
|
|
12
|
-
languages into images using Kroki"
|
|
13
|
-
spec.homepage = "https://github.com/felixvanoost/jekyll-kroki"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 2.6.0"
|
|
16
|
-
|
|
17
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
19
|
-
spec.metadata["rubygems_mfa_required"] = "true"
|
|
20
|
-
|
|
21
|
-
# Load the files that are versioned in Git into the RubyGem.
|
|
22
|
-
spec.files = Dir.chdir(__dir__) do
|
|
23
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
24
|
-
(File.expand_path(f) == __FILE__) ||
|
|
25
|
-
f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
spec.bindir = "exe"
|
|
29
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
30
|
-
spec.require_paths = ["lib"]
|
|
31
|
-
|
|
32
|
-
spec.add_dependency "async", ["~> 2.25"]
|
|
33
|
-
spec.add_dependency "faraday", ["~> 2.7"]
|
|
34
|
-
spec.add_dependency "faraday-retry", ["~> 2.2"]
|
|
35
|
-
spec.add_dependency "httpx", ["~> 1.1"]
|
|
36
|
-
spec.add_dependency "jekyll", ["~> 4"]
|
|
37
|
-
spec.add_dependency "nokogiri", ["~> 1.15"]
|
|
38
|
-
|
|
39
|
-
spec.add_development_dependency "minitest", ["~> 5.0"]
|
|
40
|
-
spec.add_development_dependency "rake", ["~> 13.0"]
|
|
41
|
-
spec.add_development_dependency "rubocop", ["~> 1.21"]
|
|
42
|
-
spec.add_development_dependency "rubocop-minitest", ["~> 0.38"]
|
|
43
|
-
spec.add_development_dependency "rubocop-performance", ["~> 1.25"]
|
|
44
|
-
spec.add_development_dependency "rubocop-rake", ["~> 0.7"]
|
|
45
|
-
end
|