Skip to content

Commit ff2a0d1

Browse files
Initial hack.
0 parents  commit ff2a0d1

26 files changed

+1325
-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 build 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 build 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 build test

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/.bundle
2+
/pkg
3+
/gems.locked
4+
/.covered.db
5+
/external
6+
7+
/ext/Makefile
8+
/ext/mkmf.log
9+
/ext/extconf.h
10+
/ext/**/*.o
11+
/ext/**/*.so
12+
/ext/**/*.bundle
13+
/ext/**/*.dSYM
14+
/ext/**/*.time

.rubocop.yml

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

0 commit comments

Comments
 (0)