Skip to content

Commit 41ce053

Browse files
authored
chore: bump minimum supported Ruby version to 3.2
Thanks @sferik!
2 parents 4244f89 + 67c9304 commit 41ce053

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: ruby/setup-ruby@v1
2121
with:
2222
bundler-cache: false
23-
ruby-version: '3.1'
23+
ruby-version: '3.2'
2424
- run: |-
2525
bundle install
2626
@@ -36,7 +36,7 @@ jobs:
3636
uses: ruby/setup-ruby@v1
3737
with:
3838
bundler-cache: false
39-
ruby-version: '3.1'
39+
ruby-version: '3.2'
4040
- run: |-
4141
bundle install
4242

.github/workflows/create-releases.yml

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

.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
@@ -9,7 +9,7 @@ module Type
99
#
1010
# This module provides a base implementation for streaming responses in the SDK.
1111
#
12-
# @see https://rubyapi.org/3.1/o/enumerable
12+
# @see https://rubyapi.org/3.2/o/enumerable
1313
module BaseStream
1414
include Enumerable
1515

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

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)