moysklad 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moysklad/client.rb +5 -1
- data/lib/moysklad/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abdc083d3dbc4b8020ce96a71f348d4da052c9a9a85ff66acb1b5c16e3ba1a89
|
4
|
+
data.tar.gz: e925e1cd59dda2dffa9cb16b855989ed35901239ca1e56d08ae9c6d9d4db8bb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c0597144a06f4c3b243c3f8309a2ae1d241dfbe575280a9dd1d9144c4040a29441229ba392c6ddf51bbb52916f414dbdb14822c5ac22270fed77061f05a966
|
7
|
+
data.tar.gz: 6d374cfec6e3985bad837f7d82a26d50cc9436c3a5f6f5b54c3fe940fa75337f9743e176d70d0e5db1281cffa9a7a0d3e6a3fefbe1e373853a2c5b776b80fbc0
|
data/lib/moysklad/client.rb
CHANGED
@@ -9,7 +9,11 @@ class Moysklad::Client
|
|
9
9
|
|
10
10
|
def initialize login: nil, password: nil
|
11
11
|
@client = Faraday.new URL do |conn|
|
12
|
-
|
12
|
+
if Faraday::VERSION.split('.').first.to_i < 2
|
13
|
+
conn.request(:basic_auth, login, password)
|
14
|
+
else
|
15
|
+
conn.request(:authorization, :basic, login, password)
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
data/lib/moysklad/version.rb
CHANGED