Skip to content

Commit 01dd25e

Browse files
committed
Modernize code and drop Ruby v3.2 support.
1 parent 1878775 commit 01dd25e

33 files changed

Lines changed: 172 additions & 724 deletions

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Use Agent Context
44

5-
When working on this project, consult the `agent.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.
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.
66

77
If the file does not exist, you will need to install it, by running the following command:
88

.github/workflows/documentation-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717
- uses: ruby/setup-ruby@v1
1818
with:
1919
ruby-version: ruby

.github/workflows/documentation.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v6
2828

2929
- uses: ruby/setup-ruby@v1
3030
with:
@@ -39,7 +39,7 @@ jobs:
3939
run: bundle exec bake utopia:project:static --force no
4040

4141
- name: Upload documentation artifact
42-
uses: actions/upload-pages-artifact@v3
42+
uses: actions/upload-pages-artifact@v4
4343
with:
4444
path: docs
4545

.github/workflows/rubocop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
- uses: ruby/setup-ruby@v1
1515
with:
1616
ruby-version: ruby

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ jobs:
2020
- macos
2121

2222
ruby:
23-
- "3.2"
2423
- "3.3"
2524
- "3.4"
25+
- "4.0"
2626

2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v6
2929
- uses: ruby/setup-ruby@v1
3030
with:
3131
ruby-version: ${{matrix.ruby}}
3232
bundler-cache: true
3333

3434
- name: Run tests
3535
timeout-minutes: 5
36-
run: bundle exec bake build test
36+
run: bundle exec bake test
3737

38-
- uses: actions/upload-artifact@v4
38+
- uses: actions/upload-artifact@v5
3939
with:
4040
include-hidden-files: true
4141
if-no-files-found: error
@@ -47,13 +47,13 @@ jobs:
4747
runs-on: ubuntu-latest
4848

4949
steps:
50-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@v6
5151
- uses: ruby/setup-ruby@v1
5252
with:
5353
ruby-version: ruby
5454
bundler-cache: true
5555

56-
- uses: actions/download-artifact@v4
56+
- uses: actions/download-artifact@v6
5757

5858
- name: Validate coverage
5959
timeout-minutes: 5

.github/workflows/test-external.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ jobs:
2020
- macos
2121

2222
ruby:
23-
- "3.2"
2423
- "3.3"
2524
- "3.4"
26-
- "head"
25+
- "4.0"
2726

2827
steps:
29-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v6
3029
- uses: ruby/setup-ruby@v1
3130
with:
3231
ruby-version: ${{matrix.ruby}}
@@ -41,7 +40,7 @@ jobs:
4140
run: bundle exec bake test:external
4241

4342
- name: Run tests (worker pool)
44-
if: ${{matrix.os == 'ubuntu' && matrix.ruby == 'head'}}
43+
if: ${{matrix.os == 'ubuntu' && matrix.ruby == '4.0'}}
4544
env:
4645
ASYNC_SCHEDULER_WORKER_POOL: true
4746
timeout-minutes: 10

.github/workflows/test.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,16 @@ jobs:
1919
- windows
2020

2121
ruby:
22-
- "3.2"
23-
- "3.2.6"
2422
- "3.3"
2523
- "3.4"
26-
- "head"
24+
- "4.0"
2725

2826
experimental: [false]
2927

3028
include:
3129
- os: ubuntu
3230
ruby: truffleruby
3331
experimental: true
34-
- os: ubuntu
35-
ruby: truffleruby-head
36-
experimental: true
3732
- os: ubuntu
3833
ruby: jruby
3934
experimental: true
@@ -42,7 +37,7 @@ jobs:
4237
experimental: true
4338

4439
steps:
45-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v6
4641
- uses: ruby/setup-ruby@v1
4742
with:
4843
ruby-version: ${{matrix.ruby}}
@@ -54,4 +49,4 @@ jobs:
5449

5550
- name: Run tests
5651
timeout-minutes: 10
57-
run: bundle exec bake build test
52+
run: bundle exec bake test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/agent.md
1+
/agents.md
22
/.context
33
/.bundle
44
/pkg

.rubocop.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +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

13+
Layout/BlockDelimiterSpacing:
14+
Enabled: true
15+
16+
Style/GlobalExceptionVariables:
17+
Enabled: true
18+
19+
# General Layout rules:
20+
1021
Layout/IndentationStyle:
1122
Enabled: true
1223
EnforcedStyle: tabs
@@ -33,6 +44,9 @@ Layout/BeginEndAlignment:
3344
Enabled: true
3445
EnforcedStyleAlignWith: start_of_line
3546

47+
Layout/RescueEnsureAlignment:
48+
Enabled: true
49+
3650
Layout/ElseAlignment:
3751
Enabled: true
3852

@@ -41,10 +55,15 @@ Layout/DefEndAlignment:
4155

4256
Layout/CaseIndentation:
4357
Enabled: true
58+
EnforcedStyle: end
4459

4560
Layout/CommentIndentation:
4661
Enabled: true
4762

63+
Layout/FirstHashElementIndentation:
64+
Enabled: true
65+
EnforcedStyle: consistent
66+
4867
Layout/EmptyLinesAroundClassBody:
4968
Enabled: true
5069

@@ -63,6 +82,25 @@ Layout/SpaceAroundBlockParameters:
6382
Enabled: true
6483
EnforcedStyleInsidePipes: no_space
6584

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+
66104
Style/FrozenStringLiteralComment:
67105
Enabled: true
68106

bake.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Released under the MIT License.
4-
# Copyright, 2021-2024, by Samuel Williams.
4+
# Copyright, 2021-2025, by Samuel Williams.
55
# Copyright, 2024, by Pavel Rosický.
66

77
def build
@@ -21,6 +21,10 @@ def clean
2121
end
2222
end
2323

24+
def before_test
25+
self.build
26+
end
27+
2428
# Update the project documentation with the new version number.
2529
#
2630
# @parameter version [String] The new version number.

0 commit comments

Comments
 (0)