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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ab639a6ea814e5195fb740583a00a28f55d6e18d86cb46a61341b7768ac4804
4
- data.tar.gz: 4988213ac4168bb50ec1201e0cdd24c0d423b92092933546a7fa99f1e002f015
3
+ metadata.gz: b00882c35aab73934edead7de90d4f2aaba8ec31081651503da8df4649711d5c
4
+ data.tar.gz: 841d1282002133580fa8679dd2d4ab34c0a4c5d4b3f2d3fb23df688e104bbdb5
5
5
  SHA512:
6
- metadata.gz: 2b58e868cd25562bf2e17aaffdf2cfb830a72d888cf1106edebbe6edef5ba88f07b9f94c0de58d2fd18705401e40694b36725d2cbd925f19197bd9b753f0c782
7
- data.tar.gz: b60d7c5fc718544aec358b953507eec731c5e93fa460e7172500a5b2414d33e2ec5456806effa8609e525ce85377c6c43a1bdb481c4a77c02d52b80b9eb8c380
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 'trenni'
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 = Trenni::Template.load_file(File.expand_path("usage.trenni", __dir__))
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)
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2020-2022, by Samuel Williams.
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 'trenni/reference'
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 [Trenni::MarkupString]
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 Trenni::MarkupString.raw(
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 [Trenni::Reference]
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 Trenni::Reference.new(@source_path + path + "index")
160
+ return XRB::Reference.new(@source_path + path + "index")
160
161
  else
161
162
  name = path.pop
162
- return Trenni::Reference.new(@source_path + path + "index", fragment: id_for(definition))
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-2022, by Samuel Williams.
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
- Trenni::MarkupString.raw(renderer.render(node))
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}\">#{Trenni::Strings.to_html(content)}</code>"
107
+ "<code class=\"language-#{language}\">#{XRB::Strings.to_html(content)}</code>"
108
108
  )
109
109
  else
110
110
  node = Markly::Node.new(:code)
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2020-2022, by Samuel Williams.
4
+ # Copyright, 2020-2024, by Samuel Williams.
5
5
 
6
6
  require 'utopia/path'
7
- require 'trenni/reference'
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 || Trenni::Strings.to_title(self.name)
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-2023, by Samuel Williams.
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 Trenni::Strings.to_html(text)
22
+ return XRB::Strings.to_html(text)
23
23
  end
24
24
 
25
25
  def link_to(definition, text)
26
- Trenni::Builder.fragment do |builder|
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 = Trenni::Builder.new)
33
+ def apply(output = XRB::Builder.new)
34
34
  output.inline('code', class: "language-#{@language.name}") do
35
35
  super
36
36
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2020-2022, by Samuel Williams.
4
+ # Copyright, 2020-2024, by Samuel Williams.
5
5
 
6
6
  module Utopia
7
7
  module Project
8
- VERSION = "0.23.0"
8
+ VERSION = "0.24.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2020-2023, by Samuel Williams.
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
- [![Test](https://github.com/socketry/utopia-project/actions/workflows/test.yaml/badge.svg)](https://github.com/socketry/utopia-project/actions/workflows/test.yaml)
5
+ [![Development Status](https://github.com/socketry/utopia-project/workflows/Test/badge.svg)](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.23.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: 2023-06-15 00:00:00.000000000 Z
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.14'
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.14'
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: '2.5'
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.4.7
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