Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ executors:
ruby-version:
type: string
default: "3.4"
ruby_4_0:
<<: *ruby_env
parameters:
ruby-version:
type: string
default: "4.0"

commands:
pre-setup:
Expand Down Expand Up @@ -259,3 +265,18 @@ workflows:
- e2e:
name: "ruby-3_4-e2e"
e: "ruby_3_4"
ruby_4_0:
jobs:
- bundle-audit:
name: "ruby-4_0-bundle_audit"
e: "ruby_4_0"
- rubocop:
name: "ruby-4_0-rubocop"
e: "ruby_4_0"
- rspec-unit:
name: "ruby-4_0-rspec"
e: "ruby_4_0"
code-climate: false
- e2e:
name: "ruby-4_0-e2e"
e: "ruby_4_0"
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Changelog for the gruf gem. This includes internal history before the gem was ma

### Pending release

### 2.22.0

* Add support for Ruby 4.x

### 2.21.1

* [#230] Add fix for load order issues with reloader in some non-Rails environments
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ up fast and efficiently at scale. Some of its features include:
still preserving gRPC BadStatus codes
* Server and client execution timings in responses

gruf currently has active support for gRPC 1.10.x+. gruf is compatible and tested with Ruby 3.0-3.4.
gruf currently has active support for gRPC 1.10.x+. gruf is compatible and tested with Ruby 3.x-4.0.
gruf is also not [Rails](https://github.com/rails/rails)-specific, and can be used in any Ruby framework
(such as [Grape](https://github.com/ruby-grape/grape) or [dry-rb](https://dry-rb.org/), for instance).

Expand Down
2 changes: 1 addition & 1 deletion gruf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
# supported by grpc gem before bumping the maximum Ruby major version that this gem officially supports.
# grpc gem has a history of lagging behind the latest Ruby version support post-new-year every year.
# See: https://github.com/bigcommerce/gruf/pull/221#issuecomment-2573428792
spec.required_ruby_version = '>= 3.0', '< 3.5'
spec.required_ruby_version = '>= 3.0', '< 5.0'

spec.metadata = {
'bug_tracker_uri' => 'https://github.com/bigcommerce/gruf/issues',
Expand Down
16 changes: 8 additions & 8 deletions spec/gruf/client/error_factory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
Gruf::Client::Errors.constants
.reject { |e| rejected_exceptions.include?(e) }
.each do |error_class|
context "and is a GRPC::#{error_class} exception" do
let(:exception) { "GRPC::#{error_class}".constantize.new(error_message) }
let(:expected_class) { "Gruf::Client::Errors::#{error_class}".constantize }
context "when is a GRPC::#{error_class} exception" do
let(:exception) { "GRPC::#{error_class}".constantize.new(error_message) }
let(:expected_class) { "Gruf::Client::Errors::#{error_class}".constantize }

it "wraps it with the Gruf::Client::Errors::#{error_class} class" do
expect(subject).to be_a(expected_class)
expect(subject.error).to eq exception
end
end
it "wraps it with the Gruf::Client::Errors::#{error_class} class" do
expect(subject).to be_a(expected_class)
expect(subject.error).to eq exception
end
end
end
end

Expand Down