delivery-sdk-ruby 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delivery/client/delivery_query.rb +8 -3
- data/lib/delivery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c913795034972c715d77eaef5ef1d13c9a8615e4b6d87b9afcd4579fdd33795
|
4
|
+
data.tar.gz: a345e35c29c7cea72ccd1b86f059fbe388d09b2bb5b187963ef90e852fc4f729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38e452048f7c53067e1b875dde68c1424c3bbda6f03f3cb613be48d04fbb431b81c8ce09931f467d616ed4fb5749d647f361afc0febbf30e3fa76f3f652f8639
|
7
|
+
data.tar.gz: 463ba10303423bade0c59538b58795d469e48cc1213fe14e1004180bb367f3138c7e5cec10fd56cd30f6f1951196c5d8fc31a388e9bbbbc76982ac1bf867d73d
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rest-client'
|
2
2
|
require 'delivery/builders/url_builder'
|
3
3
|
require 'delivery/query_parameters/query_string'
|
4
|
+
require 'delivery/version'
|
4
5
|
|
5
6
|
module Delivery
|
6
7
|
# Responsible for translating query parameters into the
|
@@ -132,16 +133,20 @@ module Delivery
|
|
132
133
|
|
133
134
|
def execute_rest
|
134
135
|
if should_preview
|
135
|
-
RestClient.get @url, Authorization: 'Bearer ' + preview_key
|
136
|
+
RestClient.get @url, 'X-KC-SDKID' => provide_sdk_header, Authorization: 'Bearer ' + preview_key
|
136
137
|
else
|
137
138
|
if secure_key.nil?
|
138
|
-
RestClient.get @url
|
139
|
+
RestClient.get @url, 'X-KC-SDKID' => provide_sdk_header
|
139
140
|
else
|
140
|
-
RestClient.get @url, Authorization: 'Bearer ' + secure_key
|
141
|
+
RestClient.get @url, 'X-KC-SDKID' => provide_sdk_header, Authorization: 'Bearer ' + secure_key
|
141
142
|
end
|
142
143
|
end
|
143
144
|
end
|
144
145
|
|
146
|
+
def provide_sdk_header
|
147
|
+
"rubygems.org;delivery-sdk-ruby;#{Delivery::VERSION}"
|
148
|
+
end
|
149
|
+
|
145
150
|
def make_response(response)
|
146
151
|
case query_type
|
147
152
|
when Delivery::QUERY_TYPE_ITEMS
|
data/lib/delivery/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delivery-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dugre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|