Skip to content

Commit b761d78

Browse files
committed
Modernize gem.
1 parent 670b5ba commit b761d78

14 files changed

+139
-28
lines changed

Diff for: .editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ root = true
33
[*]
44
indent_style = tab
55
indent_size = 2
6+
7+
[*.{yml,yaml}]
8+
indent_style = space
9+
indent_size = 2

Diff for: .github/workflows/documentation-coverage.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
10+
COVERAGE: PartialSummary
11+
12+
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: "3.3"
21+
bundler-cache: true
22+
23+
- name: Validate coverage
24+
timeout-minutes: 5
25+
run: bundle exec bake decode:index:coverage lib

Diff for: .github/workflows/documentation.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on:
55
branches:
66
- main
77

8-
# Allows you to run this workflow manually from the Actions tab:
9-
workflow_dispatch:
10-
118
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
129
permissions:
1310
contents: read
@@ -28,11 +25,11 @@ jobs:
2825
runs-on: ubuntu-latest
2926

3027
steps:
31-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
3229

3330
- uses: ruby/setup-ruby@v1
3431
with:
35-
ruby-version: "3.2"
32+
ruby-version: "3.3"
3633
bundler-cache: true
3734

3835
- name: Installing packages
@@ -43,7 +40,7 @@ jobs:
4340
run: bundle exec bake utopia:project:static --force no
4441

4542
- name: Upload documentation artifact
46-
uses: actions/upload-pages-artifact@v1
43+
uses: actions/upload-pages-artifact@v3
4744
with:
4845
path: docs
4946

@@ -58,4 +55,4 @@ jobs:
5855
steps:
5956
- name: Deploy to GitHub Pages
6057
id: deployment
61-
uses: actions/deploy-pages@v1
58+
uses: actions/deploy-pages@v4

Diff for: .github/workflows/rubocop.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test External
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
10+
11+
jobs:
12+
test:
13+
name: ${{matrix.ruby}} on ${{matrix.os}}
14+
runs-on: ${{matrix.os}}-latest
15+
16+
strategy:
17+
matrix:
18+
os:
19+
- ubuntu
20+
- macos
21+
22+
ruby:
23+
- "3.1"
24+
- "3.2"
25+
- "3.3"
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ${{matrix.ruby}}
32+
bundler-cache: true
33+
34+
- name: Run RuboCop
35+
timeout-minutes: 10
36+
run: bundle exec rubocop

Diff for: .github/workflows/coverage.yaml renamed to .github/workflows/test-coverage.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Coverage
1+
name: Test Coverage
22

33
on: [push, pull_request]
44

@@ -21,10 +21,10 @@ jobs:
2121
- macos
2222

2323
ruby:
24-
- "3.2"
24+
- "3.3"
2525

2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
- uses: ruby/setup-ruby@v1
2929
with:
3030
ruby-version: ${{matrix.ruby}}
@@ -34,7 +34,7 @@ jobs:
3434
timeout-minutes: 5
3535
run: bundle exec bake test
3636

37-
- uses: actions/upload-artifact@v2
37+
- uses: actions/upload-artifact@v3
3838
with:
3939
name: coverage-${{matrix.os}}-${{matrix.ruby}}
4040
path: .covered.db
@@ -44,10 +44,10 @@ jobs:
4444
runs-on: ubuntu-latest
4545

4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
- uses: ruby/setup-ruby@v1
4949
with:
50-
ruby-version: "3.2"
50+
ruby-version: "3.3"
5151
bundler-cache: true
5252

5353
- uses: actions/download-artifact@v3

Diff for: .github/workflows/test-external.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ jobs:
2020
- macos
2121

2222
ruby:
23-
- "2.7"
24-
- "3.0"
2523
- "3.1"
2624
- "3.2"
25+
- "3.3"
2726

2827
steps:
29-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
3029
- uses: ruby/setup-ruby@v1
3130
with:
3231
ruby-version: ${{matrix.ruby}}

Diff for: .github/workflows/test.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121
- macos
2222

2323
ruby:
24-
- "2.7"
25-
- "3.0"
2624
- "3.1"
2725
- "3.2"
26+
- "3.3"
2827

2928
experimental: [false]
3029

