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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 699ce3c4f3fbb0ede944795f2062ca3f475959465a0da0768fb82f397af9e867
4
- data.tar.gz: e1ae507b2a597758ee8902728305e101c255784bc46d8283c441bd613ea43ea6
3
+ metadata.gz: 5c913795034972c715d77eaef5ef1d13c9a8615e4b6d87b9afcd4579fdd33795
4
+ data.tar.gz: a345e35c29c7cea72ccd1b86f059fbe388d09b2bb5b187963ef90e852fc4f729
5
5
  SHA512:
6
- metadata.gz: b10106369fb1ec0eaa6a816d0f37961dba342e6b5450bf65e72fd8a7b2254444d63fbda027234685989b881d2179939349de3d7c2a076b8427dd9a3764b2b7eb
7
- data.tar.gz: 543364d151630c4c0ffaedfbe493c72e7c6491b858127a2e75aae966ebbb83d00f449e3941ffc1cd07c5c6558257de0bbcd35f1498c95f32506a0cee8bc5459c
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
@@ -1,3 +1,3 @@
1
1
  module Delivery
2
- VERSION = '0.14.0'.freeze
2
+ VERSION = '0.14.1'.freeze
3
3
  end
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.0
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-27 00:00:00.000000000 Z
11
+ date: 2019-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri