Skip to content

Commit

Permalink
Merge pull request #97 from fluent/load-faraday-v2
Browse files Browse the repository at this point in the history
Load Faraday v2 instead of v1
  • Loading branch information
cosmo0920 authored Apr 3, 2023
2 parents 7c8ff50 + 6ac5c91 commit 317239f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
ruby: [ '3.0', '3.1', '3.2' ]
os:
- ubuntu-latest
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
ruby: [ '3.0', '3.1', '3.2' ]
os:
- macOS-latest
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
ruby: [ '3.0', '3.1', '3.2' ]
os:
- windows-latest
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
Expand Down
7 changes: 4 additions & 3 deletions fluent-plugin-opensearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ Gem::Specification.new do |s|
s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)

s.add_runtime_dependency 'fluentd', '>= 0.14.22'
s.add_runtime_dependency 'excon', '>= 0'
s.add_runtime_dependency 'opensearch-ruby'
s.add_runtime_dependency "aws-sdk-core", "~> 3"
s.add_runtime_dependency "faraday", "~> 1.10"
s.add_runtime_dependency "faraday_middleware-aws-sigv4", "~> 0.6.1"
s.add_runtime_dependency 'excon', '>= 0'
s.add_runtime_dependency 'faraday', '>= 2.0.0'
s.add_runtime_dependency 'faraday-excon', '>= 2.0.0'
s.add_runtime_dependency "faraday_middleware-aws-sigv4", "~> 1.0.1"

s.add_development_dependency 'rake', '>= 0'
s.add_development_dependency 'webrick', '~> 1.7.0'
Expand Down
1 change: 1 addition & 0 deletions lib/fluent/plugin/in_opensearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

require 'opensearch'

require 'faraday/excon'
require 'fluent/log-ext'
require 'fluent/plugin/input'
require_relative 'opensearch_constants'
Expand Down
3 changes: 2 additions & 1 deletion lib/fluent/plugin/out_opensearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
end
require 'aws-sdk-core'
require 'faraday_middleware/aws_sigv4'
require 'faraday/excon'

module Fluent::Plugin
class OpenSearchOutput < Output
Expand Down Expand Up @@ -509,7 +510,7 @@ def backend_options
when :excon
{ client_key: @client_key, client_cert: @client_cert, client_key_pass: @client_key_pass, nonblock: @http_backend_excon_nonblock }
when :typhoeus
require 'typhoeus'
require 'faraday/typhoeus'
{ sslkey: @client_key, sslcert: @client_cert, keypasswd: @client_key_pass }
end
rescue LoadError => ex
Expand Down

0 comments on commit 317239f

Please sign in to comment.