Skip to content

Commit 85e9796

Browse files
committed
Bump minimum supported Ruby version to 3.2
Ruby 3.1 is no longer supported as of March 31, 2025.
1 parent ac3c96c commit 85e9796

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: ruby/setup-ruby@v1
1919
with:
2020
bundler-cache: false
21-
ruby-version: '3.1'
21+
ruby-version: '3.2'
2222
- run: |-
2323
bundle install
2424
@@ -33,7 +33,7 @@ jobs:
3333
uses: ruby/setup-ruby@v1
3434
with:
3535
bundler-cache: false
36-
ruby-version: '3.1'
36+
ruby-version: '3.2'
3737
- run: |-
3838
bundle install
3939

.github/workflows/create-releases.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: ruby/setup-ruby@v1
3030
with:
3131
bundler-cache: false
32-
ruby-version: '3.1'
32+
ruby-version: '3.2'
3333
- run: |-
3434
bundle install
3535

.github/workflows/publish-gem.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: ruby/setup-ruby@v1
1616
with:
1717
bundler-cache: false
18-
ruby-version: '3.1'
18+
ruby-version: '3.2'
1919
- run: |-
2020
bundle install
2121

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ AllCops:
88
- "bin/*"
99
NewCops: enable
1010
SuggestExtensions: false
11-
TargetRubyVersion: 3.1.0
11+
TargetRubyVersion: 3.2
1212

1313
# Whether MFA is required or not should be left to the token configuration.
1414
Gemspec/RequireMFA:

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.2

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OpenAI Ruby API library
22

3-
The OpenAI Ruby library provides convenient access to the OpenAI REST API from any Ruby 3.1.0+ application.
3+
The OpenAI Ruby library provides convenient access to the OpenAI REST API from any Ruby 3.2+ application.
44

55
## Documentation
66

@@ -91,7 +91,7 @@ end
9191

9292
### File uploads
9393

94-
Request parameters that correspond to file uploads can be passed as `StringIO`, or a [`Pathname`](https://rubyapi.org/3.1/o/pathname) instance.
94+
Request parameters that correspond to file uploads can be passed as `StringIO`, or a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance.
9595

9696
```ruby
9797
require "pathname"
@@ -271,7 +271,7 @@ This package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` typ
271271

272272
## Requirements
273273

274-
Ruby 3.1.0 or higher.
274+
Ruby 3.2 or higher.
275275

276276
## Contributing
277277

examples/advanced_streaming.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
temperature: 0.0
1818
)
1919

20-
# the `stream` itself is an `https://rubyapi.org/3.1/o/enumerable`
20+
# the `stream` itself is an `https://rubyapi.org/3.2/o/enumerable`
2121
# which means that you can work with the stream almost as if it is an array
2222
all_choices =
2323
stream
@@ -49,7 +49,7 @@
4949

5050
stream_of_choices =
5151
stream
52-
# calling `#lazy` will return a deferred `https://rubyapi.org/3.1/o/enumerator/lazy`
52+
# calling `#lazy` will return a deferred `https://rubyapi.org/3.2/o/enumerator/lazy`
5353
.lazy
5454
# each successive calls to methods that return another `enumerable` will not consume the stream
5555
# but rather, return a transformed stream. (see link above)

lib/openai/internal/type/base_stream.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Type
77
#
88
# This module provides a base implementation for streaming responses in the SDK.
99
#
10-
# @see https://rubyapi.org/3.1/o/enumerable
10+
# @see https://rubyapi.org/3.2/o/enumerable
1111
module BaseStream
1212
include Enumerable
1313

@@ -22,7 +22,7 @@ class << self
2222
#
2323
# @return [Proc]
2424
#
25-
# @see https://rubyapi.org/3.1/o/objectspace#method-c-define_finalizer
25+
# @see https://rubyapi.org/3.2/o/objectspace#method-c-define_finalizer
2626
def defer_closing(stream) = ->(_id) { OpenAI::Internal::Util.close_fused!(stream) }
2727
end
2828

openai.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
1212
s.metadata["homepage_uri"] = s.homepage
1313
s.metadata["source_code_uri"] = "https://github.com/openai/openai-ruby"
1414
s.metadata["rubygems_mfa_required"] = false.to_s
15-
s.required_ruby_version = ">= 3.0.0"
15+
s.required_ruby_version = ">= 3.2"
1616

1717
s.files = Dir[
1818
"lib/**/*.rb",

0 commit comments

Comments
 (0)