Skip to content

Commit 757d109

Browse files
committed
Modernize code.
1 parent 14cf37d commit 757d109

23 files changed

Lines changed: 93 additions & 25 deletions

.github/workflows/documentation-coverage.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ permissions:
77

88
env:
99
COVERAGE: PartialSummary
10+
BUNDLE_WITH: maintenance
1011

1112
jobs:
1213
validate:
1314
runs-on: ubuntu-latest
1415

1516
steps:
16-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1718
- uses: ruby/setup-ruby@v1
1819
with:
1920
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- ruby
2424

2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2727
- uses: ruby/setup-ruby@v1
2828
with:
2929
ruby-version: ${{matrix.ruby}}
@@ -33,7 +33,7 @@ jobs:
3333
timeout-minutes: 5
3434
run: bundle exec bake test
3535

36-
- uses: actions/upload-artifact@v4
36+
- uses: actions/upload-artifact@v5
3737
with:
3838
include-hidden-files: true
3939
if-no-files-found: error
@@ -45,13 +45,13 @@ jobs:
4545
runs-on: ubuntu-latest
4646

4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v6
4949
- uses: ruby/setup-ruby@v1
5050
with:
5151
ruby-version: ruby
5252
bundler-cache: true
5353

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

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

.github/workflows/test-external.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- macos
1818

1919
ruby:
20-
- "3.2"
2120
- "3.3"
2221
- "3.4"
22+
- "4.0"
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v6
2626
- uses: ruby/setup-ruby@v1
2727
with:
2828
ruby-version: ${{matrix.ruby}}

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
- macos
1919

2020
ruby:
21-
- "3.2"
2221
- "3.3"
2322
- "3.4"
23+
- "4.0"
2424

2525
experimental: [false]
2626

@@ -36,7 +36,7 @@ jobs:
3636
experimental: true
3737

3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v6
4040
- uses: ruby/setup-ruby@v1
4141
with:
4242
ruby-version: ${{matrix.ruby}}

.rubocop.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@ plugins:
55
AllCops:
66
DisabledByDefault: true
77

8+
# Socketry specific rules:
9+
810
Layout/ConsistentBlankLineIndentation:
911
Enabled: true
1012

13+
Layout/BlockDelimiterSpacing:
14+
Enabled: true
15+
16+
Style/GlobalExceptionVariables:
17+
Enabled: true
18+
19+
# General Layout rules:
20+
1121
Layout/IndentationStyle:
1222
Enabled: true
1323
EnforcedStyle: tabs
@@ -34,6 +44,9 @@ Layout/BeginEndAlignment:
3444
Enabled: true
3545
EnforcedStyleAlignWith: start_of_line
3646

47+
Layout/RescueEnsureAlignment:
48+
Enabled: true
49+
3750
Layout/ElseAlignment:
3851
Enabled: true
3952

@@ -42,10 +55,15 @@ Layout/DefEndAlignment:
4255

4356
Layout/CaseIndentation:
4457
Enabled: true
58+
EnforcedStyle: end
4559

4660
Layout/CommentIndentation:
4761
Enabled: true
4862

63+
Layout/FirstHashElementIndentation:
64+
Enabled: true
65+
EnforcedStyle: consistent
66+
4967
Layout/EmptyLinesAroundClassBody:
5068
Enabled: true
5169

@@ -64,6 +82,25 @@ Layout/SpaceAroundBlockParameters:
6482
Enabled: true
6583
EnforcedStyleInsidePipes: no_space
6684

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+
67104
Style/FrozenStringLiteralComment:
68105
Enabled: true
69106

bake.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# frozen_string_literal: true
22

33
# Released under the MIT License.
4-
# Copyright, 2020-2025, by Samuel Williams.
4+
# Copyright, 2020-2026, by Samuel Williams.
55

66
# Update the project documentation with the new version number.
77
#
88
# @parameter version [String] The new version number.
99
def after_gem_release_version_increment(version)
1010
context["releases:update"].call(version)
11-
context["utopia:project:readme:update"].call
11+
context["utopia:project:update"].call
12+
end
13+
14+
# Create a GitHub release for the given tag.
15+
#
16+
# @parameter tag [String] The tag to create a release for.
17+
def after_gem_release(tag:, **options)
18+
context["releases:github:release"].call(tag)
1219
end

console.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
77
spec.version = Console::VERSION
88

99
spec.summary = "Beautiful logging for Ruby."
10-
spec.authors = ["Samuel Williams", "Robert Schulze", "Bryan Powell", "Michael Adams", "Patrik Wenger", "Anton Sozontov", "Cyril Roelandt", "Cédric Boutillier", "Felix Yan", "Olle Jonsson", "Shigeru Nakajima", "William T. Nelson", "Yasha Krasnou"]
10+
spec.authors = ["Samuel Williams", "Robert Schulze", "Bryan Powell", "Michael Adams", "Patrik Wenger", "William T. Nelson", "Anton Sozontov", "Copilot", "Cyril Roelandt", "Cédric Boutillier", "Felix Yan", "Olle Jonsson", "Shigeru Nakajima", "Yasha Krasnou"]
1111
spec.license = "MIT"
1212

1313
spec.cert_chain = ["release.cert"]
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
2121

2222
spec.files = Dir.glob(["{bake,lib}/**/*", "*.md"], File::FNM_DOTMATCH, base: __dir__)
2323

24-
spec.required_ruby_version = ">= 3.2"
24+
spec.required_ruby_version = ">= 3.3"
2525

2626
spec.add_dependency "fiber-annotation"
2727
spec.add_dependency "fiber-local", "~> 1.1"

gems.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414

1515
gem "agent-context"
1616

17+
gem "decode"
18+
1719
gem "utopia-project"
1820
end
1921

2022
group :test do
2123
gem "sus"
2224
gem "covered"
23-
gem "decode"
2425

2526
gem "rubocop"
2627
gem "rubocop-socketry"

0 commit comments

Comments
 (0)