utopia-project 0.33.1 → 0.34.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/agent/context.rb +53 -0
- data/bake/utopia/project/readme/update.rb +16 -6
- data/bake/utopia/project.rb +3 -3
- data/context/documentation-formatting.md +67 -0
- data/context/getting-started.md +31 -0
- data/context/github-pages-integration.md +17 -0
- data/context/index.yaml +16 -0
- data/lib/utopia/project/base.rb +20 -20
- data/lib/utopia/project/document.rb +7 -3
- data/lib/utopia/project/guide.rb +14 -5
- data/lib/utopia/project/linkify.rb +4 -4
- data/lib/utopia/project/releases_document.rb +2 -2
- data/lib/utopia/project/renderer.rb +3 -3
- data/lib/utopia/project/version.rb +2 -2
- data/lib/utopia/project.rb +7 -7
- data/license.md +1 -1
- data/pages/controller.rb +3 -3
- data/pages/guides/controller.rb +2 -2
- data/pages/releases/controller.rb +2 -2
- data/pages/source/controller.rb +2 -2
- data/readme.md +8 -0
- data/releases.md +7 -1
- data/template/config.ru +3 -2
- data/template/gems.rb +10 -0
- data/template/preload.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +10 -5
- metadata.gz.sig +0 -0
- data/template/Gemfile +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e9f2b003ff67529bbe43f3597901c567860a9aee869d108e140f142a948ec6c
|
4
|
+
data.tar.gz: b0103f4c18319d9d48b4d7889a6bc921dc6fa0ce3c48de8b2f44bc545bbc2b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98a0b74ebcdadafc34b6cecca41b456a91d63d710db9b1cef039c825f806c408abc79182dc359cfdb28a55ca4d5afeabae2cab12708d2946f44347b4ce8f9f1d
|
7
|
+
data.tar.gz: e95d1f143923f738312910efc6849a488cb7c8a20bae952d770d8b6bc704822af4b7b9b2c7c8e934213a5914e58f9655ea3147591fdb790558209d67753eece9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2025, by Samuel Williams.
|
5
|
+
|
6
|
+
def initialize(...)
|
7
|
+
super
|
8
|
+
|
9
|
+
require "utopia/project"
|
10
|
+
end
|
11
|
+
|
12
|
+
# Update agent context files from the guides.
|
13
|
+
def update
|
14
|
+
project = Utopia::Project::Base.new(context.root)
|
15
|
+
|
16
|
+
FileUtils.mkdir_p self.context_root
|
17
|
+
index = {}
|
18
|
+
|
19
|
+
project.guides.each do |guide|
|
20
|
+
if guide.readme?
|
21
|
+
FileUtils.cp guide.readme_path, self.context_path_for(guide)
|
22
|
+
index[guide.name] = {
|
23
|
+
"title" => guide.title,
|
24
|
+
"order" => guide.order,
|
25
|
+
"description" => guide.description.to_markdown.chomp,
|
26
|
+
}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
if index.any?
|
31
|
+
File.open(self.context_index_path, "w") do |file|
|
32
|
+
file.puts "# Automatically generated context index for Utopia::Project guides."
|
33
|
+
file.puts "# Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`."
|
34
|
+
YAML.dump(index, file)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
return index
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def context_root
|
44
|
+
File.join(context.root, "context")
|
45
|
+
end
|
46
|
+
|
47
|
+
def context_path_for(guide)
|
48
|
+
File.join(context_root, guide.name + ".md")
|
49
|
+
end
|
50
|
+
|
51
|
+
def context_index_path
|
52
|
+
File.join(context_root, "index.yaml")
|
53
|
+
end
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2023-
|
4
|
+
# Copyright, 2023-2025, by Samuel Williams.
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
def initialize(...)
|
7
|
+
super
|
8
|
+
|
9
|
+
require "utopia/project"
|
10
|
+
end
|
8
11
|
|
9
12
|
def update(path: "readme.md", documentation_url: nil)
|
10
13
|
project = Utopia::Project::Base.new(context.root)
|
@@ -52,7 +55,7 @@ end
|
|
52
55
|
# The public documentation URL if it can be determined.
|
53
56
|
def public_documentation_url
|
54
57
|
if metadata = gemspec.metadata
|
55
|
-
if documentation_uri = metadata[
|
58
|
+
if documentation_uri = metadata["documentation_uri"]
|
56
59
|
return documentation_uri
|
57
60
|
end
|
58
61
|
end
|
@@ -66,7 +69,14 @@ def usage_section(documentation_url, project)
|
|
66
69
|
buffer << "Please see the [project documentation](#{documentation_url}) for more details.\n"
|
67
70
|
|
68
71
|
project.guides.each do |guide|
|
69
|
-
|
72
|
+
if description = guide.description
|
73
|
+
buffer << " - [#{guide.title}](#{guide.href(documentation_url)}) - #{description.to_markdown}\n"
|
74
|
+
elsif documentation = guide.documentation
|
75
|
+
document = project.document(documentation.text, language: guide.documentation.language)
|
76
|
+
buffer << " - [#{guide.title}](#{guide.href(documentation_url)}) - #{document.to_markdown}\n"
|
77
|
+
else
|
78
|
+
buffer << " - [#{guide.title}](#{guide.href(documentation_url)})\n"
|
79
|
+
end
|
70
80
|
end
|
71
81
|
|
72
82
|
return Markly.parse(buffer)
|
@@ -76,7 +86,7 @@ def releases_section(documentation_url, project)
|
|
76
86
|
buffer = String.new
|
77
87
|
|
78
88
|
buffer << "Please see the [project releases](#{documentation_url}releases/index) for all releases.\n"
|
79
|
-
|
89
|
+
|
80
90
|
project.releases.first(10).each do |release|
|
81
91
|
buffer << "\n### #{release.name}\n\n"
|
82
92
|
|
data/bake/utopia/project.rb
CHANGED
@@ -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-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
# Create an empty project in the current directory.
|
7
7
|
def create
|
@@ -38,7 +38,7 @@ end
|
|
38
38
|
# @parameter output_path [String] The output path for the static site.
|
39
39
|
# @parameter force [Boolean] Remove the output directory before generating the static content.
|
40
40
|
def static(output_path: "docs", force: true)
|
41
|
-
require
|
41
|
+
require "rackula/command"
|
42
42
|
|
43
43
|
config_path = File.expand_path("../../template/config.ru", __dir__)
|
44
44
|
public_path = File.expand_path("../../public", __dir__)
|
@@ -60,7 +60,7 @@ end
|
|
60
60
|
|
61
61
|
# Extract a description for the project.
|
62
62
|
def description(root: context.root)
|
63
|
-
require
|
63
|
+
require "markly"
|
64
64
|
|
65
65
|
readme_path = File.join(root, "readme.md")
|
66
66
|
if File.exist?(readme_path)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Documentation Formatting
|
2
|
+
|
3
|
+
This guide explains the conventions used by `utopia-project` when generating documentation for your project.
|
4
|
+
|
5
|
+
## Source Code Documentation
|
6
|
+
|
7
|
+
Source code documentation is expected to be in markdown format. This is different from the canonical `RDoc` format used by Ruby. However, using markdown is a good format for standardised documentation across a range of different languages.
|
8
|
+
|
9
|
+
### Tags
|
10
|
+
|
11
|
+
#### `@parameter`
|
12
|
+
|
13
|
+
The `@parameter` tag is used to describe the parameters of a method:
|
14
|
+
|
15
|
+
~~~ ruby
|
16
|
+
# @parameter x [Integer] The x co-ordinate.
|
17
|
+
# @parameter y [Integer] The y co-ordinate.
|
18
|
+
def move(x, y)
|
19
|
+
# ...
|
20
|
+
end
|
21
|
+
~~~
|
22
|
+
|
23
|
+
#### `@returns`
|
24
|
+
|
25
|
+
The `@returns` tag is used to describe the return type of the definition:
|
26
|
+
|
27
|
+
~~~ ruby
|
28
|
+
# @returns [Integer] The result of the computation.
|
29
|
+
def fib(n)
|
30
|
+
# ...
|
31
|
+
end
|
32
|
+
~~~
|
33
|
+
|
34
|
+
### References
|
35
|
+
|
36
|
+
It is possible to insert references in your documentation using curly brackets. In the following example `{Input}` will be expanded relative to the usage, to some symbol named `Input`.
|
37
|
+
|
38
|
+
~~~ ruby
|
39
|
+
# Frobulates the input, see {Input} for more details.
|
40
|
+
def frobulate(input)
|
41
|
+
# ... left to the imagination ...
|
42
|
+
end
|
43
|
+
~~~
|
44
|
+
|
45
|
+
## Examples & Guides
|
46
|
+
|
47
|
+
Examples provide structured information to help users understand your project and are located in the `examples/` directory. One sub-directory per example.
|
48
|
+
|
49
|
+
### `readme.md`
|
50
|
+
|
51
|
+
If an example has a `readme.md` file, it is used as the main source of documentation.
|
52
|
+
|
53
|
+
### Source Files
|
54
|
+
|
55
|
+
All other source files are listed on the example page. Top level comments with trailing code (segments) are used to help guide the user through the example.
|
56
|
+
|
57
|
+
## Diagrams
|
58
|
+
|
59
|
+
You can add diagrams formatted using `mermaid.js`.
|
60
|
+
|
61
|
+
``` mermaid
|
62
|
+
graph LR;
|
63
|
+
A-->B;
|
64
|
+
A-->C;
|
65
|
+
B-->D;
|
66
|
+
C-->D;
|
67
|
+
```
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Getting Started
|
2
|
+
|
3
|
+
This guide explains how to use `utopia-project` for your own project.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Firstly, add the gem to your project:
|
8
|
+
|
9
|
+
~~~ bash
|
10
|
+
$ bundle add utopia-project
|
11
|
+
~~~
|
12
|
+
|
13
|
+
## Start Local Server
|
14
|
+
|
15
|
+
Start the local server to preview documentation:
|
16
|
+
|
17
|
+
~~~ bash
|
18
|
+
$ bake utopia:project:serve
|
19
|
+
~~~
|
20
|
+
|
21
|
+
Right now, this server does not reload the code index, so you will need to restart the server to update the code index. This will be fixed in the future.
|
22
|
+
|
23
|
+
## Generate Static Site
|
24
|
+
|
25
|
+
You can generate a static copy of your documentation into the `docs/` folder:
|
26
|
+
|
27
|
+
~~~ bash
|
28
|
+
$ bake utopia:project:static
|
29
|
+
~~~
|
30
|
+
|
31
|
+
You can check the [guide for GitHub Pages](../github-pages-integration/index) which gives more details on how to deploy the static site using GitHub.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# GitHub Pages Integration
|
2
|
+
|
3
|
+
This guide shows you how to use `utopia-project` with GitHub Pages.
|
4
|
+
|
5
|
+
## Static Site Generation
|
6
|
+
|
7
|
+
Once you are happy with your project's documentation, use this command to generate a static site:
|
8
|
+
|
9
|
+
~~~ bash
|
10
|
+
$ bake utopia:project:static
|
11
|
+
~~~
|
12
|
+
|
13
|
+
This will generate a static copy of your documentation into `docs/` which is what is required by GitHub Pages.
|
14
|
+
|
15
|
+
## Enable GitHub Pages
|
16
|
+
|
17
|
+
In your GitHub project settings, you will need to [enable GitHub Pages served from `docs/`](https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source).
|
data/context/index.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Automatically generated context index for Utopia::Project guides.
|
2
|
+
# Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`.
|
3
|
+
---
|
4
|
+
getting-started:
|
5
|
+
title: Getting Started
|
6
|
+
order: 1
|
7
|
+
description: This guide explains how to use `utopia-project` for your own project.
|
8
|
+
documentation-formatting:
|
9
|
+
title: Documentation Formatting
|
10
|
+
order: 2
|
11
|
+
description: This guide explains the conventions used by `utopia-project` when generating
|
12
|
+
documentation for your project.
|
13
|
+
github-pages-integration:
|
14
|
+
title: GitHub Pages Integration
|
15
|
+
order: 3
|
16
|
+
description: This guide shows you how to use `utopia-project` with GitHub Pages.
|
data/lib/utopia/project/base.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
# Copyright, 2023, by Michael Adams.
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
7
|
+
require "utopia/path"
|
8
|
+
require "utopia/content/links"
|
9
9
|
|
10
|
-
require
|
11
|
-
require
|
10
|
+
require "xrb/reference"
|
11
|
+
require "decode"
|
12
12
|
|
13
|
-
require
|
13
|
+
require "thread/local"
|
14
14
|
|
15
|
-
require_relative
|
16
|
-
require_relative
|
15
|
+
require_relative "document"
|
16
|
+
require_relative "releases_document"
|
17
17
|
|
18
|
-
require_relative
|
19
|
-
require_relative
|
18
|
+
require_relative "guide"
|
19
|
+
require_relative "linkify"
|
20
20
|
|
21
21
|
module Utopia
|
22
22
|
module Project
|
@@ -120,13 +120,6 @@ module Utopia
|
|
120
120
|
# See {document} for details.
|
121
121
|
# @returns [XRB::MarkupString]
|
122
122
|
def format(text, definition = nil, language: definition&.language, **options)
|
123
|
-
case text
|
124
|
-
when Enumerable
|
125
|
-
text = text.to_a.join("\n")
|
126
|
-
when nil
|
127
|
-
return nil
|
128
|
-
end
|
129
|
-
|
130
123
|
if document = self.document(text, definition, language: language)
|
131
124
|
return XRB::Markup.raw(
|
132
125
|
document.to_html(**options)
|
@@ -140,6 +133,13 @@ module Utopia
|
|
140
133
|
#
|
141
134
|
# @returns [Document]
|
142
135
|
def document(text, definition = nil, language: definition&.language)
|
136
|
+
case text
|
137
|
+
when Enumerable
|
138
|
+
text = text.to_a.join("\n")
|
139
|
+
when nil
|
140
|
+
return nil
|
141
|
+
end
|
142
|
+
|
143
143
|
Document.new(text, self, definition: definition, default_language: language)
|
144
144
|
end
|
145
145
|
|
@@ -178,12 +178,12 @@ module Utopia
|
|
178
178
|
|
179
179
|
next unless File.directory?(guide_path)
|
180
180
|
|
181
|
-
yield Guide.new(self, guide_path)
|
181
|
+
yield Guide.new(self, guide_path, link.info)
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
185
185
|
def readme_document
|
186
|
-
if path = self.path_for(
|
186
|
+
if path = self.path_for("readme.md") || self.path_for("README.md")
|
187
187
|
Document.new(File.read(path), self)
|
188
188
|
end
|
189
189
|
end
|
@@ -193,7 +193,7 @@ module Utopia
|
|
193
193
|
end
|
194
194
|
|
195
195
|
def releases_document
|
196
|
-
if path = self.path_for(
|
196
|
+
if path = self.path_for("releases.md")
|
197
197
|
ReleasesDocument.new(File.read(path), self)
|
198
198
|
end
|
199
199
|
end
|
@@ -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-2025, by Samuel Williams.
|
5
5
|
|
6
|
-
require_relative
|
7
|
-
require
|
6
|
+
require_relative "renderer"
|
7
|
+
require "xrb"
|
8
8
|
|
9
9
|
module Utopia
|
10
10
|
module Project
|
@@ -72,6 +72,10 @@ module Utopia
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
def to_markdown(**options)
|
76
|
+
self.root.to_markdown(**options)
|
77
|
+
end
|
78
|
+
|
75
79
|
def to_html(node = self.root, **options)
|
76
80
|
renderer = Renderer.new(ids: true, flags: Markly::UNSAFE, **options)
|
77
81
|
XRB::Markup.raw(renderer.render(node))
|
data/lib/utopia/project/guide.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
6
|
+
require "utopia/path"
|
7
|
+
require "xrb/reference"
|
8
|
+
require "decode"
|
9
9
|
|
10
10
|
module Utopia
|
11
11
|
module Project
|
@@ -14,9 +14,10 @@ module Utopia
|
|
14
14
|
# Initialize the example with the given root path.
|
15
15
|
# @parameter base [Base] The base instance for the project.
|
16
16
|
# @parameter root [String] The file-system path to the root of the example.
|
17
|
-
def initialize(base, root)
|
17
|
+
def initialize(base, root, metadata)
|
18
18
|
@base = base
|
19
19
|
@root = root
|
20
|
+
@metadata = metadata
|
20
21
|
|
21
22
|
@documentation = nil
|
22
23
|
|
@@ -31,6 +32,14 @@ module Utopia
|
|
31
32
|
# @attribute [String | Nil]
|
32
33
|
attr :description
|
33
34
|
|
35
|
+
# The metadata associated with the guide.
|
36
|
+
# @attribute [Hash]
|
37
|
+
attr :metadata
|
38
|
+
|
39
|
+
def order
|
40
|
+
metadata[:order]
|
41
|
+
end
|
42
|
+
|
34
43
|
README = "readme.md"
|
35
44
|
|
36
45
|
# The path to the README file for the guide.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
|
-
require
|
6
|
+
require "decode/syntax/rewriter"
|
7
7
|
|
8
8
|
module Utopia
|
9
9
|
module Project
|
@@ -24,14 +24,14 @@ module Utopia
|
|
24
24
|
|
25
25
|
def link_to(definition, text)
|
26
26
|
XRB::Builder.fragment do |builder|
|
27
|
-
builder.inline(
|
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
33
|
def apply(output = XRB::Builder.new)
|
34
|
-
output.inline(
|
34
|
+
output.inline("code", class: "language-#{@language.name}") do
|
35
35
|
super
|
36
36
|
end
|
37
37
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2022, by Samuel Williams.
|
4
|
+
# Copyright, 2022-2025, by Samuel Williams.
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
6
|
+
require "markly"
|
7
|
+
require "markly/renderer/html"
|
8
8
|
|
9
9
|
module Utopia
|
10
10
|
module Project
|
data/lib/utopia/project.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
require "utopia/project/version"
|
7
7
|
|
8
|
-
require
|
8
|
+
require "variant"
|
9
9
|
|
10
|
-
require
|
10
|
+
require "utopia/localization"
|
11
11
|
|
12
|
-
require_relative
|
12
|
+
require_relative "project/base"
|
13
13
|
|
14
14
|
module Utopia
|
15
15
|
module Project
|
@@ -43,13 +43,13 @@ module Utopia
|
|
43
43
|
builder.use Utopia::Static, root: PUBLIC_ROOT
|
44
44
|
|
45
45
|
builder.use Utopia::Redirection::Rewrite, {
|
46
|
-
|
46
|
+
"/" => "/index"
|
47
47
|
}
|
48
48
|
|
49
49
|
builder.use Utopia::Redirection::DirectoryIndex
|
50
50
|
|
51
51
|
builder.use Utopia::Redirection::Errors, {
|
52
|
-
404 =>
|
52
|
+
404 => "/errors/file-not-found"
|
53
53
|
}
|
54
54
|
|
55
55
|
if locales
|
@@ -66,7 +66,7 @@ module Utopia
|
|
66
66
|
# 'gallery' => Utopia::Gallery::Tags.new
|
67
67
|
}
|
68
68
|
|
69
|
-
builder.run lambda {
|
69
|
+
builder.run lambda {|env| [404, {}, []]}
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
data/license.md
CHANGED
data/pages/controller.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
prepend Actions
|
7
7
|
|
8
|
-
on
|
8
|
+
on "**" do
|
9
9
|
@base = Utopia::Project::Base.instance
|
10
10
|
end
|
11
11
|
|
12
|
-
on
|
12
|
+
on "index" do
|
13
13
|
if @document = @base.readme_document
|
14
14
|
@document.replace_section("Usage") do |header|
|
15
15
|
header.insert_after(@document.html_node("<content:usage/>"))
|
data/pages/guides/controller.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
prepend Actions
|
7
7
|
|
8
|
-
on
|
8
|
+
on "**/*/index" do |request, path|
|
9
9
|
name = path.components[-2]
|
10
10
|
|
11
11
|
@guide = @base.guides.find do |guide|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright,
|
4
|
+
# Copyright, 2024-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
prepend Actions
|
7
7
|
|
8
|
-
on
|
8
|
+
on "index" do
|
9
9
|
@document = @base.releases_document
|
10
10
|
end
|
data/pages/source/controller.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
prepend Actions
|
7
7
|
|
8
|
-
on
|
8
|
+
on "**/*/index" do |request, path|
|
9
9
|
@lexical_path = path.components.dup
|
10
10
|
# Remove the last "index" part:
|
11
11
|
@lexical_path.pop
|
data/readme.md
CHANGED
@@ -31,6 +31,14 @@ Please see the [project documentation](https://socketry.github.io/utopia-project
|
|
31
31
|
|
32
32
|
Please see the [project releases](https://socketry.github.io/utopia-project/releases/index) for all releases.
|
33
33
|
|
34
|
+
### v0.34.0
|
35
|
+
|
36
|
+
- Introduce `bake utopia:project:agent:context:update` command to update the agent context from the guides in the project.
|
37
|
+
|
38
|
+
### v0.33.2
|
39
|
+
|
40
|
+
- Fixed handling of segmented code guides when rendered into a `readme.md` file.
|
41
|
+
|
34
42
|
### v0.33.0
|
35
43
|
|
36
44
|
- Fix presentation of release notes on releases page.
|
data/releases.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
-
|
3
|
+
## v0.34.0
|
4
|
+
|
5
|
+
- Introduce `bake utopia:project:agent:context:update` command to update the agent context from the guides in the project.
|
6
|
+
|
7
|
+
## v0.33.2
|
8
|
+
|
9
|
+
- Fixed handling of segmented code guides when rendered into a `readme.md` file.
|
4
10
|
|
5
11
|
## v0.33.0
|
6
12
|
|
data/template/config.ru
CHANGED
data/template/gems.rb
ADDED
data/template/preload.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia-project
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -39,7 +39,7 @@ cert_chain:
|
|
39
39
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
40
40
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
41
41
|
-----END CERTIFICATE-----
|
42
|
-
date:
|
42
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
43
43
|
dependencies:
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: decode
|
@@ -130,7 +130,12 @@ extensions: []
|
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
132
|
- bake/utopia/project.rb
|
133
|
+
- bake/utopia/project/agent/context.rb
|
133
134
|
- bake/utopia/project/readme/update.rb
|
135
|
+
- context/documentation-formatting.md
|
136
|
+
- context/getting-started.md
|
137
|
+
- context/github-pages-integration.md
|
138
|
+
- context/index.yaml
|
134
139
|
- lib/utopia/project.rb
|
135
140
|
- lib/utopia/project/base.md
|
136
141
|
- lib/utopia/project/base.rb
|
@@ -254,8 +259,8 @@ files:
|
|
254
259
|
- public/robots.txt
|
255
260
|
- readme.md
|
256
261
|
- releases.md
|
257
|
-
- template/Gemfile
|
258
262
|
- template/config.ru
|
263
|
+
- template/gems.rb
|
259
264
|
- template/preload.rb
|
260
265
|
homepage: https://socketry.github.io/utopia-project
|
261
266
|
licenses:
|
@@ -271,14 +276,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
271
276
|
requirements:
|
272
277
|
- - ">="
|
273
278
|
- !ruby/object:Gem::Version
|
274
|
-
version: '3.
|
279
|
+
version: '3.2'
|
275
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
281
|
requirements:
|
277
282
|
- - ">="
|
278
283
|
- !ruby/object:Gem::Version
|
279
284
|
version: '0'
|
280
285
|
requirements: []
|
281
|
-
rubygems_version: 3.6.
|
286
|
+
rubygems_version: 3.6.9
|
282
287
|
specification_version: 4
|
283
288
|
summary: A project documentation tool based on Utopia.
|
284
289
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|