From e77cb8dc8f20e89e061cf5ea6ad908b7b7754746 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Wed, 26 Jan 2022 10:58:15 +0900 Subject: [PATCH 1/3] CI: Update Ruby Signed-off-by: Takuro Ashie --- .github/workflows/linux.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e97a9b3..222631f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 }} From 1099683c3dcd7b879622308337cfd865729988b3 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Mon, 18 Apr 2022 22:08:34 +0900 Subject: [PATCH 2/3] Add rexml as development_dependency aws-sdk-core requires one of ox, oga, libxml, nokogiri or rexml, and rexml is no longer default gem as of Ruby 3.0, it's a "bundled gem". https://www.ruby-lang.org/en/news/2020/09/25/ruby-3-0-0-preview1-released/ Signed-off-by: Takuro Ashie --- fluent-plugin-s3.gemspec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fluent-plugin-s3.gemspec b/fluent-plugin-s3.gemspec index e1edb81..8088a41 100644 --- a/fluent-plugin-s3.gemspec +++ b/fluent-plugin-s3.gemspec @@ -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 From 0c63d26a7be96c7fbde384a44474f46d2c4a7b69 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Mon, 18 Apr 2022 22:12:14 +0900 Subject: [PATCH 3/3] out_s3: Fix incomatible kwargs against Ruby 3.0 Signed-off-by: Takuro Ashie --- lib/fluent/plugin/out_s3.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fluent/plugin/out_s3.rb b/lib/fluent/plugin/out_s3.rb index 3ca7851..25450de 100644 --- a/lib/fluent/plugin/out_s3.rb +++ b/lib/fluent/plugin/out_s3.rb @@ -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 @@ -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