Skip to content

Commit db073d0

Browse files
committed
Modernize code.
1 parent aedb25c commit db073d0

25 files changed

Lines changed: 145 additions & 87 deletions

.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: 1 addition & 2 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:
@@ -17,7 +16,7 @@ jobs:
1716
- 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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ concurrency:
1717
cancel-in-progress: true
1818

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

2322
jobs:
@@ -29,7 +28,7 @@ jobs:
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

.github/workflows/rubocop.yaml

Lines changed: 0 additions & 3 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
check:
1310
runs-on: ubuntu-latest

.github/workflows/test-coverage.yaml

Lines changed: 5 additions & 5 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,8 +20,7 @@ jobs:
2120
- macos
2221

2322
ruby:
24-
- "3.3"
25-
- "3.4"
23+
- ruby
2624

2725
steps:
2826
- uses: actions/checkout@v6
@@ -37,6 +35,8 @@ jobs:
3735

3836
- uses: actions/upload-artifact@v5
3937
with:
38+
include-hidden-files: true
39+
if-no-files-found: error
4040
name: coverage-${{matrix.os}}-${{matrix.ruby}}
4141
path: .covered.db
4242

@@ -48,10 +48,10 @@ jobs:
4848
- uses: actions/checkout@v6
4949
- uses: ruby/setup-ruby@v1
5050
with:
51-
ruby-version: "3.4"
51+
ruby-version: ruby
5252
bundler-cache: true
5353

54-
- uses: actions/download-artifact@v5
54+
- uses: actions/download-artifact@v6
5555

5656
- name: Validate coverage
5757
timeout-minutes: 5

.github/workflows/test-external.yaml

Lines changed: 2 additions & 3 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}}
@@ -20,6 +17,8 @@ jobs:
2017
- macos
2118

2219
ruby:
20+
- "3.2"
21+
- "3.3"
2322
- "3.4"
2423

2524
steps:

.github/workflows/test.yaml

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

8-
env:
9-
CONSOLE_OUTPUT: XTerm
10-
118
jobs:
129
test:
13-
name: ${{matrix.ruby}} on ${{matrix.os}} with ${{matrix.gemfile}}
10+
name: ${{matrix.ruby}} on ${{matrix.os}}
1411
runs-on: ${{matrix.os}}-latest
1512
continue-on-error: ${{matrix.experimental}}
1613

@@ -21,13 +18,10 @@ jobs:
2118
- macos
2219

2320
ruby:
21+
- "3.2"
2422
- "3.3"
2523
- "3.4"
2624

27-
gemfile:
28-
- gems/rails-v7.rb
29-
- gems/rails-v8.rb
30-
3125
experimental: [false]
3226

3327
include:
@@ -41,9 +35,6 @@ jobs:
4135
ruby: head
4236
experimental: true
4337

44-
env:
45-
BUNDLE_GEMFILE: ${{matrix.gemfile}}
46-
4738
steps:
4839
- uses: actions/checkout@v6
4940
- uses: ruby/setup-ruby@v1

.gitignore

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

.rubocop.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
plugins:
2+
- rubocop-md
3+
- rubocop-socketry
4+
15
AllCops:
26
DisabledByDefault: true
37

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+
421
Layout/IndentationStyle:
522
Enabled: true
623
EnforcedStyle: tabs
@@ -16,6 +33,9 @@ Layout/IndentationConsistency:
1633
Enabled: true
1734
EnforcedStyle: normal
1835

36+
Layout/BlockAlignment:
37+
Enabled: true
38+
1939
Layout/EndAlignment:
2040
Enabled: true
2141
EnforcedStyleAlignWith: start_of_line
@@ -24,6 +44,9 @@ Layout/BeginEndAlignment:
2444
Enabled: true
2545
EnforcedStyleAlignWith: start_of_line
2646

47+
Layout/RescueEnsureAlignment:
48+
Enabled: true
49+
2750
Layout/ElseAlignment:
2851
Enabled: true
2952

@@ -32,15 +55,36 @@ Layout/DefEndAlignment:
3255

3356
Layout/CaseIndentation:
3457
Enabled: true
58+
EnforcedStyle: end
3559

3660
Layout/CommentIndentation:
3761
Enabled: true
3862

63+
Layout/FirstHashElementIndentation:
64+
Enabled: true
65+
EnforcedStyle: consistent
66+
3967
Layout/EmptyLinesAroundClassBody:
4068
Enabled: true
4169

4270
Layout/EmptyLinesAroundModuleBody:
4371
Enabled: true
4472

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+
4585
Style/FrozenStringLiteralComment:
4686
Enabled: true
87+
88+
Style/StringLiterals:
89+
Enabled: true
90+
EnforcedStyle: double_quotes

config/sus.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Released under the MIT License.
44
# Copyright, 2023, by Samuel Williams.
55

6-
require 'covered/sus'
6+
require "covered/sus"
77
include Covered::Sus

0 commit comments

Comments
 (0)