keen 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +2 -2
- data/README.md +3 -0
- data/lib/keen/client.rb +3 -1
- data/lib/keen/client/saved_queries.rb +4 -1
- data/lib/keen/version.rb +1 -1
- data/spec/keen/client/publishing_methods_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59fa0dd54e4200a1adfae054d2720f25a5153113
|
4
|
+
data.tar.gz: 1700087db79e25937d840ee0de8b7a57d3769db5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8f0064da21debd51c315b2319f7f95e9e2bc10510f9c02bc38b53efb017229dea11dad6b73472d0e74fafd283bb450cad5b11e3619e9f79c587be9b6fccb41
|
7
|
+
data.tar.gz: 957775acf03e4e4d4bcea48bd889492cb813d4c629f4f4e29ba722acee5787a1fafd381ccc73e706ac04faa68a077da7d7be6e9ec0a3d31a8c526cd14666799a
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -412,6 +412,9 @@ If you want some bot protection, check out the [Voight-Kampff](https://github.co
|
|
412
412
|
|
413
413
|
### Changelog
|
414
414
|
|
415
|
+
##### 0.9.7
|
416
|
+
+ Added a new header `Keen-Sdk` that sends the SDK version information on all requests.
|
417
|
+
|
415
418
|
##### 0.9.6
|
416
419
|
+ Updated behavior of saved queries to allow fetching results using the READ KEY as opposed to requiring the MASTER KEY, making the gem consistent with https://keen.io/docs/api/#getting-saved-query-results
|
417
420
|
|
data/lib/keen/client.rb
CHANGED
@@ -4,6 +4,7 @@ require 'keen/client/publishing_methods'
|
|
4
4
|
require 'keen/client/querying_methods'
|
5
5
|
require 'keen/client/maintenance_methods'
|
6
6
|
require 'keen/client/saved_queries'
|
7
|
+
require 'keen/version'
|
7
8
|
require 'openssl'
|
8
9
|
require 'multi_json'
|
9
10
|
require 'base64'
|
@@ -29,7 +30,8 @@ module Keen
|
|
29
30
|
end
|
30
31
|
{ "Content-Type" => "application/json",
|
31
32
|
"User-Agent" => user_agent,
|
32
|
-
"Authorization" => authorization
|
33
|
+
"Authorization" => authorization,
|
34
|
+
"Keen-Sdk" => "ruby-#{Keen::VERSION}" }
|
33
35
|
}
|
34
36
|
}
|
35
37
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'keen/version'
|
1
2
|
require "json"
|
2
3
|
|
3
4
|
class SavedQueries
|
@@ -17,6 +18,7 @@ class SavedQueries
|
|
17
18
|
# The results path should use the READ KEY
|
18
19
|
api_key = client.read_key
|
19
20
|
end
|
21
|
+
|
20
22
|
response = saved_query_response(api_key, saved_query_path)
|
21
23
|
response_body = JSON.parse(response.body, symbolize_names: true)
|
22
24
|
process_response(response)
|
@@ -63,7 +65,8 @@ class SavedQueries
|
|
63
65
|
end
|
64
66
|
{ "Content-Type" => "application/json",
|
65
67
|
"User-Agent" => user_agent,
|
66
|
-
"Authorization" => authorization
|
68
|
+
"Authorization" => authorization,
|
69
|
+
"Keen-Sdk" => "ruby-#{Keen::VERSION}" }
|
67
70
|
end
|
68
71
|
|
69
72
|
def process_response(response)
|
data/lib/keen/version.rb
CHANGED
@@ -52,7 +52,7 @@ describe Keen::Client::PublishingMethods do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
e.class.should == Keen::HttpError
|
55
|
-
e.original_error.
|
55
|
+
e.original_error.should be_kind_of(Timeout::Error)
|
56
56
|
e.message.should == "Keen IO Exception: HTTP publish failure: execution expired"
|
57
57
|
end
|
58
58
|
|
data/spec/spec_helper.rb
CHANGED
@@ -40,7 +40,8 @@ module Keen::SpecHelpers
|
|
40
40
|
|
41
41
|
headers = { "Content-Type" => "application/json",
|
42
42
|
"User-Agent" => user_agent,
|
43
|
-
"Authorization" => read_or_write_key
|
43
|
+
"Authorization" => read_or_write_key,
|
44
|
+
"Keen-Sdk" => "ruby-#{Keen::VERSION}" }
|
44
45
|
|
45
46
|
WebMock.should have_requested(method, url).with(
|
46
47
|
:body => body,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kleissner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
201
|
rubyforge_project:
|
202
|
-
rubygems_version: 2.0.14
|
202
|
+
rubygems_version: 2.0.14
|
203
203
|
signing_key:
|
204
204
|
specification_version: 4
|
205
205
|
summary: Keen IO API Client
|
@@ -219,3 +219,4 @@ test_files:
|
|
219
219
|
- spec/spec_helper.rb
|
220
220
|
- spec/synchrony/spec_helper.rb
|
221
221
|
- spec/synchrony/synchrony_spec.rb
|
222
|
+
has_rdoc:
|