Skip to content

Commit c1bcb42

Browse files
Initial implementation.
0 parents  commit c1bcb42

28 files changed

+1413
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 2
6+
7+
[*.{yml,yaml}]
8+
indent_style = space
9+
indent_size = 2

.github/copilot-instructions.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# GitHub Copilot Instructions
2+
3+
## Use Agent Context
4+
5+
When working on this project, consult the `agents.md` file for project-specific guidelines, architecture decisions, and development patterns. This file contains curated information that will help you make better decisions aligned with the project's goals and standards.
6+
7+
If the file does not exist, you will need to install it, by running the following command:
8+
9+
```bash
10+
$ bundle install
11+
$ bundle exec bake agent:context:install
12+
```
13+
14+
This command will set up the necessary context files that help you understand the project structure, dependencies, and conventions.
15+
16+
## Ignoring Files
17+
18+
The `.gitignore` file is split into two sections, separated by a blank line. The first section is automatically generated, while the second section is user controlled.
19+
20+
While working on pull requests, you should not add unrelated changes to the `.gitignore` file as part of the pull request.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Documentation Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
COVERAGE: PartialSummary
10+
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: ruby
20+
bundler-cache: true
21+
22+
- name: Validate coverage
23+
timeout-minutes: 5
24+
run: bundle exec bake decode:index:coverage lib
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow one concurrent deployment:
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
env:
20+
BUNDLE_WITH: maintenance
21+
22+
jobs:
23+
generate:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ruby
32+
bundler-cache: true
33+
34+
- name: Installing packages
35+
run: sudo apt-get install wget
36+
37+
- name: Generate documentation
38+
timeout-minutes: 5
39+
run: bundle exec bake utopia:project:static --force no
40+
41+
- name: Upload documentation artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: docs
45+
46+
deploy:
47+
runs-on: ubuntu-latest
48+
49+
environment:
50+
name: github-pages
51+
url: ${{steps.deployment.outputs.page_url}}
52+
53+
needs: generate
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.github/workflows/rubocop.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: ruby
17+
bundler-cache: true
18+
19+
- name: Run RuboCop
20+
timeout-minutes: 10
21+
run: bundle exec rubocop
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Test Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
COVERAGE: PartialSummary
10+
11+
jobs:
12+
test:
13+
name: ${{matrix.ruby}} on ${{matrix.os}}
14+
runs-on: ${{matrix.os}}-latest
15+
16+
strategy:
17+
matrix:
18+
os:
19+
- ubuntu
20+
- macos
21+
22+
ruby:
23+
- ruby
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: ${{matrix.ruby}}
30+
bundler-cache: true
31+
32+
- name: Run tests
33+
timeout-minutes: 5
34+
run: bundle exec bake test
35+
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
include-hidden-files: true
39+
if-no-files-found: error
40+
name: coverage-${{matrix.os}}-${{matrix.ruby}}
41+
path: .covered.db
42+
43+
validate:
44+
needs: test
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: ruby/setup-ruby@v1
50+
with:
51+
ruby-version: ruby
52+
bundler-cache: true
53+
54+
- uses: actions/download-artifact@v4
55+
56+
- name: Validate coverage
57+
timeout-minutes: 5
58+
run: bundle exec bake covered:validate --paths */.covered.db \;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test External
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
name: ${{matrix.ruby}} on ${{matrix.os}}
11+
runs-on: ${{matrix.os}}-latest
12+
13+
strategy:
14+
matrix:
15+
os:
16+
- ubuntu
17+
- macos
18+
19+
ruby:
20+
- "3.2"
21+
- "3.3"
22+
- "3.4"
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: ${{matrix.ruby}}
29+
bundler-cache: true
30+
31+
- name: Run tests
32+
timeout-minutes: 10
33+
run: bundle exec bake test:external

.github/workflows/test.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
name: ${{matrix.ruby}} on ${{matrix.os}}
11+
runs-on: ${{matrix.os}}-latest
12+
continue-on-error: ${{matrix.experimental}}
13+
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu
18+
- macos
19+
20+
ruby:
21+
- "3.2"
22+
- "3.3"
23+
- "3.4"
24+
25+
experimental: [false]
26+
27+
include:
28+
- os: ubuntu
29+
ruby: truffleruby
30+
experimental: true
31+
- os: ubuntu
32+
ruby: jruby
33+
experimental: true
34+
- os: ubuntu
35+
ruby: head
36+
experimental: true
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: ${{matrix.ruby}}
43+
bundler-cache: true
44+
45+
- name: Run tests
46+
timeout-minutes: 10
47+
run: bundle exec bake test

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/agents.md
2+
/.context
3+
/.bundle
4+
/pkg
5+
/gems.locked
6+
/.covered.db
7+
/external

.rubocop.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
plugins:
2+
- rubocop-md
3+
- rubocop-socketry
4+
5+
AllCops:
6+
DisabledByDefault: true
7+
8+
Layout/ConsistentBlankLineIndentation:
9+
Enabled: true
10+
11+
Layout/IndentationStyle:
12+
Enabled: true
13+
EnforcedStyle: tabs
14+
15+
Layout/InitialIndentation:
16+
Enabled: true
17+
18+
Layout/IndentationWidth:
19+
Enabled: true
20+
Width: 1
21+
22+
Layout/IndentationConsistency:
23+
Enabled: true
24+
EnforcedStyle: normal
25+
26+
Layout/BlockAlignment:
27+
Enabled: true
28+
29+
Layout/EndAlignment:
30+
Enabled: true
31+
EnforcedStyleAlignWith: start_of_line
32+
33+
Layout/BeginEndAlignment:
34+
Enabled: true
35+
EnforcedStyleAlignWith: start_of_line
36+
37+
Layout/ElseAlignment:
38+
Enabled: true
39+
40+
Layout/DefEndAlignment:
41+
Enabled: true
42+
43+
Layout/CaseIndentation:
44+
Enabled: true
45+
46+
Layout/CommentIndentation:
47+
Enabled: true
48+
49+
Layout/EmptyLinesAroundClassBody:
50+
Enabled: true
51+
52+
Layout/EmptyLinesAroundModuleBody:
53+
Enabled: true
54+
55+
Layout/EmptyLineAfterMagicComment:
56+
Enabled: true
57+
58+
Layout/SpaceInsideBlockBraces:
59+
Enabled: true
60+
EnforcedStyle: no_space
61+
SpaceBeforeBlockParameters: false
62+
63+
Layout/SpaceAroundBlockParameters:
64+
Enabled: true
65+
EnforcedStyleInsidePipes: no_space
66+
67+
Style/FrozenStringLiteralComment:
68+
Enabled: true
69+
70+
Style/StringLiterals:
71+
Enabled: true
72+
EnforcedStyle: double_quotes

0 commit comments

Comments
 (0)