1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/core/deprecated/connection.rb
Joe Rafaniello d9559c610d Fix typo: Fog::Connection is deprecated, not Fog::XML::Connection.
Commit 0e1daf3d did a mass rename and accidentally renamed the intended deprecated method.
2014-12-04 14:08:07 -05:00

24 lines
872 B
Ruby

require "fog/xml"
module Fog
# @deprecated Use {Fog::Core::Connection} or {XML::SAXParserConnection} if you
# require the response body to be parsed.
#
# The Connection class is a wrapper around an instance of Excon::Connection
# supporting {#request} and {#reset} only.
#
# {#request} includes an option to perform SAX parsing for XML APIs.
#
# @see https://github.com/geemus/excon/blob/master/lib/excon/connection.rb
#
class Connection < Fog::XML::Connection
def request(params, &block)
if params.key?(:parser)
Fog::Logger.deprecation("Fog::Connection is deprecated use Fog::XML::Connection instead [light_black](#{caller.first})[/]")
else
Fog::Logger.deprecation("Fog::Connection is deprecated use Fog::Core::Connection instead [light_black](#{caller.first})[/]")
end
super(params)
end
end
end