yandex-delivery 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ace5fa6ba5f600789f8e2b9a3b265c349b41bb08d4d1f4e9bd9cadc29efc95d7
|
|
4
|
+
data.tar.gz: 5df92db3acc8ae0bd0d805ea6ecfe48ff5d314432d82209c2009105aa07c4b59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be081c9b8b8a6bfa927627f0590dd75a0a84a66827926b5911d7915d7ccaea1598bb097a5acd21b48881090a467a80f8a7f0441d4dc9a7d4bd6d42f4d7be426c
|
|
7
|
+
data.tar.gz: b3f05e6c3762f59de904606a6127d94fb57989e0f1249ecc06155dea676d491daf8f54d47b309c8ff604c4b5dae61c58fd08ed4dfd88b2bea1bc271951aa02b7
|
|
@@ -11,11 +11,6 @@ YandexDelivery.setup do |config|
|
|
|
11
11
|
config::Request.symbolize_keys = true
|
|
12
12
|
config::Request.debug = false
|
|
13
13
|
|
|
14
|
-
# processed['YANDEX_DELIVERY_API_KEY'].each do |k, v|
|
|
15
|
-
# config::create_method k.underscore.to_sym
|
|
16
|
-
# config::register "#{k.underscore}_key".to_sym, v
|
|
17
|
-
# end
|
|
18
|
-
|
|
19
14
|
processed['YANDEX_DELIVERY'].each do |k, v|
|
|
20
15
|
config::register k.underscore.to_sym, v
|
|
21
16
|
end
|
|
@@ -140,7 +140,7 @@ module YandexDelivery
|
|
|
140
140
|
if request
|
|
141
141
|
request.params.merge!(params) if params
|
|
142
142
|
request.headers['Content-Type'] = 'application/json'
|
|
143
|
-
request.headers['Authorization
|
|
143
|
+
request.headers['Authorization'] = "OAuth #{self.api_key}"
|
|
144
144
|
request.headers.merge!(headers) if headers
|
|
145
145
|
request.body = body if body
|
|
146
146
|
request.options.timeout = self.timeout
|
|
@@ -7,7 +7,7 @@ module YandexDelivery
|
|
|
7
7
|
|
|
8
8
|
def initialize(api_key: nil, api_endpoint: nil, timeout: nil, open_timeout: nil, proxy: nil, faraday_adapter: nil, symbolize_keys: false, debug: false, logger: nil)
|
|
9
9
|
@path_parts = []
|
|
10
|
-
@api_key = api_key || self.class.api_key || ENV['
|
|
10
|
+
@api_key = api_key || self.class.api_key || ENV['YANDEX_DELIVERY_ACCESS_TOKEN']
|
|
11
11
|
@api_key = @api_key.strip if @api_key
|
|
12
12
|
@api_endpoint = api_endpoint || self.class.api_endpoint
|
|
13
13
|
@timeout = timeout || self.class.timeout || DEFAULT_TIMEOUT
|