Skip to content

Commit 8d0bd10

Browse files
committed
Modernize gem.
1 parent 4a20b54 commit 8d0bd10

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

.github/workflows/documentation.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: bundle exec bake utopia:project:static --force no
4141

4242
- name: Upload documentation artifact
43-
uses: actions/upload-pages-artifact@v2
43+
uses: actions/upload-pages-artifact@v3
4444
with:
4545
path: docs
4646

@@ -55,4 +55,4 @@ jobs:
5555
steps:
5656
- name: Deploy to GitHub Pages
5757
id: deployment
58-
uses: actions/deploy-pages@v3
58+
uses: actions/deploy-pages@v4

.github/workflows/test-external.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- macos
2121

2222
ruby:
23-
- "3.0"
2423
- "3.1"
2524
- "3.2"
2625
- "3.3"

.github/workflows/test.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
- macos
2222

2323
ruby:
24-
- "3.0"
2524
- "3.1"
2625
- "3.2"
2726
- "3.3"

examples/http1/client.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
# frozen_string_literal: true
33

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

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

99
require 'async'
10-
require 'async/io/stream'
1110
require 'async/http/endpoint'
1211
require 'protocol/http1/connection'
1312

@@ -19,8 +18,7 @@
1918
puts "Connected to #{peer} #{peer.remote_address.inspect}"
2019

2120
# IO Buffering...
22-
stream = Async::IO::Stream.new(peer)
23-
client = Protocol::HTTP1::Connection.new(stream)
21+
client = Protocol::HTTP1::Connection.new(peer)
2422

2523
puts "Writing request..."
2624
3.times do

examples/http1/server.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# frozen_string_literal: true
33

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

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

@@ -19,10 +19,10 @@
1919

2020
# Read request:
2121
while request = connection.read_request
22-
headers, method, path, version, headers, body = request
22+
authority, method, path, version, headers, body = request
2323

2424
# Write response:
25-
connection.write_response(version, 200, [["Content-Type", "text/plain"]])
25+
connection.write_response(version, 200, [["content-type", "text/plain"]])
2626
connection.write_body(version, Protocol::HTTP::Body::Buffered.wrap(["Hello World"]))
2727

2828
break unless connection.persistent

protocol-http1.gemspec

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ Gem::Specification.new do |spec|
1515

1616
spec.homepage = "https://github.com/socketry/protocol-http1"
1717

18+
spec.metadata = {
19+
"documentation_uri" => "https://socketry.github.io/protocol-http1/",
20+
"source_code_uri" => "https://github.com/socketry/protocol-http1.git",
21+
}
22+
1823
spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)
1924

20-
spec.required_ruby_version = ">= 3.0"
25+
spec.required_ruby_version = ">= 3.1"
2126

2227
spec.add_dependency "protocol-http", "~> 0.22"
2328
end

0 commit comments

Comments
 (0)