Compare commits

...

2 Commits

Author SHA1 Message Date
Matt
f33bd3782c
Version bump to 0.17.6 2022-11-04 17:20:15 +00:00
Quinn Chaffee
db14de8b90
Silence Multipart/Post deprecation warnings (#1455) 2022-11-04 17:19:41 +00:00
2 changed files with 17 additions and 7 deletions

View File

@ -14,7 +14,7 @@ require 'forwardable'
# conn.get '/' # conn.get '/'
# #
module Faraday module Faraday
VERSION = "0.17.5" VERSION = "0.17.6"
class << self class << self
# Public: Gets or sets the root path that Faraday is being loaded from. # Public: Gets or sets the root path that Faraday is being loaded from.

View File

@ -1,10 +1,15 @@
begin begin
require 'composite_io' require 'multipart/post'
require 'parts'
require 'stringio' require 'stringio'
rescue LoadError rescue LoadError
$stderr.puts "Install the multipart-post gem." begin
raise require 'composite_io'
require 'parts'
require 'stringio'
rescue LoadError
$stderr.puts "Install the multipart-post gem."
raise
end
end end
module Faraday module Faraday
@ -62,6 +67,11 @@ module Faraday
end end
end end
UploadIO = ::UploadIO if defined?(::Multipart::Post::UploadIO)
Parts = ::Parts UploadIO = ::Multipart::Post::UploadIO
Parts = ::Multipart::Post::Parts
else
UploadIO = ::UploadIO
Parts = ::Parts
end
end end