packlink_lite 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 7ccaab6fdc49a94edc939dd75fb129a75d188a6e
4
- data.tar.gz: effae85c177be32d29907f89948d1859a06b3f36
3
+ metadata.gz: 44fb7248d5f3477108d05cd90394c4d2f1571a8a
4
+ data.tar.gz: 34a4deaf2e3ac066feecb8d27a1f2dcde485c4a5
5
5
  SHA512:
6
- metadata.gz: 262a7e460c8fb55bd3e23273e5978525e780d83d0544910ff7e4e277288f09f5f39d966717f9d8f5bf3306ad062cead28bec0ab60df7a076b4326a7c506f5cbb
7
- data.tar.gz: 108d0de88dfaf74dbeff54098c595218f8b67d6ab0ee3d7a186a9e0f7dd400030604d80d02e58c05e2392b5e84cdfebafdaca77df14e441663517434ad3a96ba
6
+ metadata.gz: 2afa900dc142db2d9f5a4f0f2e9587ba130ad9e5a84305f9f0b2b728728befa97bf59a80f03313ed6d2aa3b25759d23f6793f2a037ae6e3b7a0258d7b96be7f6
7
+ data.tar.gz: 798ee30ffdaae90678d220ec773917ea2e659ba473ee45f2ab2e0b2404b91d8fabbd5b0bb6fb7474152381d75357469e4818d6ace46461c60ee1b0cd65a99137
@@ -34,8 +34,12 @@ module PacklinkLite
34
34
  end
35
35
 
36
36
  def connection(api_key)
37
+ token = api_key || PacklinkLite.config.api_key
38
+
39
+ raise(Error, 'API key is not set') unless token
40
+
37
41
  @connection ||= build_connection
38
- @connection.headers['Authorization'] = api_key || PacklinkLite.config.api_key
42
+ @connection.headers['Authorization'] = token
39
43
  @connection
40
44
  end
41
45
 
@@ -1,3 +1,3 @@
1
1
  module PacklinkLite
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packlink_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurynas Butkus