Skip to content

Commit cb022f5

Browse files
committed
Modernize code + fixes.
1 parent e03dc1c commit cb022f5

File tree

20 files changed

+205
-108
lines changed

20 files changed

+205
-108
lines changed
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

.github/workflows/documentation.yaml

Lines changed: 3 additions & 4 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.3"
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@v2
42+
uses: actions/upload-pages-artifact@v3
4443
with:
4544
path: docs
4645

@@ -55,4 +54,4 @@ jobs:
5554
steps:
5655
- name: Deploy to GitHub Pages
5756
id: deployment
58-
uses: actions/deploy-pages@v3
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

.github/workflows/coverage.yaml renamed to .github/workflows/test-coverage.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: Coverage
1+
name: Test Coverage
22

33
on: [push, pull_request]
44

55
permissions:
66
contents: read
77

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

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

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

2625
steps:
2726
- uses: actions/checkout@v4
@@ -33,9 +32,11 @@ jobs:
3332
- name: Run tests
3433
timeout-minutes: 5
3534
run: bundle exec bake test
36-
37-
- uses: actions/upload-artifact@v3
35+
36+
- uses: actions/upload-artifact@v4
3837
with:
38+
include-hidden-files: true
39+
if-no-files-found: error
3940
name: coverage-${{matrix.os}}-${{matrix.ruby}}
4041
path: .covered.db
4142

@@ -47,10 +48,10 @@ jobs:
4748
- uses: actions/checkout@v4
4849
- uses: ruby/setup-ruby@v1
4950
with:
50-
ruby-version: "3.3"
51+
ruby-version: ruby
5152
bundler-cache: true
5253

53-
- uses: actions/download-artifact@v3
54+
- uses: actions/download-artifact@v4
5455

5556
- name: Validate coverage
5657
timeout-minutes: 5

.github/workflows/test-external.yaml

Lines changed: 1 addition & 5 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,10 +17,9 @@ jobs:
2017
- macos
2118

2219
ruby:
23-
- "3.0"
24-
- "3.1"
2520
- "3.2"
2621
- "3.3"
22+
- "3.4"
2723

2824
steps:
2925
- uses: actions/checkout@v4

.github/workflows/test.yaml

Lines changed: 1 addition & 6 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}}
@@ -21,11 +18,9 @@ jobs:
2118
- macos
2219

2320
ruby:
24-
- "2.7"
25-
- "3.0"
26-
- "3.1"
2721
- "3.2"
2822
- "3.3"
23+
- "3.4"
2924

3025
experimental: [false]
3126

.gitignore

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

.rubocop.yml

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

bake.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2025, by Samuel Williams.
5+
6+
# Update the project documentation with the new version number.
7+
#
8+
# @parameter version [String] The new version number.
9+
def after_gem_release_version_increment(version)
10+
context["releases:update"].call(version)
11+
context["utopia:project:readme:update"].call
12+
end

config/sus.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# Copyright, 2021-2024, by Samuel Williams.
55
# Copyright, 2022, by Catalino Cuadrado.
66

7-
require 'ddtrace'
7+
require "datadog"
88

99
Datadog.configure do |config|
1010
config.tracing.enabled = true
1111

1212
# To enable debug mode
1313
config.diagnostics.debug = false
1414

15-
# Set transport to no-op mode. Does not retain traces.
16-
config.tracing.transport_options = proc { |t| t.adapter :test }
15+
# # Set transport to no-op mode. Does not retain traces.
16+
# config.tracing.transport_options = proc {|t| t.adapter :test}
1717
# Silence low-severity Datadog log messages
1818
config.logger.level = Logger::ERROR
1919
end

0 commit comments

Comments
 (0)