bake-gem-github 0.0.3
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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data/agents.md +437 -0
- data/bake/gem/github/release.rb +51 -0
- data/bake/gem/github/setup.rb +15 -0
- data/bake/gem/github.rb +31 -0
- data/context/getting-started.md +106 -0
- data/context/index.yaml +10 -0
- data/lib/bake/gem/github/project.rb +111 -0
- data/lib/bake/gem/github/publisher.rb +215 -0
- data/lib/bake/gem/github/setup.rb +62 -0
- data/lib/bake/gem/github/version.rb +15 -0
- data/license.md +22 -0
- data/readme.md +12 -0
- data/release.cert +24 -0
- data/releases.md +5 -0
- data/templates/release-prepare.yaml.erb +45 -0
- data/templates/release-publish.yaml.erb +103 -0
- data/templates/release-validate.yaml.erb +32 -0
- data/templates/releasing.md +13 -0
- data.tar.gz.sig +2 -0
- metadata +122 -0
- metadata.gz.sig +2 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 0643ea73beb64b3061e5ab768d1426e9220ec384ae07cb71c7e31239b671adf9
|
|
4
|
+
data.tar.gz: 05b9f8624c05fc27ec1197bd1097df44ec3ab2e0b802c9fbc94204e4bc73b8cf
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 1467cb16603f373a45d019f62010d0e49165a072a9cdf00cd64831404008a980343e388fd7b20d04cbe92d323ebdefdd3795ac63662e84d2b2569921285e76d8
|
|
7
|
+
data.tar.gz: 3114b8df86c511ee0a471f5482adf98bdc2769689ef6c94dcc6cf4611542935537217880bdea9f6adc73a7b65ef63f7c2682cac30ec2f9a7bd4d5a92029a200e
|
checksums.yaml.gz.sig
ADDED
|
Binary file
|
data/agents.md
ADDED
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
# Agent
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
This section provides links to documentation from installed packages. It is automatically generated and may be updated by running `bake agent:context:install`.
|
|
6
|
+
|
|
7
|
+
**Important:** Before performing any code, documentation, or analysis tasks, always read and apply the full content of any relevant documentation referenced in the following sections. These context files contain authoritative standards and best practices for documentation, code style, and project-specific workflows. **Do not proceed with any actions until you have read and incorporated the guidance from relevant context files.**
|
|
8
|
+
|
|
9
|
+
**Setup Instructions:** If the referenced files are not present or if dependencies have been updated, run `bake agent:context:install` to install the latest context files.
|
|
10
|
+
|
|
11
|
+
### agent-context
|
|
12
|
+
|
|
13
|
+
Install and manage context files from Ruby gems.
|
|
14
|
+
|
|
15
|
+
#### [Getting Started](.context/agent-context/getting-started.md)
|
|
16
|
+
|
|
17
|
+
This guide explains how to use `agent-context`, a tool for discovering and installing contextual information from Ruby gems to help AI agents.
|
|
18
|
+
|
|
19
|
+
### async
|
|
20
|
+
|
|
21
|
+
A concurrency framework for Ruby.
|
|
22
|
+
|
|
23
|
+
#### [Getting Started](.context/async/getting-started.md)
|
|
24
|
+
|
|
25
|
+
This guide shows how to add async to your project and run code asynchronously.
|
|
26
|
+
|
|
27
|
+
#### [Scheduler](.context/async/scheduler.md)
|
|
28
|
+
|
|
29
|
+
This guide gives an overview of how the scheduler is implemented.
|
|
30
|
+
|
|
31
|
+
#### [Tasks](.context/async/tasks.md)
|
|
32
|
+
|
|
33
|
+
This guide explains how asynchronous tasks work and how to use them.
|
|
34
|
+
|
|
35
|
+
#### [Best Practices](.context/async/best-practices.md)
|
|
36
|
+
|
|
37
|
+
This guide gives an overview of best practices for using Async.
|
|
38
|
+
|
|
39
|
+
#### [Debugging](.context/async/debugging.md)
|
|
40
|
+
|
|
41
|
+
This guide explains how to debug issues with programs that use Async.
|
|
42
|
+
|
|
43
|
+
#### [Thread safety](.context/async/thread-safety.md)
|
|
44
|
+
|
|
45
|
+
This guide explains thread safety in Ruby, focusing on fibers and threads, common pitfalls, and best practices to avoid problems like data corruption, race conditions, and deadlocks.
|
|
46
|
+
|
|
47
|
+
### async-container
|
|
48
|
+
|
|
49
|
+
Abstract container-based parallelism using threads and processes where appropriate.
|
|
50
|
+
|
|
51
|
+
#### [Getting Started](.context/async-container/getting-started.md)
|
|
52
|
+
|
|
53
|
+
This guide explains how to use `async-container` to build basic scalable systems.
|
|
54
|
+
|
|
55
|
+
#### [Container Policies](.context/async-container/policies.md)
|
|
56
|
+
|
|
57
|
+
This guide explains how to use policies to monitor container health and implement custom failure handling strategies.
|
|
58
|
+
|
|
59
|
+
#### [Systemd Integration](.context/async-container/systemd-integration.md)
|
|
60
|
+
|
|
61
|
+
This guide explains how to use `async-container` with systemd to manage your application as a service.
|
|
62
|
+
|
|
63
|
+
#### [Kubernetes Integration](.context/async-container/kubernetes-integration.md)
|
|
64
|
+
|
|
65
|
+
This guide explains how to use `async-container` with Kubernetes to manage your application as a containerized service.
|
|
66
|
+
|
|
67
|
+
### async-http
|
|
68
|
+
|
|
69
|
+
A HTTP client and server library.
|
|
70
|
+
|
|
71
|
+
#### [Getting Started](.context/async-http/getting-started.md)
|
|
72
|
+
|
|
73
|
+
This guide explains how to make HTTP requests and serve HTTP responses with `Async::HTTP`.
|
|
74
|
+
|
|
75
|
+
#### [Choosing a Client](.context/async-http/choosing-a-client.md)
|
|
76
|
+
|
|
77
|
+
This guide explains how to choose between ruby:`Async::HTTP::Internet`, ruby:`Async::HTTP::Client`, and higher-level interfaces for libraries.
|
|
78
|
+
|
|
79
|
+
#### [Concurrent Requests and Connection Pooling](.context/async-http/concurrent-requests.md)
|
|
80
|
+
|
|
81
|
+
This guide explains how to run HTTP requests concurrently while keeping request fan-out, connection usage, and resource life cycles bounded.
|
|
82
|
+
|
|
83
|
+
#### [Testing](.context/async-http/testing.md)
|
|
84
|
+
|
|
85
|
+
This guide explains how to test `Async::HTTP` clients and servers without depending on external HTTP services.
|
|
86
|
+
|
|
87
|
+
### async-http-cache
|
|
88
|
+
|
|
89
|
+
Standard-compliant cache for async-http.
|
|
90
|
+
|
|
91
|
+
#### [Getting Started](.context/async-http-cache/getting-started.md)
|
|
92
|
+
|
|
93
|
+
This guide explains how to get started with `async-http-cache`, a cache middleware for `Async::HTTP` clients and servers.
|
|
94
|
+
|
|
95
|
+
### async-service
|
|
96
|
+
|
|
97
|
+
A service layer for Async.
|
|
98
|
+
|
|
99
|
+
#### [Getting Started](.context/async-service/getting-started.md)
|
|
100
|
+
|
|
101
|
+
This guide explains how to get started with `async-service` to create and run services in Ruby.
|
|
102
|
+
|
|
103
|
+
#### [Container Policies](.context/async-service/policies.md)
|
|
104
|
+
|
|
105
|
+
This guide explains how to configure container policies for your services and understand the default failure handling behavior.
|
|
106
|
+
|
|
107
|
+
#### [Service Architecture](.context/async-service/service-architecture.md)
|
|
108
|
+
|
|
109
|
+
This guide explains the key architectural components of `async-service` and how they work together to provide a clean separation of concerns.
|
|
110
|
+
|
|
111
|
+
#### [Best Practices](.context/async-service/best-practices.md)
|
|
112
|
+
|
|
113
|
+
This guide outlines recommended patterns and practices for building robust, maintainable services with `async-service`.
|
|
114
|
+
|
|
115
|
+
#### [Deployment](.context/async-service/deployment.md)
|
|
116
|
+
|
|
117
|
+
This guide explains how to deploy `async-service` applications using systemd and Kubernetes. We'll use a simple example service to demonstrate deployment configurations.
|
|
118
|
+
|
|
119
|
+
### bake
|
|
120
|
+
|
|
121
|
+
A replacement for rake with a simpler syntax.
|
|
122
|
+
|
|
123
|
+
#### [Getting Started](.context/bake/getting-started.md)
|
|
124
|
+
|
|
125
|
+
This guide gives a general overview of `bake` and how to use it.
|
|
126
|
+
|
|
127
|
+
#### [Command Line Interface](.context/bake/command-line-interface.md)
|
|
128
|
+
|
|
129
|
+
The `bake` command is broken up into two main functions: `list` and `call`.
|
|
130
|
+
|
|
131
|
+
#### [Project Integration](.context/bake/project-integration.md)
|
|
132
|
+
|
|
133
|
+
This guide explains how to add `bake` to a Ruby project.
|
|
134
|
+
|
|
135
|
+
#### [Gem Integration](.context/bake/gem-integration.md)
|
|
136
|
+
|
|
137
|
+
This guide explains how to add `bake` to a Ruby gem and export standardised tasks for use by other gems and projects.
|
|
138
|
+
|
|
139
|
+
#### [Input and Output](.context/bake/input-and-output.md)
|
|
140
|
+
|
|
141
|
+
`bake` has built in tasks for reading input and writing output in different formats. While this can be useful for general processing, there are some limitations, notably that rich object representations like `json` and `yaml` often don't support stream processing.
|
|
142
|
+
|
|
143
|
+
### bake-gem
|
|
144
|
+
|
|
145
|
+
Release management for Ruby gems.
|
|
146
|
+
|
|
147
|
+
#### [Getting Started](.context/bake-gem/getting-started.md)
|
|
148
|
+
|
|
149
|
+
This guide explains how to use `bake-gem` to release gems safely and efficiently.
|
|
150
|
+
|
|
151
|
+
### bake-releases
|
|
152
|
+
|
|
153
|
+
Releases document management.
|
|
154
|
+
|
|
155
|
+
#### [Getting Started](.context/bake-releases/getting-started.md)
|
|
156
|
+
|
|
157
|
+
This guide explains how to use `bake-releases` to manage release documentation for your Ruby gem.
|
|
158
|
+
|
|
159
|
+
### console
|
|
160
|
+
|
|
161
|
+
Beautiful logging for Ruby.
|
|
162
|
+
|
|
163
|
+
#### [Getting Started](.context/console/getting-started.md)
|
|
164
|
+
|
|
165
|
+
This guide explains how to use `console` for logging.
|
|
166
|
+
|
|
167
|
+
#### [Command Line](.context/console/command-line.md)
|
|
168
|
+
|
|
169
|
+
This guide explains how the `console` gem can be controlled using environment variables.
|
|
170
|
+
|
|
171
|
+
#### [Configuration](.context/console/configuration.md)
|
|
172
|
+
|
|
173
|
+
This guide explains how to implement per-project configuration for the `console` gem.
|
|
174
|
+
|
|
175
|
+
#### [Integration](.context/console/integration.md)
|
|
176
|
+
|
|
177
|
+
This guide explains how to integrate the `console` output into different systems.
|
|
178
|
+
|
|
179
|
+
#### [Events](.context/console/events.md)
|
|
180
|
+
|
|
181
|
+
This guide explains how to log structured events with a well-defined schema.
|
|
182
|
+
|
|
183
|
+
### decode
|
|
184
|
+
|
|
185
|
+
Code analysis for documentation generation.
|
|
186
|
+
|
|
187
|
+
#### [Getting Started](.context/decode/getting-started.md)
|
|
188
|
+
|
|
189
|
+
This guide explains how to use `decode` for source code analysis.
|
|
190
|
+
|
|
191
|
+
#### [Documentation Coverage](.context/decode/documentation-coverage.md)
|
|
192
|
+
|
|
193
|
+
This guide explains how to test and monitor documentation coverage in your Ruby projects using the Decode gem's built-in bake tasks.
|
|
194
|
+
|
|
195
|
+
#### [Ruby Documentation](.context/decode/ruby-documentation.md)
|
|
196
|
+
|
|
197
|
+
This guide covers documentation practices and pragmas supported by the Decode gem for documenting Ruby code. These pragmas provide structured documentation that can be parsed and used to generate API documentation and achieve complete documentation coverage.
|
|
198
|
+
|
|
199
|
+
### falcon
|
|
200
|
+
|
|
201
|
+
A fast, asynchronous, rack-compatible web server.
|
|
202
|
+
|
|
203
|
+
#### [Getting Started](.context/falcon/getting-started.md)
|
|
204
|
+
|
|
205
|
+
This guide gives an overview of how to use Falcon for running Ruby web applications.
|
|
206
|
+
|
|
207
|
+
#### [Rails Integration](.context/falcon/rails-integration.md)
|
|
208
|
+
|
|
209
|
+
This guide explains how to host Rails applications with Falcon.
|
|
210
|
+
|
|
211
|
+
#### [Deployment](.context/falcon/deployment.md)
|
|
212
|
+
|
|
213
|
+
This guide explains how to deploy applications using the Falcon web server. It covers the recommended deployment methods, configuration options, and examples for different environments, including systemd and kubernetes.
|
|
214
|
+
|
|
215
|
+
#### [Dynamic Clusters with Envoy](.context/falcon/cluster-deployment.md)
|
|
216
|
+
|
|
217
|
+
This guide explains how to run Falcon workers with independently bound endpoints, publish them dynamically using xDS, and balance requests according to their current load using ORCA.
|
|
218
|
+
|
|
219
|
+
#### [Performance Tuning](.context/falcon/performance-tuning.md)
|
|
220
|
+
|
|
221
|
+
This guide explains the performance characteristics of Falcon.
|
|
222
|
+
|
|
223
|
+
#### [WebSockets](.context/falcon/websockets.md)
|
|
224
|
+
|
|
225
|
+
This guide explains how to use WebSockets with Falcon.
|
|
226
|
+
|
|
227
|
+
#### [Interim Responses](.context/falcon/interim-responses.md)
|
|
228
|
+
|
|
229
|
+
This guide explains how to use interim responses in Falcon to send early hints to the client.
|
|
230
|
+
|
|
231
|
+
#### [How It Works](.context/falcon/how-it-works.md)
|
|
232
|
+
|
|
233
|
+
This guide gives an overview of how Falcon handles an incoming web request.
|
|
234
|
+
|
|
235
|
+
### io-endpoint
|
|
236
|
+
|
|
237
|
+
Provides a separation of concerns interface for IO endpoints.
|
|
238
|
+
|
|
239
|
+
#### [Getting Started](.context/io-endpoint/getting-started.md)
|
|
240
|
+
|
|
241
|
+
This guide explains how to get started with `io-endpoint`, a library that provides a separation of concerns interface for network I/O endpoints.
|
|
242
|
+
|
|
243
|
+
#### [Named Endpoints](.context/io-endpoint/named-endpoints.md)
|
|
244
|
+
|
|
245
|
+
This guide explains how to use `IO::Endpoint::NamedEndpoints` to manage multiple endpoints by name, enabling scenarios like running the same application on different protocols or ports.
|
|
246
|
+
|
|
247
|
+
### io-event
|
|
248
|
+
|
|
249
|
+
An event loop.
|
|
250
|
+
|
|
251
|
+
#### [Getting Started](.context/io-event/getting-started.md)
|
|
252
|
+
|
|
253
|
+
This guide explains how to use `io-event` for non-blocking IO.
|
|
254
|
+
|
|
255
|
+
### io-stream
|
|
256
|
+
|
|
257
|
+
Provides a generic stream wrapper for IO instances.
|
|
258
|
+
|
|
259
|
+
#### [Getting Started](.context/io-stream/getting-started.md)
|
|
260
|
+
|
|
261
|
+
This guide explains how to use `io-stream` to add efficient buffering to Ruby IO objects.
|
|
262
|
+
|
|
263
|
+
#### [High Performance IO](.context/io-stream/high-performance-io.md)
|
|
264
|
+
|
|
265
|
+
This guide explains how to achieve optimal performance when using `io-stream` by understanding and controlling flush behavior.
|
|
266
|
+
|
|
267
|
+
### markly
|
|
268
|
+
|
|
269
|
+
CommonMark parser and renderer. Written in C, wrapped in Ruby.
|
|
270
|
+
|
|
271
|
+
#### [Getting Started](.context/markly/getting-started.md)
|
|
272
|
+
|
|
273
|
+
This guide explains now to install and use Markly.
|
|
274
|
+
|
|
275
|
+
#### [Extensions](.context/markly/extensions.md)
|
|
276
|
+
|
|
277
|
+
This guide explains how to enable and use Markly's Markdown extensions.
|
|
278
|
+
|
|
279
|
+
#### [Abstract Syntax Tree](.context/markly/abstract-syntax-tree.md)
|
|
280
|
+
|
|
281
|
+
This guide explains how to use Markly's abstract syntax tree (AST) to parse and manipulate Markdown documents.
|
|
282
|
+
|
|
283
|
+
#### [Headings](.context/markly/headings.md)
|
|
284
|
+
|
|
285
|
+
This guide explains how to work with headings in Markly, including extracting them for navigation and handling duplicate heading text.
|
|
286
|
+
|
|
287
|
+
### protocol-http
|
|
288
|
+
|
|
289
|
+
Provides abstractions to handle HTTP protocols.
|
|
290
|
+
|
|
291
|
+
#### [Getting Started](.context/protocol-http/getting-started.md)
|
|
292
|
+
|
|
293
|
+
This guide explains how to use `protocol-http` for building abstract HTTP interfaces.
|
|
294
|
+
|
|
295
|
+
#### [Message Body](.context/protocol-http/message-body.md)
|
|
296
|
+
|
|
297
|
+
This guide explains how to work with HTTP request and response message bodies using `Protocol::HTTP::Body` classes.
|
|
298
|
+
|
|
299
|
+
#### [Headers](.context/protocol-http/headers.md)
|
|
300
|
+
|
|
301
|
+
This guide explains how to work with HTTP headers using `protocol-http`.
|
|
302
|
+
|
|
303
|
+
#### [Middleware](.context/protocol-http/middleware.md)
|
|
304
|
+
|
|
305
|
+
This guide explains how to build and use HTTP middleware with `Protocol::HTTP::Middleware`.
|
|
306
|
+
|
|
307
|
+
#### [Streaming](.context/protocol-http/streaming.md)
|
|
308
|
+
|
|
309
|
+
This guide gives an overview of how to implement streaming requests and responses.
|
|
310
|
+
|
|
311
|
+
#### [Design Overview](.context/protocol-http/design-overview.md)
|
|
312
|
+
|
|
313
|
+
This guide explains the high level design of `protocol-http` in the context of wider design patterns that can be used to implement HTTP clients and servers.
|
|
314
|
+
|
|
315
|
+
### protocol-http1
|
|
316
|
+
|
|
317
|
+
A low level implementation of the HTTP/1 protocol.
|
|
318
|
+
|
|
319
|
+
#### [Getting Started](.context/protocol-http1/getting-started.md)
|
|
320
|
+
|
|
321
|
+
This guide explains how to get started with `protocol-http1`, a low-level implementation of the HTTP/1 protocol for building HTTP clients and servers.
|
|
322
|
+
|
|
323
|
+
### protocol-http2
|
|
324
|
+
|
|
325
|
+
A low level implementation of the HTTP/2 protocol.
|
|
326
|
+
|
|
327
|
+
#### [Getting Started](.context/protocol-http2/getting-started.md)
|
|
328
|
+
|
|
329
|
+
This guide explains how to use the `protocol-http2` gem to implement a basic HTTP/2 client.
|
|
330
|
+
|
|
331
|
+
### protocol-rack
|
|
332
|
+
|
|
333
|
+
An implementation of the Rack protocol/specification.
|
|
334
|
+
|
|
335
|
+
#### [Getting Started](.context/protocol-rack/getting-started.md)
|
|
336
|
+
|
|
337
|
+
This guide explains how to get started with `protocol-rack` and integrate Rack applications with `Protocol::HTTP` servers.
|
|
338
|
+
|
|
339
|
+
#### [Request and Response Handling](.context/protocol-rack/request-response.md)
|
|
340
|
+
|
|
341
|
+
This guide explains how to work with requests and responses when bridging between Rack and `Protocol::HTTP`, covering advanced use cases and edge cases.
|
|
342
|
+
|
|
343
|
+
### samovar
|
|
344
|
+
|
|
345
|
+
Samovar is a flexible option parser excellent support for sub-commands and help documentation.
|
|
346
|
+
|
|
347
|
+
#### [Getting Started](.context/samovar/getting-started.md)
|
|
348
|
+
|
|
349
|
+
This guide explains how to use `samovar` to build command-line tools and applications.
|
|
350
|
+
|
|
351
|
+
#### [Completion](.context/samovar/completion.md)
|
|
352
|
+
|
|
353
|
+
This guide explains how to add shell completion to commands built with `samovar`.
|
|
354
|
+
|
|
355
|
+
### sus
|
|
356
|
+
|
|
357
|
+
A fast and scalable test runner.
|
|
358
|
+
|
|
359
|
+
#### [Getting Started](.context/sus/getting-started.md)
|
|
360
|
+
|
|
361
|
+
This guide explains how to use the `sus` gem to write tests for your Ruby projects.
|
|
362
|
+
|
|
363
|
+
#### [Mocking](.context/sus/mocking.md)
|
|
364
|
+
|
|
365
|
+
This guide explains how to use mocking in sus to isolate dependencies and verify interactions in your tests.
|
|
366
|
+
|
|
367
|
+
#### [Shared Test Behaviors and Fixtures](.context/sus/shared-contexts.md)
|
|
368
|
+
|
|
369
|
+
This guide explains how to use shared test contexts and fixtures in sus to reduce duplication and ensure consistent test behavior across your test suite.
|
|
370
|
+
|
|
371
|
+
### traces
|
|
372
|
+
|
|
373
|
+
Application instrumentation and tracing.
|
|
374
|
+
|
|
375
|
+
#### [Getting Started](.context/traces/getting-started.md)
|
|
376
|
+
|
|
377
|
+
This guide explains how to use `traces` for tracing code execution.
|
|
378
|
+
|
|
379
|
+
#### [Context Propagation](.context/traces/context-propagation.md)
|
|
380
|
+
|
|
381
|
+
This guide explains how to propagate trace context between different execution contexts within your application using `Traces.current_context` and `Traces.with_context`.
|
|
382
|
+
|
|
383
|
+
#### [Testing](.context/traces/testing.md)
|
|
384
|
+
|
|
385
|
+
This guide explains how to test traces in your code.
|
|
386
|
+
|
|
387
|
+
#### [Capture](.context/traces/capture.md)
|
|
388
|
+
|
|
389
|
+
This guide explains how to use `traces` for exporting traces from your application. This can be used to document all possible traces.
|
|
390
|
+
|
|
391
|
+
### utopia
|
|
392
|
+
|
|
393
|
+
Utopia is a framework for building dynamic content-driven websites.
|
|
394
|
+
|
|
395
|
+
#### [Getting Started](.context/utopia/getting-started.md)
|
|
396
|
+
|
|
397
|
+
This guide explains how to set up a `utopia` website for local development and deployment.
|
|
398
|
+
|
|
399
|
+
#### [Middleware](.context/utopia/middleware.md)
|
|
400
|
+
|
|
401
|
+
This guide gives an overview of the different middleware used by Utopia.
|
|
402
|
+
|
|
403
|
+
#### [Server Setup](.context/utopia/server-setup.md)
|
|
404
|
+
|
|
405
|
+
This guide explains how to deploy a `utopia` web application.
|
|
406
|
+
|
|
407
|
+
#### [Integrating with JavaScript](.context/utopia/integrating-with-javascript.md)
|
|
408
|
+
|
|
409
|
+
This guide explains how to integrate JavaScript into your Utopia application.
|
|
410
|
+
|
|
411
|
+
#### [What is XNode?](.context/utopia/what-is-xnode.md)
|
|
412
|
+
|
|
413
|
+
This guide explains the `xnode` view layer and how it can be used to build efficient websites.
|
|
414
|
+
|
|
415
|
+
#### [Updating Utopia](.context/utopia/updating-utopia.md)
|
|
416
|
+
|
|
417
|
+
This guide explains how to update existing `utopia` websites.
|
|
418
|
+
|
|
419
|
+
### utopia-project
|
|
420
|
+
|
|
421
|
+
A project documentation tool based on Utopia.
|
|
422
|
+
|
|
423
|
+
#### [Getting Started](.context/utopia-project/getting-started.md)
|
|
424
|
+
|
|
425
|
+
This guide explains how to use `utopia-project` to add documentation to your project.
|
|
426
|
+
|
|
427
|
+
#### [Documentation Guides](.context/utopia-project/documentation-guidelines.md)
|
|
428
|
+
|
|
429
|
+
This guide explains how to create and maintain documentation for your project using `utopia-project`.
|
|
430
|
+
|
|
431
|
+
#### [Mermaid Diagrams](.context/utopia-project/mermaid-diagrams.md)
|
|
432
|
+
|
|
433
|
+
This guide explains how to use Mermaid diagrams in your documentation to visualize complex relationships, flows, and architectures.
|
|
434
|
+
|
|
435
|
+
#### [GitHub Pages Integration](.context/utopia-project/github-pages-integration.md)
|
|
436
|
+
|
|
437
|
+
This guide shows you how to use `utopia-project` with GitHub Pages to deploy documentation.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2026, by Samuel Williams.
|
|
5
|
+
|
|
6
|
+
require_relative "../../../lib/bake/gem/github/publisher"
|
|
7
|
+
|
|
8
|
+
# Prepare a patch release and open its PR.
|
|
9
|
+
def patch
|
|
10
|
+
Bake::Gem::GitHub::Project.new(context.root).prepare(context, "patch")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Prepare a minor release and open its PR.
|
|
14
|
+
def minor
|
|
15
|
+
Bake::Gem::GitHub::Project.new(context.root).prepare(context, "minor")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Prepare a major release and open its PR.
|
|
19
|
+
def major
|
|
20
|
+
Bake::Gem::GitHub::Project.new(context.root).prepare(context, "major")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Resolve and validate a merged PR, emitting a commit output for the publishing job.
|
|
24
|
+
def resolve(number: ENV.fetch("RELEASE_PR"))
|
|
25
|
+
result = Bake::Gem::GitHub::Project.new(context.root).inspect_release(number)
|
|
26
|
+
if path = ENV["GITHUB_OUTPUT"]
|
|
27
|
+
File.open(path, "a") do |file|
|
|
28
|
+
file.puts "release=#{!result.nil?}"
|
|
29
|
+
file.puts "commit=#{result.fetch(:commit)}" if result
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
result
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Build or restore the exact artifact for a merged release PR.
|
|
36
|
+
def build(number: ENV.fetch("RELEASE_PR"))
|
|
37
|
+
Bake::Gem::GitHub::Publisher.new(context.root).build(number)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Verify, upload and finalize a merged release using its retained artifact.
|
|
41
|
+
def publish(number: ENV.fetch("RELEASE_PR"))
|
|
42
|
+
Bake::Gem::GitHub::Publisher.new(context.root).publish(number)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Rerun the original publishing workflow, preserving event identity and artifact bytes.
|
|
46
|
+
def resume(run:)
|
|
47
|
+
project = Bake::Gem::GitHub::Project.new(context.root)
|
|
48
|
+
details = project.api("actions/runs/#{Integer(run)}")
|
|
49
|
+
raise "Expected a release-publish workflow run." unless details.fetch("path") == ".github/workflows/release-publish.yaml"
|
|
50
|
+
project.system("gh", "run", "rerun", run.to_s, "--repo", project.config.fetch("repository"), chdir: context.root)
|
|
51
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2026, by Samuel Williams.
|
|
5
|
+
|
|
6
|
+
# Inspect external settings before applying the generated policy.
|
|
7
|
+
def plan
|
|
8
|
+
context.lookup("gem:github:doctor").call
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Apply the four managed rulesets using the current gh administrator credentials.
|
|
12
|
+
def apply
|
|
13
|
+
require_relative "../../../lib/bake/gem/github/project"
|
|
14
|
+
Bake::Gem::GitHub::Project.new(context.root).apply
|
|
15
|
+
end
|
data/bake/gem/github.rb
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2026, by Samuel Williams.
|
|
5
|
+
|
|
6
|
+
# Generate local release workflows, policy, and documentation for review.
|
|
7
|
+
# @parameter checks [Array(String)] Required CI check names, including matrix entries.
|
|
8
|
+
# @parameter repository [String] Canonical owner/repository.
|
|
9
|
+
# @parameter branch [String] Default branch name.
|
|
10
|
+
# @parameter approvals [Integer] Number of approving reviews.
|
|
11
|
+
# @parameter signing [Boolean] Require legacy certificate signing.
|
|
12
|
+
# @parameter ruby [String] Ruby version for release workflows.
|
|
13
|
+
def setup(checks:, repository: nil, branch: nil, approvals: 2, signing: nil, ruby: "3.4")
|
|
14
|
+
require_relative "../../lib/bake/gem/github/setup"
|
|
15
|
+
require "bake/gem/shell"
|
|
16
|
+
helper = Object.new.extend(Bake::Gem::Shell)
|
|
17
|
+
remote = if repository && branch
|
|
18
|
+
{}
|
|
19
|
+
else
|
|
20
|
+
JSON.parse(helper.readlines("gh", "repo", "view", "--json", "nameWithOwner,defaultBranchRef", chdir: context.root).join)
|
|
21
|
+
end
|
|
22
|
+
options = {repository: repository || remote.fetch("nameWithOwner"), branch: branch || remote.fetch("defaultBranchRef").fetch("name"), checks: checks, approvals: approvals, ruby: ruby}
|
|
23
|
+
options[:signing] = signing unless signing.nil?
|
|
24
|
+
Bake::Gem::GitHub::Setup.new(context.root).generate(**options)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Show the desired rules, existing rules, environments, and RubyGems bootstrap values.
|
|
28
|
+
def doctor
|
|
29
|
+
require_relative "../../lib/bake/gem/github/project"
|
|
30
|
+
Bake::Gem::GitHub::Project.new(context.root).doctor
|
|
31
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# GitHub Releases
|
|
2
|
+
|
|
3
|
+
This guide sets up reviewed Ruby gem releases with `bake-gem-github`, native GitHub rules, RubyGems Trusted Publishing, and retained release artifacts.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add `bake-gem-github` and `agent-context` to your maintenance bundle. This companion requires `bake-gem` 0.15 or later for branch preparation and regeneration validation. Install the maintenance group in CI with `BUNDLE_WITH=maintenance`.
|
|
8
|
+
|
|
9
|
+
Use one gemspec, a stable three-part version in `lib/.../version.rb`, and repeatable `after_gem_release_version_increment` hooks. Hooks run from a clean base during validation. Commit dependency locks when practical; changing generation tools or using live network/time inputs can make old release content fail validation.
|
|
10
|
+
|
|
11
|
+
## Setup and migration
|
|
12
|
+
|
|
13
|
+
Run setup in each repository. It discovers the canonical repository and default branch through `gh` and generates reviewable local files. Supply the actual required CI job names, including supported matrix entries:
|
|
14
|
+
|
|
15
|
+
``` bash
|
|
16
|
+
bundle exec bake gem:github:setup checks="Test Ruby 3.3,Test Ruby 3.4,RuboCop"
|
|
17
|
+
bundle exec bake agent:context:install
|
|
18
|
+
bundle exec bake gem:github:setup:plan
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Setup adds three pinned workflows, `config/release.yaml`, native ruleset payloads, and `.github/releasing.md`. Identical reruns do nothing; conflicting existing files stop before any file is written. For later policy changes, edit the configuration and review the generated workflow/policy changes explicitly. Setup does not replace other publishers: remove conflicting release workflows during migration.
|
|
22
|
+
|
|
23
|
+
The default is two approvals with explicit administrator bypass, dismissed stale reviews, approval of the last push, strict up-to-date CI, and immutable default-branch history/release tags. These branch rules affect **all PRs** into the default branch. Ordinary administrator reviews count as one review. A human who dispatches a bot-authored PR is not its author under GitHub's native rules.
|
|
24
|
+
|
|
25
|
+
Review `gem:github:setup:plan`, merge the setup PR, and confirm that **Release validation** and every selected check run. Then apply the four managed rulesets using an administrator's `gh` login:
|
|
26
|
+
|
|
27
|
+
``` bash
|
|
28
|
+
bundle exec bake gem:github:setup:apply
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This command changes remote rulesets and preserves unrelated rulesets. Existing rulesets with the four managed names are updated. Organization rules and other existing protections still apply. Check names in configuration must exactly match GitHub checks; a partial selection does not mean all CI is required. Keep rebase merging and merge queues disabled for the initial rollout.
|
|
32
|
+
|
|
33
|
+
Create a `rubygems` GitHub environment restricted to the default branch. Do not add a second routine reviewer gate. On RubyGems, an owner must configure a Trusted Publisher with the owner/repository, workflow filename **`release-publish.yaml`**, and environment **`rubygems`** shown by `doctor`. Ownership/MFA and environment/signing bootstrap are deliberate manual steps in this first implementation; `doctor` prints desired and observed GitHub settings, not a claim that RubyGems ownership or publisher trust has been verified. See [RubyGems Trusted Publishing](https://guides.rubygems.org/trusted-publishing/).
|
|
34
|
+
|
|
35
|
+
If `release.cert` exists, setup enables legacy signing. Keep this public certificate in Git and install its matching **private key** as the Actions secret `GEM_SIGNING_KEY`. Use the `rubygems` environment or an organization secret available to the release repositories. The workflow checks the certificate validity, key match, and resulting package signatures. To opt out explicitly, pass `signing=false` during setup. No long-lived RubyGems publishing key is required.
|
|
36
|
+
|
|
37
|
+
Before enabling releases, confirm two people can administer the repository and recover the RubyGems account/signing key, and enough maintainers can satisfy the review policy. Pilot on one low-risk gem and prove publishing, administrator bypass, fork merges, and recovery before rolling out broadly. No organization-wide migration or live publisher setup is performed by these tasks.
|
|
38
|
+
|
|
39
|
+
## Request and review
|
|
40
|
+
|
|
41
|
+
``` bash
|
|
42
|
+
# Local branch and commit only:
|
|
43
|
+
bundle exec bake gem:release:branch:patch
|
|
44
|
+
|
|
45
|
+
# From the current default branch: prepare, validate, push and open PR:
|
|
46
|
+
bundle exec bake gem:github:release:patch
|
|
47
|
+
|
|
48
|
+
# Remote request (also available in the Actions UI):
|
|
49
|
+
gh workflow run release-prepare.yaml -f bump=patch
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Replace `patch` with `minor` or `major`. The wrapper fetches the default branch and tags, refuses a stale local checkout, and reports an existing release PR instead of opening another. GitHub's built-in token may require a writer to approve running workflows for its created PR; enable Actions' permission to create PRs. An organization-owned App token can be adopted later if automatic CI triggering is needed.
|
|
53
|
+
|
|
54
|
+
All release changes belong in the PR. Core preparation commits additions and deletions from release hooks but never pushes, tags or publishes. Validation independently generates the expected tree from the current base. A changed base SHA alone is fine; changed generated notes are not. Ordinary PRs with no version change pass release validation and still build unsigned.
|
|
55
|
+
|
|
56
|
+
If regeneration fails, prepare a new branch from the current default branch and review the new diff. Preserve manual release-branch edits separately. Automatic refresh/force-push is not implemented. A failure during preparation leaves the branch and generated changes available for inspection.
|
|
57
|
+
|
|
58
|
+
## Publish and verify
|
|
59
|
+
|
|
60
|
+
After merge/squash, the publishing workflow verifies GitHub's merged PR record and ancestry, then checks out the exact merged commit. Later development on the default branch is allowed. It regenerates against the merged commit's **first parent**, builds in a clean worktree, optionally certificate-signs, and creates two attestations over the final bytes:
|
|
61
|
+
|
|
62
|
+
- A Sigstore bundle submitted explicitly with `gem push --attestation` using RubyGems 4.0.21.
|
|
63
|
+
- GitHub's native SLSA provenance covering both the gem and `release.json`. This signed receipt binds the gem digest to the exact release commit, even when the workflow's own default-branch revision is newer.
|
|
64
|
+
|
|
65
|
+
The workflow retains the gem, receipt and attestations before obtaining RubyGems publishing credentials. It verifies both attestations, checks the uploaded bytes and registry bundle, then pushes the specific version tag and creates the GitHub release. Existing tags/assets are checked and never overwritten. The old `after_gem_release` GitHub hook is not called by this pipeline, so there is one owner for release creation.
|
|
66
|
+
|
|
67
|
+
``` bash
|
|
68
|
+
set -e
|
|
69
|
+
for file in example-1.2.3.gem release.json; do
|
|
70
|
+
gh attestation verify "$file" \
|
|
71
|
+
--repo OWNER/REPOSITORY --bundle provenance.sigstore.json \
|
|
72
|
+
--cert-identity https://github.com/OWNER/REPOSITORY/.github/workflows/release-publish.yaml@refs/heads/main \
|
|
73
|
+
--source-ref refs/heads/main --deny-self-hosted-runners
|
|
74
|
+
done
|
|
75
|
+
|
|
76
|
+
jq -e --arg commit MERGED_SHA \
|
|
77
|
+
--arg digest "$(shasum -a 256 example-1.2.3.gem | cut -d ' ' -f1)" \
|
|
78
|
+
'.commit == $commit and .sha256 == $digest' release.json
|
|
79
|
+
|
|
80
|
+
gem exec sigstore-cli:0.2.3 verify example-1.2.3.gem \
|
|
81
|
+
--bundle example-1.2.3.gem.sigstore.json \
|
|
82
|
+
--certificate-identity https://github.com/OWNER/REPOSITORY/.github/workflows/release-publish.yaml@refs/heads/main \
|
|
83
|
+
--certificate-oidc-issuer https://token.actions.githubusercontent.com
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Download `release.json` and `provenance.sigstore.json` alongside the gem. Verify both subjects before reading the receipt's source commit and digest. GitHub CLI's `--source-digest` checks the workflow revision, which may differ from the release commit recorded in the signed receipt. Replace `main` with the configured default branch in these commands.
|
|
87
|
+
|
|
88
|
+
Native GitHub records the merge and any bypass; the signed artifact receipt includes the PR and merging actor. This version does not export organization audit-log evidence or infer bypass reasons from review counts.
|
|
89
|
+
|
|
90
|
+
## Recovery
|
|
91
|
+
|
|
92
|
+
Use **Re-run all jobs** on the original publishing run, or:
|
|
93
|
+
|
|
94
|
+
``` bash
|
|
95
|
+
bundle exec bake gem:github:release:resume run=RUN_ID
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Rerunning keeps the original event identity. A retained artifact is downloaded and its source identity/digest checked. A matching registry version resumes tag/release finalization; different bytes or a conflicting tag stop. There is no automatic yank, retag, or rebuild of an already-published version. If failure occurs before artifact retention, rebuilding is safe because uploading has not started.
|
|
99
|
+
|
|
100
|
+
Artifacts are retained for 90 days and copied to GitHub release assets on success. If the workflow artifact expires before finalization, manual recovery from the preserved bytes is required; do not dispatch a replacement build. GitHub concurrency does not guarantee a durable FIFO queue: rerun any publishing run displaced while pending. Resume reruns all jobs, including integrity checks; it does not repeat or second-guess the native review policy or a permitted administrator bypass.
|
|
101
|
+
|
|
102
|
+
## Development and current limits
|
|
103
|
+
|
|
104
|
+
The implementation has local repository and transport-fake tests. A real GitHub/RubyGems pilot remains necessary before enabling it across Socketry. Public single-gem repositories, ordinary stable versions, merge/squash, GitHub-hosted Linux runners, and RubyGems.org are the supported starting point. Native build matrices, reusable publisher workflows, merge queues, automated RubyGems ownership/MFA setup, cross-run artifact recovery, and organization-wide rollout are deferred.
|
|
105
|
+
|
|
106
|
+
Edit this guide and regenerate `context/` with `bake utopia:project:agent:context:update`. Consumers install the generated guidance using `agent-context`.
|
data/context/index.yaml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
description: Reviewable GitHub releases for Ruby gems.
|
|
5
|
+
metadata: {}
|
|
6
|
+
files:
|
|
7
|
+
- path: getting-started.md
|
|
8
|
+
title: GitHub Releases
|
|
9
|
+
description: This guide sets up reviewed Ruby gem releases with `bake-gem-github`,
|
|
10
|
+
native GitHub rules, RubyGems Trusted Publishing, and retained release artifacts.
|