Skip to content

Commit

Permalink
chore!: Remove old faraday 0.9 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraichen committed Feb 29, 2024
1 parent 8ce9473 commit 3b441a8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/mnemosyne/probes/faraday/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ def setup

module Extension
def lock!
unless @handlers.include?('Mnemosyne::Middleware::Faraday')
if ::Faraday::VERSION < '1.0' &&
respond_to?(:is_adapter?, true) &&
(idx = @handlers.find_index {|m| is_adapter?(m) })

insert(idx, ::Mnemosyne::Middleware::Faraday)
else
use(::Mnemosyne::Middleware::Faraday)
end
end
use(::Mnemosyne::Middleware::Faraday) unless @handlers.include?('Mnemosyne::Middleware::Faraday')

super
end
Expand Down

0 comments on commit 3b441a8

Please sign in to comment.