Skip to content

Commit 6792836

Browse files
committed
Modernize gem.
1 parent bc1bfa0 commit 6792836

File tree

25 files changed

+146
-140
lines changed

25 files changed

+146
-140
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636

3737
- uses: actions/upload-artifact@v4
3838
with:
39+
include-hidden-files: true
40+
if-no-files-found: error
3941
name: coverage-${{matrix.os}}-${{matrix.ruby}}
4042
path: .covered.db
4143

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ Layout/EmptyLinesAroundModuleBody:
4747

4848
Style/FrozenStringLiteralComment:
4949
Enabled: true
50+
51+
Style/StringLiterals:
52+
Enabled: true
53+
EnforcedStyle: double_quotes

config/sus.rb

Lines changed: 2 additions & 2 deletions
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, 2023, by Samuel Williams.
4+
# Copyright, 2023-2024, by Samuel Williams.
55

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

examples/early-hints/server.rb

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

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

77
$LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
88

9-
require 'async'
10-
require 'async/http/endpoint'
9+
require "async"
10+
require "async/http/endpoint"
1111

1212
RESPONSE = <<~HTTP.split(/\r?\n/).join("\r\n")
1313
HTTP/1.1 103 Early Hints

examples/http1/client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
88

9-
require 'async'
10-
require 'async/http/endpoint'
11-
require 'protocol/http1/connection'
9+
require "async"
10+
require "async/http/endpoint"
11+
require "protocol/http1/connection"
1212

1313
Async do
1414
endpoint = Async::HTTP::Endpoint.parse("http://localhost:8080")

examples/http1/server.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
88

9-
require 'socket'
10-
require 'protocol/http1/connection'
11-
require 'protocol/http/body/buffered'
9+
require "socket"
10+
require "protocol/http1/connection"
11+
require "protocol/http/body/buffered"
1212

1313
# Test with: curl http://localhost:8080/
1414

fixtures/connection_context.rb

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

33
# Released under the MIT License.
4-
# Copyright, 2019-2023, by Samuel Williams.
4+
# Copyright, 2019-2024, by Samuel Williams.
55

6-
require 'protocol/http1/connection'
6+
require "protocol/http1/connection"
77

8-
require 'socket'
8+
require "socket"
99

1010
ConnectionContext = Sus::Shared("a connection") do
1111
let(:sockets) {Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)}

fuzz/request/script.rb

Lines changed: 5 additions & 5 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, 2020-2022, by Samuel Williams.
5+
# Copyright, 2020-2024, by Samuel Williams.
66

7-
require 'socket'
8-
require_relative '../../lib/protocol/http1'
7+
require "socket"
8+
require_relative "../../lib/protocol/http1"
99

1010
def test
1111
# input, output = Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)
@@ -25,8 +25,8 @@ def test
2525
end
2626

2727
if ENV["_"] =~ /afl/
28-
require 'kisaten'
29-
Kisaten.crash_at [], [], Signal.list['USR1']
28+
require "kisaten"
29+
Kisaten.crash_at [], [], Signal.list["USR1"]
3030

3131
while Kisaten.loop 10000
3232
test

lib/protocol/http1.rb

Lines changed: 3 additions & 3 deletions
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, 2019-2022, by Samuel Williams.
4+
# Copyright, 2019-2024, by Samuel Williams.
55

6-
require_relative 'http1/version'
7-
require_relative 'http1/connection'
6+
require_relative "http1/version"
7+
require_relative "http1/connection"

lib/protocol/http1/body/chunked.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright, 2019-2024, by Samuel Williams.
55
# Copyright, 2023, by Thomas Morgan.
66

7-
require 'protocol/http/body/readable'
7+
require "protocol/http/body/readable"
88

99
module Protocol
1010
module HTTP1

0 commit comments

Comments
 (0)