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 +4 -4
- data/lib/packlink_lite/client.rb +5 -1
- data/lib/packlink_lite/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44fb7248d5f3477108d05cd90394c4d2f1571a8a
|
4
|
+
data.tar.gz: 34a4deaf2e3ac066feecb8d27a1f2dcde485c4a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2afa900dc142db2d9f5a4f0f2e9587ba130ad9e5a84305f9f0b2b728728befa97bf59a80f03313ed6d2aa3b25759d23f6793f2a037ae6e3b7a0258d7b96be7f6
|
7
|
+
data.tar.gz: 798ee30ffdaae90678d220ec773917ea2e659ba473ee45f2ab2e0b2404b91d8fabbd5b0bb6fb7474152381d75357469e4818d6ace46461c60ee1b0cd65a99137
|
data/lib/packlink_lite/client.rb
CHANGED
@@ -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'] =
|
42
|
+
@connection.headers['Authorization'] = token
|
39
43
|
@connection
|
40
44
|
end
|
41
45
|
|