Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Ruby 3.4 #413

Merged
merged 4 commits into from
Dec 31, 2024
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
fail-fast: false
matrix:
ruby:
- "3.4"
- "3.3"
- "3.2"
- "3.1"
Expand Down
1 change: 1 addition & 0 deletions hanami-utils.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "dry-core", "~> 1.0", "< 2"
spec.add_dependency "dry-transformer", "~> 1.0", "< 2"
spec.add_dependency "concurrent-ruby", "~> 1.0"
spec.add_dependency "bigdecimal", "~> 3.1"

spec.add_development_dependency "bundler", ">= 1.6", "< 3"
spec.add_development_dependency "rake", "~> 13"
Expand Down
13 changes: 11 additions & 2 deletions spec/unit/hanami/utils/deprecation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ def run
end

it "prints a deprecation warning for nested call" do
expect { DeprecationWrapperTest.new.run }
.to output(include("old_method is deprecated, please use new_method - called from: #{__FILE__}:21:in `run'.")).to_stderr
if RUBY_VERSION < "3.4"
expect { DeprecationWrapperTest.new.run }
.to output(
include("old_method is deprecated, please use new_method - called from: #{__FILE__}:21:in `run'.")
).to_stderr
else
expect { DeprecationWrapperTest.new.run }
.to output(
include("old_method is deprecated, please use new_method - called from: #{__FILE__}:21:in 'DeprecationWrapperTest#run'.")
).to_stderr
end
end
end
6 changes: 5 additions & 1 deletion spec/unit/hanami/utils/kernel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,11 @@ def to_str
let(:input) { {a: 1, "b" => 2} }

it "returns the string representation" do
expect(@result).to eq '{:a=>1, "b"=>2}'
if RUBY_VERSION < "3.4"
expect(@result).to eq '{:a=>1, "b"=>2}'
else
expect(@result).to eq '{a: 1, "b" => 2}'
end
end
end

Expand Down
Loading