Skip to content

Commit d1ad132

Browse files
committed
Modernize code.
1 parent 6d5aa3a commit d1ad132

File tree

10 files changed

+75
-27
lines changed

10 files changed

+75
-27
lines changed

.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.

.github/workflows/documentation-coverage.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ permissions:
66
contents: read
77

88
env:
9-
CONSOLE_OUTPUT: XTerm
109
COVERAGE: PartialSummary
1110

1211
jobs:
1312
validate:
1413
runs-on: ubuntu-latest
1514

1615
steps:
17-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1817
- uses: ruby/setup-ruby@v1
1918
with:
20-
ruby-version: "3.4"
19+
ruby-version: ruby
2120
bundler-cache: true
2221

2322
- name: Validate coverage

.github/workflows/documentation.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
env:
20-
CONSOLE_OUTPUT: XTerm
2120
BUNDLE_WITH: maintenance
2221

2322
jobs:
2423
generate:
2524
runs-on: ubuntu-latest
2625

2726
steps:
28-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v6
2928

3029
- uses: ruby/setup-ruby@v1
3130
with:
32-
ruby-version: "3.4"
31+
ruby-version: ruby
3332
bundler-cache: true
3433

3534
- name: Installing packages
@@ -40,7 +39,7 @@ jobs:
4039
run: bundle exec bake utopia:project:static --force no
4140

4241
- name: Upload documentation artifact
43-
uses: actions/upload-pages-artifact@v3
42+
uses: actions/upload-pages-artifact@v4
4443
with:
4544
path: docs
4645

.github/workflows/rubocop.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ on: [push, pull_request]
55
permissions:
66
contents: read
77

8-
env:
9-
CONSOLE_OUTPUT: XTerm
10-
118
jobs:
129
check:
1310
runs-on: ubuntu-latest
1411

1512
steps:
16-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1714
- uses: ruby/setup-ruby@v1
1815
with:
1916
ruby-version: ruby

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ permissions:
66
contents: read
77

88
env:
9-
CONSOLE_OUTPUT: XTerm
109
COVERAGE: PartialSummary
1110

1211
jobs:
@@ -21,10 +20,10 @@ jobs:
2120
- macos
2221

2322
ruby:
24-
- "3.4"
23+
- ruby
2524

2625
steps:
27-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2827
- uses: ruby/setup-ruby@v1
2928
with:
3029
ruby-version: ${{matrix.ruby}}
@@ -34,7 +33,7 @@ jobs:
3433
timeout-minutes: 5
3534
run: bundle exec bake test
3635

37-
- uses: actions/upload-artifact@v4
36+
- uses: actions/upload-artifact@v5
3837
with:
3938
include-hidden-files: true
4039
if-no-files-found: error
@@ -46,13 +45,13 @@ jobs:
4645
runs-on: ubuntu-latest
4746

4847
steps:
49-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v6
5049
- uses: ruby/setup-ruby@v1
5150
with:
52-
ruby-version: "3.4"
51+
ruby-version: ruby
5352
bundler-cache: true
5453

55-
- uses: actions/download-artifact@v4
54+
- uses: actions/download-artifact@v6
5655

5756
- name: Validate coverage
5857
timeout-minutes: 5

.github/workflows/test-external.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on: [push, pull_request]
55
permissions:
66
contents: read
77

8-
env:
9-
CONSOLE_OUTPUT: XTerm
10-
118
jobs:
129
test:
1310
name: ${{matrix.ruby}} on ${{matrix.os}}
@@ -23,9 +20,10 @@ jobs:
2320
- "3.2"
2421
- "3.3"
2522
- "3.4"
23+
- "4.0"
2624

2725
steps:
28-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2927
- uses: ruby/setup-ruby@v1
3028
with:
3129
ruby-version: ${{matrix.ruby}}

.github/workflows/test.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on: [push, pull_request]
55
permissions:
66
contents: read
77

8-
env:
9-
CONSOLE_OUTPUT: XTerm
10-
118
jobs:
129
test:
1310
name: ${{matrix.ruby}} on ${{matrix.os}}
@@ -24,6 +21,7 @@ jobs:
2421
- "3.2"
2522
- "3.3"
2623
- "3.4"
24+
- "4.0"
2725

2826
experimental: [false]
2927

@@ -39,7 +37,7 @@ jobs:
3937
experimental: true
4038

4139
steps:
42-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v6
4341
- uses: ruby/setup-ruby@v1
4442
with:
4543
ruby-version: ${{matrix.ruby}}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/.bundle
1+
/agents.md
22
/.context
3+
/.bundle
34
/pkg
45
/gems.locked
56
/.covered.db

.rubocop.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
plugins:
2+
- rubocop-md
23
- rubocop-socketry
34

45
AllCops:
56
DisabledByDefault: true
67

8+
# Socketry specific rules:
9+
710
Layout/ConsistentBlankLineIndentation:
811
Enabled: true
912

1013
Layout/BlockDelimiterSpacing:
1114
Enabled: true
1215

16+
Style/GlobalExceptionVariables:
17+
Enabled: true
18+
19+
# General Layout rules:
20+
1321
Layout/IndentationStyle:
1422
Enabled: true
1523
EnforcedStyle: tabs
@@ -36,6 +44,9 @@ Layout/BeginEndAlignment:
3644
Enabled: true
3745
EnforcedStyleAlignWith: start_of_line
3846

47+
Layout/RescueEnsureAlignment:
48+
Enabled: true
49+
3950
Layout/ElseAlignment:
4051
Enabled: true
4152

@@ -44,10 +55,15 @@ Layout/DefEndAlignment:
4455

4556
Layout/CaseIndentation:
4657
Enabled: true
58+
EnforcedStyle: end
4759

4860
Layout/CommentIndentation:
4961
Enabled: true
5062

63+
Layout/FirstHashElementIndentation:
64+
Enabled: true
65+
EnforcedStyle: consistent
66+
5167
Layout/EmptyLinesAroundClassBody:
5268
Enabled: true
5369

@@ -66,6 +82,25 @@ Layout/SpaceAroundBlockParameters:
6682
Enabled: true
6783
EnforcedStyleInsidePipes: no_space
6884

85+
Layout/FirstArrayElementIndentation:
86+
Enabled: true
87+
EnforcedStyle: consistent
88+
89+
Layout/ArrayAlignment:
90+
Enabled: true
91+
EnforcedStyle: with_fixed_indentation
92+
93+
Layout/FirstArgumentIndentation:
94+
Enabled: true
95+
EnforcedStyle: consistent
96+
97+
Layout/ArgumentAlignment:
98+
Enabled: true
99+
EnforcedStyle: with_fixed_indentation
100+
101+
Layout/ClosingParenthesisIndentation:
102+
Enabled: true
103+
69104
Style/FrozenStringLiteralComment:
70105
Enabled: true
71106

gems.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
gem "sus"
2222
gem "covered"
2323
gem "decode"
24+
2425
gem "rubocop"
26+
gem "rubocop-md"
2527

2628
gem "bake-test"
2729
gem "bake-test-external"

0 commit comments

Comments
 (0)