@@ -40,7 +39,7 @@ jobs:
4039
experimental: true
4140

4241
steps:
43-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v4
4443
- uses: ruby/setup-ruby@v1
4544
with:
4645
ruby-version: ${{matrix.ruby}}

Diff for: .rubocop.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
AllCops:
2+
DisabledByDefault: true
3+
4+
Layout/IndentationStyle:
5+
Enabled: true
6+
EnforcedStyle: tabs
7+
8+
Layout/InitialIndentation:
9+
Enabled: true
10+
11+
Layout/IndentationWidth:
12+
Enabled: true
13+
Width: 1
14+
15+
Layout/IndentationConsistency:
16+
Enabled: true
17+
EnforcedStyle: normal
18+
19+
Layout/EndAlignment:
20+
Enabled: true
21+
EnforcedStyleAlignWith: start_of_line
22+
23+
Layout/BeginEndAlignment:
24+
Enabled: true
25+
EnforcedStyleAlignWith: start_of_line
26+
27+
Layout/ElseAlignment:
28+
Enabled: true
29+
30+
Layout/DefEndAlignment:
31+
Enabled: true
32+
33+
Layout/CaseIndentation:
34+
Enabled: true
35+
36+
Layout/CommentIndentation:
37+
Enabled: true
38+
39+
Layout/EmptyLinesAroundClassBody:
40+
Enabled: true
41+
42+
Layout/EmptyLinesAroundModuleBody:
43+
Enabled: true
44+
45+
Style/FrozenStringLiteralComment:
46+
Enabled: true

Diff for: gems.rb

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
end
1616

1717
group :test do
18+
gem "sus"
19+
gem "covered"
20+
gem "decode"
21+
gem "rubocop"
22+
1823
gem "bake-test"
1924
gem "bake-test-external"
2025

Diff for: lib/sus/fixtures/async/http/server_context.rb

+1-1
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, 2022-2023, by Samuel Williams.
4+
# Copyright, 2022-2024, by Samuel Williams.
55

66
require 'sus/fixtures/async/reactor_context'
77

Diff for: lib/sus/fixtures/async/http/version.rb

+1-1
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, 2022-2023, by Samuel Williams.
4+
# Copyright, 2022-2024, by Samuel Williams.
55

66
module Sus
77
module Fixtures

Diff for: license.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# MIT License
22

3-
Copyright, 2022-2023, by Samuel Williams.
3+
Copyright, 2022-2024, by Samuel Williams.
4+
Copyright, 2023, by Felix Yan.
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

Diff for: sus-fixtures-async-http.gemspec

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
77
spec.version = Sus::Fixtures::Async::HTTP::VERSION
88

99
spec.summary = "Test fixtures for running in Async::HTTP."
10-
spec.authors = ["Samuel Williams"]
10+
spec.authors = ["Samuel Williams", "Felix Yan"]
1111
spec.license = "MIT"
1212

1313
spec.cert_chain = ['release.cert']
@@ -16,17 +16,16 @@ Gem::Specification.new do |spec|
1616
spec.homepage = "https://github.com/sus-rb/sus-fixtures-async-http"
1717

1818
spec.metadata = {
19+
"documentation_uri" => "https://sus-rb.github.io/sus-fixtures-async-http/",
1920
"funding_uri" => "https://github.com/sponsors/ioquatix/",
21+
"source_code_uri" => "https://github.com/sus-rb/sus-fixtures-async-http.git",
2022
}
2123

2224
spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)
2325

24-
spec.required_ruby_version = ">= 2.7.0"
26+
spec.required_ruby_version = ">= 3.1"
2527

2628
spec.add_dependency "async-http", "~> 0.54"
27-
2829
spec.add_dependency "sus", "~> 0.10"
2930
spec.add_dependency "sus-fixtures-async", "~> 0.1"
30-
31-
spec.add_development_dependency "covered", "~> 0.20"
3231
end

Diff for: test/sus/fixtures/async/http/server_context.rb

+1-1
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, 2022-2023, by Samuel Williams.
4+
# Copyright, 2022-2024, by Samuel Williams.
55

66
require 'sus/fixtures/async/http/server_context'
77

0 commit comments

Comments
 (0)