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

Support Ruby 3.0 or later #388

Merged
merged 3 commits into from
Apr 19, 2022
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
8 changes: 5 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: linux
on:
- push
- pull_request
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: [ '2.4', '2.5', '2.6', '2.7' ]
ruby: [ '3.1', '3.0', '2.7' ]
os:
- ubuntu-latest
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
Expand Down
3 changes: 3 additions & 0 deletions fluent-plugin-s3.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "test-unit", ">= 3.0.8"
gem.add_development_dependency "test-unit-rr", ">= 1.0.3"
gem.add_development_dependency "timecop"
# aws-sdk-core requires one of ox, oga, libxml, nokogiri or rexml,
# and rexml is no longer default gem as of Ruby 3.0.
gem.add_development_dependency "rexml"
end
4 changes: 2 additions & 2 deletions lib/fluent/plugin/out_s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def setup_credentials
end
end

options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
options[:credentials] = Aws::AssumeRoleCredentials.new(**credentials_options)
when @aws_key_id && @aws_sec_key
options[:access_key_id] = @aws_key_id
options[:secret_access_key] = @aws_sec_key
Expand All @@ -532,7 +532,7 @@ def setup_credentials
elsif @s3_region
credentials_options[:client] = Aws::STS::Client.new(:region => @s3_region)
end
options[:credentials] = Aws::AssumeRoleWebIdentityCredentials.new(credentials_options)
options[:credentials] = Aws::AssumeRoleWebIdentityCredentials.new(**credentials_options)
when @instance_profile_credentials
c = @instance_profile_credentials
credentials_options[:retries] = c.retries if c.retries
Expand Down