utopia-project 0.23.0 → 0.24.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
- checksums.yaml.gz.sig +0 -0
- data/bake/utopia/project/readme/update.rb +6 -2
- data/lib/utopia/project/base.rb +8 -7
- data/lib/utopia/project/document.rb +3 -3
- data/lib/utopia/project/guide.rb +3 -3
- data/lib/utopia/project/linkify.rb +4 -4
- data/lib/utopia/project/version.rb +2 -2
- data/license.md +3 -2
- data/readme.md +9 -1
- data.tar.gz.sig +0 -0
- metadata +8 -63
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b00882c35aab73934edead7de90d4f2aaba8ec31081651503da8df4649711d5c
|
4
|
+
data.tar.gz: 841d1282002133580fa8679dd2d4ab34c0a4c5d4b3f2d3fb23df688e104bbdb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac775fc076391b94fef45612b6222c188b42321dccee54cfa87062e6655774aa991f6b665404d9ca3e8657a2d9f63251ce28fdebdc228adac956dd862c68ec2d
|
7
|
+
data.tar.gz: 7fab1fe6726ae94c8917f0c790557ae5baf44cf1008264b93dc62ae58bfcfcab8fefdd0257327d95dd80777e185c9bc018c1bd6ab67f3fe723d81cd3998c9090
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,6 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2023-2024, by Samuel Williams.
|
1
5
|
|
2
6
|
require 'utopia/project'
|
3
|
-
require '
|
7
|
+
require 'xrb'
|
4
8
|
|
5
9
|
def update(path: "readme.md", documentation_url: nil)
|
6
10
|
project = Utopia::Project::Base.new(context.root)
|
@@ -47,7 +51,7 @@ def public_documentation_url
|
|
47
51
|
end
|
48
52
|
|
49
53
|
def usage_section(documentation_url, project)
|
50
|
-
template =
|
54
|
+
template = XRB::Template.load_file(File.expand_path("usage.xrb", __dir__))
|
51
55
|
scope = Scope.new(documentation_url, project)
|
52
56
|
|
53
57
|
output = template.to_string(scope)
|
data/lib/utopia/project/base.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2024, by Samuel Williams.
|
5
|
+
# Copyright, 2023, by Michael Adams.
|
5
6
|
|
6
7
|
require 'utopia/path'
|
7
8
|
require 'utopia/content/links'
|
8
9
|
|
9
|
-
require '
|
10
|
+
require 'xrb/reference'
|
10
11
|
require 'decode'
|
11
12
|
|
12
13
|
require 'thread/local'
|
@@ -115,7 +116,7 @@ module Utopia
|
|
115
116
|
|
116
117
|
# Format the given text in the context of the given definition and language.
|
117
118
|
# See {document} for details.
|
118
|
-
# @returns [
|
119
|
+
# @returns [XRB::MarkupString]
|
119
120
|
def format(text, definition = nil, language: definition&.language, **options)
|
120
121
|
case text
|
121
122
|
when Enumerable
|
@@ -125,7 +126,7 @@ module Utopia
|
|
125
126
|
end
|
126
127
|
|
127
128
|
if document = self.document(text, definition, language: language)
|
128
|
-
return
|
129
|
+
return XRB::MarkupString.raw(
|
129
130
|
document.to_html(**options)
|
130
131
|
)
|
131
132
|
end
|
@@ -151,15 +152,15 @@ module Utopia
|
|
151
152
|
end
|
152
153
|
|
153
154
|
# Compute a link href to the given definition for use within the HTML output.
|
154
|
-
# @returns [
|
155
|
+
# @returns [XRB::Reference]
|
155
156
|
def link_for(definition)
|
156
157
|
path = definition.lexical_path.map{|entry| entry.to_s}
|
157
158
|
|
158
159
|
if definition.container?
|
159
|
-
return
|
160
|
+
return XRB::Reference.new(@source_path + path + "index")
|
160
161
|
else
|
161
162
|
name = path.pop
|
162
|
-
return
|
163
|
+
return XRB::Reference.new(@source_path + path + "index", fragment: id_for(definition))
|
163
164
|
end
|
164
165
|
end
|
165
166
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
require_relative 'renderer'
|
7
7
|
|
@@ -64,7 +64,7 @@ module Utopia
|
|
64
64
|
|
65
65
|
def to_html(node = self.root, **options)
|
66
66
|
renderer = Renderer.new(ids: true, flags: Markly::UNSAFE, **options)
|
67
|
-
|
67
|
+
XRB::MarkupString.raw(renderer.render(node))
|
68
68
|
end
|
69
69
|
|
70
70
|
def paragraph_node(child)
|
@@ -104,7 +104,7 @@ module Utopia
|
|
104
104
|
def code_node(content, language = nil)
|
105
105
|
if language
|
106
106
|
node = inline_html_node(
|
107
|
-
"<code class=\"language-#{language}\">#{
|
107
|
+
"<code class=\"language-#{language}\">#{XRB::Strings.to_html(content)}</code>"
|
108
108
|
)
|
109
109
|
else
|
110
110
|
node = Markly::Node.new(:code)
|
data/lib/utopia/project/guide.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
require 'utopia/path'
|
7
|
-
require '
|
7
|
+
require 'xrb/reference'
|
8
8
|
require 'decode'
|
9
9
|
|
10
10
|
module Utopia
|
@@ -78,7 +78,7 @@ module Utopia
|
|
78
78
|
# The title of the guide.
|
79
79
|
# @returns [String]
|
80
80
|
def title
|
81
|
-
@title ||
|
81
|
+
@title || XRB::Strings.to_title(self.name)
|
82
82
|
end
|
83
83
|
|
84
84
|
# The hypertext reference to this guide.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
require 'decode/syntax/rewriter'
|
7
7
|
|
@@ -19,18 +19,18 @@ module Utopia
|
|
19
19
|
def text_for(range)
|
20
20
|
text = super(range)
|
21
21
|
|
22
|
-
return
|
22
|
+
return XRB::Strings.to_html(text)
|
23
23
|
end
|
24
24
|
|
25
25
|
def link_to(definition, text)
|
26
|
-
|
26
|
+
XRB::Builder.fragment do |builder|
|
27
27
|
builder.inline('a', href: @base.link_for(definition), title: definition.qualified_name) do
|
28
28
|
builder.text(text)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def apply(output =
|
33
|
+
def apply(output = XRB::Builder.new)
|
34
34
|
output.inline('code', class: "language-#{@language.name}") do
|
35
35
|
super
|
36
36
|
end
|
data/license.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# MIT License
|
2
2
|
|
3
|
-
Copyright, 2020-
|
3
|
+
Copyright, 2020-2024, by Samuel Williams.
|
4
4
|
Copyright, 2020, by Olle Jonsson.
|
5
|
-
Copyright, 2022, by dependabot[bot].
|
5
|
+
Copyright, 2022-2023, by dependabot[bot].
|
6
|
+
Copyright, 2023, by Michael Adams.
|
6
7
|
|
7
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
9
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A simple Ruby project documentation website.
|
4
4
|
|
5
|
-
[](https://github.com/socketry/utopia-project/actions?workflow=Test)
|
6
6
|
|
7
7
|
## Motivation
|
8
8
|
|
@@ -40,6 +40,14 @@ We welcome contributions to this project.
|
|
40
40
|
4. Push to the branch (`git push origin my-new-feature`).
|
41
41
|
5. Create new Pull Request.
|
42
42
|
|
43
|
+
### Developer Certificate of Origin
|
44
|
+
|
45
|
+
This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
|
46
|
+
|
47
|
+
### Contributor Covenant
|
48
|
+
|
49
|
+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
50
|
+
|
43
51
|
## See Also
|
44
52
|
|
45
53
|
- [Utopia](https://github.com/socketry/utopia) — The website framework which powers this web application.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia-project
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Olle Jonsson
|
9
9
|
- dependabot[bot]
|
10
|
+
- Michael Adams
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain:
|
@@ -39,7 +40,7 @@ cert_chain:
|
|
39
40
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
40
41
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
41
42
|
-----END CERTIFICATE-----
|
42
|
-
date:
|
43
|
+
date: 2024-05-03 00:00:00.000000000 Z
|
43
44
|
dependencies:
|
44
45
|
- !ruby/object:Gem::Dependency
|
45
46
|
name: decode
|
@@ -117,70 +118,14 @@ dependencies:
|
|
117
118
|
requirements:
|
118
119
|
- - "~>"
|
119
120
|
- !ruby/object:Gem::Version
|
120
|
-
version: '2.
|
121
|
+
version: '2.24'
|
121
122
|
type: :runtime
|
122
123
|
prerelease: false
|
123
124
|
version_requirements: !ruby/object:Gem::Requirement
|
124
125
|
requirements:
|
125
126
|
- - "~>"
|
126
127
|
- !ruby/object:Gem::Version
|
127
|
-
version: '2.
|
128
|
-
- !ruby/object:Gem::Dependency
|
129
|
-
name: bundler
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
131
|
-
requirements:
|
132
|
-
- - ">="
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
135
|
-
type: :development
|
136
|
-
prerelease: false
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
requirements:
|
139
|
-
- - ">="
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
142
|
-
- !ruby/object:Gem::Dependency
|
143
|
-
name: covered
|
144
|
-
requirement: !ruby/object:Gem::Requirement
|
145
|
-
requirements:
|
146
|
-
- - ">="
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version: '0'
|
149
|
-
type: :development
|
150
|
-
prerelease: false
|
151
|
-
version_requirements: !ruby/object:Gem::Requirement
|
152
|
-
requirements:
|
153
|
-
- - ">="
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version: '0'
|
156
|
-
- !ruby/object:Gem::Dependency
|
157
|
-
name: rack-test
|
158
|
-
requirement: !ruby/object:Gem::Requirement
|
159
|
-
requirements:
|
160
|
-
- - ">="
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '0'
|
163
|
-
type: :development
|
164
|
-
prerelease: false
|
165
|
-
version_requirements: !ruby/object:Gem::Requirement
|
166
|
-
requirements:
|
167
|
-
- - ">="
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
version: '0'
|
170
|
-
- !ruby/object:Gem::Dependency
|
171
|
-
name: sus
|
172
|
-
requirement: !ruby/object:Gem::Requirement
|
173
|
-
requirements:
|
174
|
-
- - ">="
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
version: '0'
|
177
|
-
type: :development
|
178
|
-
prerelease: false
|
179
|
-
version_requirements: !ruby/object:Gem::Requirement
|
180
|
-
requirements:
|
181
|
-
- - ">="
|
182
|
-
- !ruby/object:Gem::Version
|
183
|
-
version: '0'
|
128
|
+
version: '2.24'
|
184
129
|
description:
|
185
130
|
email:
|
186
131
|
executables: []
|
@@ -307,7 +252,7 @@ files:
|
|
307
252
|
- template/Gemfile
|
308
253
|
- template/config.ru
|
309
254
|
- template/preload.rb
|
310
|
-
homepage: https://socketry.github.io/utopia-project
|
255
|
+
homepage: https://socketry.github.io/utopia-project
|
311
256
|
licenses:
|
312
257
|
- MIT
|
313
258
|
metadata:
|
@@ -321,14 +266,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
321
266
|
requirements:
|
322
267
|
- - ">="
|
323
268
|
- !ruby/object:Gem::Version
|
324
|
-
version: '
|
269
|
+
version: '3.1'
|
325
270
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
326
271
|
requirements:
|
327
272
|
- - ">="
|
328
273
|
- !ruby/object:Gem::Version
|
329
274
|
version: '0'
|
330
275
|
requirements: []
|
331
|
-
rubygems_version: 3.
|
276
|
+
rubygems_version: 3.5.3
|
332
277
|
signing_key:
|
333
278
|
specification_version: 4
|
334
279
|
summary: A project documentation tool based on Utopia.
|
metadata.gz.sig
CHANGED
Binary file
|