Skip to content

Commit

Permalink
Fix deprecated faraday basic_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
dapi committed Apr 5, 2023
1 parent 781be7e commit 1f6d127
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/moysklad/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class Moysklad::Client
URL ='https://online.moysklad.ru/api/remap/1.1/'

def initialize login: nil, password: nil
@client = Faraday.new URL
@client.basic_auth login, password
@client = Faraday.new URL do |conn|
conn.request(:authorization, :basic, login, password)
end
end

def download(path, filename)
Expand Down

0 comments on commit 1f6d127

Please sign in to comment.