Skip to content

Commit 5dc8077

Browse files
committed
Modernize code.
1 parent 7efa89e commit 5dc8077

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+224
-117
lines changed
Lines changed: 25 additions & 0 deletions
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.4"
21+
bundler-cache: true
22+
23+
- name: Validate coverage
24+
timeout-minutes: 5
25+
run: bundle exec bake decode:index:coverage lib

.github/workflows/documentation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- uses: ruby/setup-ruby@v1
3131
with:
32-
ruby-version: "3.3"
32+
ruby-version: "3.4"
3333
bundler-cache: true
3434

3535
- name: Installing packages

.github/workflows/rubocop.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
10+
11+
jobs:
12+
check:
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: Run RuboCop
23+
timeout-minutes: 10
24+
run: bundle exec rubocop

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

Lines changed: 9 additions & 7 deletions
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

@@ -18,10 +18,10 @@ jobs:
1818
matrix:
1919
os:
2020
- ubuntu
21-
# - macos
21+
- macos
2222

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

2626
steps:
2727
- uses: actions/checkout@v4
@@ -39,9 +39,11 @@ jobs:
3939
- name: Run tests
4040
timeout-minutes: 5
4141
run: bundle exec bake test
42-
43-
- uses: actions/upload-artifact@v3
42+
43+
- uses: actions/upload-artifact@v4
4444
with:
45+
include-hidden-files: true
46+
if-no-files-found: error
4547
name: coverage-${{matrix.os}}-${{matrix.ruby}}
4648
path: .covered.db
4749

@@ -53,10 +55,10 @@ jobs:
5355
- uses: actions/checkout@v4
5456
- uses: ruby/setup-ruby@v1
5557
with:
56-
ruby-version: "3.3"
58+
ruby-version: "3.4"
5759
bundler-cache: true
5860

59-
- uses: actions/download-artifact@v3
61+
- uses: actions/download-artifact@v4
6062

6163
- name: Validate coverage
6264
timeout-minutes: 5

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- "3.1"
2525
- "3.2"
2626
- "3.3"
27+
- "3.4"
2728

2829
experimental: [false]
2930

.rubocop.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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/BlockAlignment:
20+
Enabled: true
21+
22+
Layout/EndAlignment:
23+
Enabled: true
24+
EnforcedStyleAlignWith: start_of_line
25+
26+
Layout/BeginEndAlignment:
27+
Enabled: true
28+
EnforcedStyleAlignWith: start_of_line
29+
30+
Layout/ElseAlignment:
31+
Enabled: true
32+
33+
Layout/DefEndAlignment:
34+
Enabled: true
35+
36+
Layout/CaseIndentation:
37+
Enabled: true
38+
39+
Layout/CommentIndentation:
40+
Enabled: true
41+
42+
Layout/EmptyLinesAroundClassBody:
43+
Enabled: true
44+
45+
Layout/EmptyLinesAroundModuleBody:
46+
Enabled: true
47+
48+
Style/FrozenStringLiteralComment:
49+
Enabled: true
50+
51+
Style/StringLiterals:
52+
Enabled: true
53+
EnforcedStyle: double_quotes

async-webdriver.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
1010
spec.authors = ["Samuel Williams"]
1111
spec.license = "MIT"
1212

13-
spec.cert_chain = ['release.cert']
14-
spec.signing_key = File.expand_path('~/.gem/release.pem')
13+
spec.cert_chain = ["release.cert"]
14+
spec.signing_key = File.expand_path("~/.gem/release.pem")
1515

1616
spec.homepage = "https://github.com/socketry/async-webdriver"
1717

@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
2121
"source_code_uri" => "https://github.com/socketry/async-webdriver.git",
2222
}
2323

24-
spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)
24+
spec.files = Dir.glob(["{lib}/**/*", "*.md"], File::FNM_DOTMATCH, base: __dir__)
2525

2626
spec.required_ruby_version = ">= 3.1"
2727

benchmark/selenium.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# frozen_string_literal: true
33

44
# Released under the MIT License.
5-
# Copyright, 2023, by Samuel Williams.
5+
# Copyright, 2023-2025, by Samuel Williams.
66

7-
require 'async'
8-
require 'async/http'
9-
require 'selenium/webdriver'
7+
require "async"
8+
require "async/http"
9+
require "selenium/webdriver"
1010

1111
APPLICATION_PORT = 9090
1212
WEB_DRIVER_PORT = 4040

benchmark/test-client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# frozen_string_literal: true
33

44
# Released under the MIT License.
5-
# Copyright, 2023, by Samuel Williams.
5+
# Copyright, 2023-2025, by Samuel Williams.
66

7-
require 'async/http/server'
8-
require_relative '../lib/async/webdriver'
7+
require "async/http/server"
8+
require_relative "../lib/async/webdriver"
99

1010
APPLICATION_PORT = 9090
1111

benchmark/test-pool.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# frozen_string_literal: true
33

44
# Released under the MIT License.
5-
# Copyright, 2023, by Samuel Williams.
5+
# Copyright, 2023-2025, by Samuel Williams.
66

7-
require 'async/http/server'
8-
require_relative '../lib/async/webdriver'
7+
require "async/http/server"
8+
require_relative "../lib/async/webdriver"
99

1010
APPLICATION_PORT = 9090
1111

0 commit comments

Comments
 (0)