From a2fd622a496d98326d8a986d7a8ca2d02ab89c7e Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Fri, 29 Apr 2022 14:50:45 +0200 Subject: [PATCH] [1.x] Avoid Faraday deprecation warning The #basic_auth helper method will be removed in 2.0, and this changes the code to use the middleware itself instead. --- lib/librato/metrics/connection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librato/metrics/connection.rb b/lib/librato/metrics/connection.rb index abae123..b9ab5b2 100644 --- a/lib/librato/metrics/connection.rb +++ b/lib/librato/metrics/connection.rb @@ -44,7 +44,7 @@ def transport end.tap do |transport| transport.headers[:user_agent] = user_agent transport.headers[:content_type] = 'application/json' - transport.basic_auth @client.email, @client.api_key + transport.request :basic_auth, @client.email, @client.api_key end end @@ -98,4 +98,4 @@ def transport_adapter end end -end \ No newline at end of file +end