Skip to content

Commit 7d6547e

Browse files
committed
Set minimum Ruby version to 3.2
All previous versions are EOL and no longer maintained by the Ruby team.
1 parent 38402b6 commit 7d6547e

11 files changed

Lines changed: 28 additions & 23 deletions

File tree

.github/workflows/test.yml

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

1616
strategy:
1717
matrix:
18-
ruby: [ ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3, ruby-3.4 ]
18+
ruby: [ ruby-3.2, ruby-3.3, ruby-3.4, ruby-4.0 ]
1919

2020
steps:
2121
- uses: actions/checkout@v6

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ AllCops:
1313
DisplayCopNames: true
1414
DisplayStyleGuide: true
1515
NewCops: enable
16-
TargetRubyVersion: 3.0
16+
TargetRubyVersion: 3.2
1717

1818
# Feature has no initialize, so super() is a no-op in subclasses
1919
Lint/MissingSuper:

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
[![Gem Version][gem-image]][gem-link]
44
[![MIT licensed][license-image]][license-link]
5-
[![Build Status][build-image]][build-link]
5+
[![Docs][docs-image]][docs-link]
6+
[![Lint][lint-image]][lint-link]
7+
[![Mutant][mutant-image]][mutant-link]
8+
[![Test][test-image]][test-link]
9+
[![Typecheck][typecheck-image]][typecheck-link]
610

711
[Documentation]
812

@@ -127,12 +131,10 @@ Pattern matching is also supported on `HTTP::Response::Status`, `HTTP::Headers`,
127131
This library aims to support and is [tested against][build-link]
128132
the following Ruby versions:
129133

130-
- Ruby 3.0
131-
- Ruby 3.1
132134
- Ruby 3.2
133135
- Ruby 3.3
134136
- Ruby 3.4
135-
- JRuby 9.4
137+
- Ruby 4.0
136138

137139
If something doesn't work on one of these versions, it's a bug.
138140

@@ -170,8 +172,16 @@ See LICENSE.txt for further details.
170172
[gem-link]: https://rubygems.org/gems/http
171173
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
172174
[license-link]: https://github.com/httprb/http/blob/main/LICENSE.txt
173-
[build-image]: https://github.com/httprb/http/workflows/CI/badge.svg
174-
[build-link]: https://github.com/httprb/http/actions/workflows/ci.yml
175+
[docs-image]: https://github.com/httprb/http/actions/workflows/docs.yml/badge.svg
176+
[docs-link]: https://github.com/httprb/http/actions/workflows/docs.yml
177+
[lint-image]: https://github.com/httprb/http/actions/workflows/lint.yml/badge.svg
178+
[lint-link]: https://github.com/httprb/http/actions/workflows/lint.yml
179+
[mutant-image]: https://github.com/httprb/http/actions/workflows/mutant.yml/badge.svg
180+
[mutant-link]: https://github.com/httprb/http/actions/workflows/mutant.yml
181+
[test-image]: https://github.com/httprb/http/actions/workflows/test.yml/badge.svg
182+
[test-link]: https://github.com/httprb/http/actions/workflows/test.yml
183+
[typecheck-image]: https://github.com/httprb/http/actions/workflows/typecheck.yml/badge.svg
184+
[typecheck-link]: https://github.com/httprb/http/actions/workflows/typecheck.yml
175185

176186
[//]: # (links)
177187

http.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
3434

3535
spec.require_paths = ["lib"]
3636

37-
spec.required_ruby_version = ">= 3.0"
37+
spec.required_ruby_version = ">= 3.2"
3838

3939
spec.add_dependency "addressable", "~> 2.8"
4040
spec.add_dependency "http-cookie", "~> 1.0"

lib/http/features/auto_deflate.rb

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

3-
require "set"
43
require "tempfile"
54
require "zlib"
65

lib/http/features/auto_inflate.rb

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

3-
require "set"
4-
53
module HTTP
64
module Features
75
# Automatically decompresses response bodies

lib/http/redirector.rb

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

3-
require "set"
4-
53
require "http/headers"
64

75
module HTTP
@@ -70,14 +68,14 @@ def initialize(opts = {})
7068
# @param [HTTP::Response] response
7169
# @api public
7270
# @return [HTTP::Response]
73-
def perform(request, response, &block)
71+
def perform(request, response, &)
7472
@request = request
7573
@response = response
7674
@visited = []
7775
collect_cookies_from_request
7876
collect_cookies_from_response
7977

80-
follow_redirects(&block) while REDIRECT_CODES.include?(@response.code)
78+
follow_redirects(&) while REDIRECT_CODES.include?(@response.code)
8179

8280
@response
8381
end

lib/http/response/body.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def initialize(stream, encoding: Encoding::BINARY)
4646
# (see HTTP::Client#readpartial)
4747
# @return [String, nil]
4848
# @api public
49-
def readpartial(*args)
49+
def readpartial(*)
5050
stream!
51-
chunk = @stream.readpartial(*args)
51+
chunk = @stream.readpartial(*)
5252

5353
String.new(chunk, encoding: @encoding) if chunk
5454
end

lib/http/response/inflater.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def initialize(connection)
3434
#
3535
# @return [String, nil]
3636
# @api public
37-
def readpartial(*args)
38-
chunk = @connection.readpartial(*args)
37+
def readpartial(*)
38+
chunk = @connection.readpartial(*)
3939
return zstream.inflate(chunk) if chunk
4040

4141
unless zstream.closed?

test/support/fakeio.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def string
1111
@io.string
1212
end
1313

14-
def read(*args)
15-
@io.read(*args)
14+
def read(*)
15+
@io.read(*)
1616
end
1717

1818
def size

0 commit comments

Comments
 (0)