moysklad 0.3.1 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fad3cc93541b8fa239ed1a6e3e7a900d2206117589163067f85289abb0261b3
4
- data.tar.gz: bc7c87f9765092342522ffba77d6178c00f670e4e8f5363f77f7055c17a80f9d
3
+ metadata.gz: 6bd42ca1b98829c02677b2ccadabf70265acb292be42b2d0e0ec3cccb49d75f4
4
+ data.tar.gz: b11bff11b11a96f2d7696fe85265a794d7b3d44383cb2442c3a4d42743ebf9e9
5
5
  SHA512:
6
- metadata.gz: 2149b17c96a6dcf5a8006f16173739caeb4745f0055921d548d46b9c084a4fc083d6f644e6ff6407cdd7f0563be0fdff43f84e37b3b7a7c77568a16127b09ad6
7
- data.tar.gz: 5f3ad953ea673c0e69d1fef4405ab5711e8cd603c88a93fa57ac49cda7f2fd8353723da25abcc6b54076416dbc5b5858ed39d1738cb223cde9414a200505126d
6
+ metadata.gz: da0bdcad48a8ec0195a8746163dab6bcdc7258f8e21745eba7c0874bf9eeebc1f81756e29efb8fc1852bd36d0558762d656241fd30feacbec8b7d5dfe329a296
7
+ data.tar.gz: 538f55b00f891fa7e913e89a32f323cc28b328a48d7d5909494684005ce47e1de44640897c170f48fea7772713d463f5b98e60e9cd2e0a536d19a84e40fee117
@@ -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
- conn.request(:authorization, :basic, login, password)
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
 
@@ -2,8 +2,8 @@ module Moysklad::Resources
2
2
  class Assortments < Base
3
3
  include LoadAll
4
4
 
5
- def self.indexed(*args)
6
- new(*args)
5
+ def self.indexed(args = {})
6
+ new(**args)
7
7
  end
8
8
 
9
9
  def all(params = {})
@@ -1,3 +1,3 @@
1
1
  module Moysklad
2
- VERSION = "0.3.1"
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moysklad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danil Pismenny