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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64f0b30d33e55ce7197790586a4bdb00ad08390a
4
- data.tar.gz: 6747562055bfacc541ed9ea647673579d8f78427
3
+ metadata.gz: 59fa0dd54e4200a1adfae054d2720f25a5153113
4
+ data.tar.gz: 1700087db79e25937d840ee0de8b7a57d3769db5
5
5
  SHA512:
6
- metadata.gz: eaccbc7ea6b950f3582c06f237c7c49d8dea86bd314857b7842ddaf16b19cc22a8220ebe0e06056ae50cd2bb255598d2afec92f9b890073739e731b33683663e
7
- data.tar.gz: 35ae078dbc0234070ecb08c41a4d5328e36ef4b652c4c0270983db1ab927405540a854c02b385f33e92aa2318f68f5fc18d1ec0fe133462373ca403c5395c0ea
6
+ metadata.gz: 3c8f0064da21debd51c315b2319f7f95e9e2bc10510f9c02bc38b53efb017229dea11dad6b73472d0e74fafd283bb450cad5b11e3619e9f79c587be9b6fccb41
7
+ data.tar.gz: 957775acf03e4e4d4bcea48bd889492cb813d4c629f4f4e29ba722acee5787a1fafd381ccc73e706ac04faa68a077da7d7be6e9ec0a3d31a8c526cd14666799a
data/.travis.yml CHANGED
@@ -15,7 +15,7 @@ env:
15
15
  before_install:
16
16
  - gem update bundler
17
17
  - bundle --version
18
- - gem update --system 2.1.11
18
+ - gem update --system
19
19
  - gem --version
20
20
 
21
21
  matrix:
data/Gemfile CHANGED
@@ -4,8 +4,8 @@ group :development, :test do
4
4
  gem 'rake'
5
5
  gem 'em-http-request'
6
6
  gem 'em-synchrony', :require => false
7
- gem 'rspec', '~>2'
8
- gem 'webmock'
7
+ gem 'rspec', '~>3.5'
8
+ gem 'webmock', '<= 2.2'
9
9
  end
10
10
 
11
11
  gemspec
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
@@ -1,3 +1,3 @@
1
1
  module Keen
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
@@ -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.class.should == Timeout::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.6
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: 2016-08-03 00:00:00.000000000 Z
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.1
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: