Skip to content

Commit

Permalink
Merge pull request #1012 from raytung/fix/faraday
Browse files Browse the repository at this point in the history
build(deps): Unpin `faraday` from v1, upgrade to v2
  • Loading branch information
cosmo0920 authored Apr 3, 2023
2 parents 830535d + cf6bf9e commit cc2802a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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 @@ -11,7 +11,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 @@ -11,7 +11,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
3 changes: 2 additions & 1 deletion fluent-plugin-elasticsearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ 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 "faraday", "~> 1.10"
s.add_runtime_dependency 'faraday', '>= 2.0.0'
s.add_runtime_dependency 'faraday-excon', '>= 2.0.0'
s.add_runtime_dependency 'excon', '>= 0'
s.add_runtime_dependency 'elasticsearch'

Expand Down
1 change: 1 addition & 0 deletions lib/fluent/plugin/in_elasticsearch.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'elasticsearch'

require 'faraday/excon'
require 'fluent/log-ext'
require 'fluent/plugin/input'
require_relative 'elasticsearch_constants'
Expand Down
4 changes: 3 additions & 1 deletion lib/fluent/plugin/out_elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
rescue LoadError
end

require 'faraday/excon'

module Fluent::Plugin
class ElasticsearchOutput < Output
class RecoverableRequestFailure < StandardError; end
Expand Down Expand Up @@ -471,7 +473,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 cc2802a

Please sign in to comment.