Skip to content

Commit fef444c

Browse files
committed
Modernize code.
1 parent 5e426e6 commit fef444c

File tree

13 files changed

+33
-21
lines changed

13 files changed

+33
-21
lines changed

.github/workflows/documentation-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v4
1818
- uses: ruby/setup-ruby@v1
1919
with:
20-
ruby-version: "3.3"
20+
ruby-version: "3.4"
2121
bundler-cache: true
2222

2323
- name: Validate coverage

.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/test-coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- macos
2222

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

2626
steps:
2727
- uses: actions/checkout@v4
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/checkout@v4
5050
- uses: ruby/setup-ruby@v1
5151
with:
52-
ruby-version: "3.3"
52+
ruby-version: "3.4"
5353
bundler-cache: true
5454

5555
- uses: actions/download-artifact@v4

.github/workflows/test-external.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- "3.1"
2424
- "3.2"
2525
- "3.3"
26+
- "3.4"
2627

2728
steps:
2829
- uses: actions/checkout@v4

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- "3.1"
2727
- "3.2"
2828
- "3.3"
29+
- "3.4"
2930

3031
gemfile:
3132
- gems/rack-v1.rb

gems/rack-v30.rb

Lines changed: 1 addition & 1 deletion
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-2025, by Samuel Williams.
55

66
eval_gemfile("gems.rb")
77

gems/rack-v31.rb

Lines changed: 1 addition & 1 deletion
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, 2024-2025, by Samuel Williams.
55

66
eval_gemfile("gems.rb")
77

lib/protocol/rack/adapter/rack2.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# frozen_string_literal: true
22

33
# Released under the MIT License.
4-
# Copyright, 2022-2024, by Samuel Williams.
4+
# Copyright, 2022-2025, by Samuel Williams.
5+
# Copyright, 2025, by Francisco Mejia.
56

67
require "console"
78

lib/protocol/rack/adapter/rack3.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# frozen_string_literal: true
22

33
# Released under the MIT License.
4-
# Copyright, 2022-2024, by Samuel Williams.
4+
# Copyright, 2022-2025, by Samuel Williams.
5+
# Copyright, 2025, by Francisco Mejia.
56

67
require "console"
78

lib/protocol/rack/adapter/rack31.rb

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

33
# Released under the MIT License.
4-
# Copyright, 2022-2024, by Samuel Williams.
4+
# Copyright, 2024-2025, by Samuel Williams.
5+
# Copyright, 2025, by Francisco Mejia.
56

67
require "console"
78

@@ -53,6 +54,11 @@ def make_environment(request)
5354
env[CGI::SERVER_PORT] = server_port
5455
end
5556

57+
# The request protocol, either from the upgrade header or the HTTP/2 pseudo header of the same name.
58+
if protocol = request.protocol
59+
env[RACK_PROTOCOL] = protocol
60+
end
61+
5662
if body = request.body
5763
if body.empty?
5864
body.close

0 commit comments

Comments
 (0)