databox 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: dd4871f2017a8a856cf1d1028bd57d7da66a7a5e
4
- data.tar.gz: 5392cb04f638eba6d7b105ee2ac8193126411b6d
3
+ metadata.gz: 996ff7ea6e063bd64ddffa2b7a8ddadad60d33a1
4
+ data.tar.gz: 8d462c689646b609baac13e244d3a4529f18f7b1
5
5
  SHA512:
6
- metadata.gz: a4b4fe37a811ee47d99e876a6f50837de7a225ec28922497df681956e21f44d4248d7482cb232d1f753004a34d3bf8fd22b32f5ab392e4f7b135ac39db4b6106
7
- data.tar.gz: c568214f243bc7b80102163e7ce6c16e97fcc4ff9358ef8ead85ea934bead6de59d386ed058667815356b82daa0ae74a8785e880ed9b06cf169f4f656232928c
6
+ metadata.gz: 30cf2bd65d3c10aee883cd00d4f19c89cde47d5a556f19932252ad887a2b01609f5d10da4646c64cdafbfb3a586b16d0f339e2f0e3a641a40d7b6b22e00590ff
7
+ data.tar.gz: 7fce7f44e168fe6252d4125d54d2026a8f6fa62c917e96a3c30d1b49e4cbe03d6bf2c5db6d80a6d7dd6a8f08fd46677596e47ae880a7c05b57fc02c556da72b8
@@ -2,7 +2,15 @@
2
2
  Following guidelines of http://keepachangelog.com/
3
3
 
4
4
  ## [Unreleased]
5
- - update to support Databox API version 3
5
+
6
+ ## [2.0.1] - Sep 26, 2016
7
+ - update README
8
+ - (bugfix) fix missing date in push payload if provided as a root key
9
+
10
+ ## [2.0.0] - Aug 30, 2016
11
+ - update request headers
12
+ - update GET /lastpushes
13
+ - handle new response
6
14
 
7
15
  ## [0.2.2] - Jan 24, 2016
8
16
  Databox API has changed a bit in part dedicated for retrieving last pushes. This SDK was updated accordingly.
@@ -12,6 +20,8 @@ Support for additional attributes
12
20
  Test for additional attributes support
13
21
  Updated README.md example
14
22
 
15
- [Unreleased]: https://github.com/databox/databox-ruby/compare/0.2.2...master
23
+ [Unreleased]: https://github.com/databox/databox-ruby/compare/2.0.1...master
24
+ [2.0.1]: https://github.com/databox/databox-ruby/compare/2.0.0...2.0.1
25
+ [2.0.0]: https://github.com/databox/databox-ruby/compare/0.2.2...2.0.0
16
26
  [0.2.2]: https://github.com/databox/databox-ruby/compare/0.2.1...0.2.2
17
27
  [0.2.1]: https://github.com/databox/databox-ruby/tree/0.2.1
data/README.md CHANGED
@@ -73,14 +73,15 @@ client.last_push
73
73
  ```
74
74
 
75
75
  ## Resources
76
-
77
76
  - [Databox Web App](https://app.databox.com/)
78
77
  - [Databox Developers Portal](https://developers.databox.com/)
79
78
 
80
79
  ## Author & License
81
-
82
80
  - [Oto Brglez](https://github.com/otobrglez)
83
- - Comes with `MIT` license and terms
81
+ - [Vlada Petrović](https://github.com/VladaPetrovic)
82
+
83
+ ## License
84
+ - Comes with `MIT` license and terms.
84
85
 
85
86
  [travis-badge]: https://secure.travis-ci.org/databox/databox-ruby.png?branch=v2
86
87
  [travis]: http://travis-ci.org/databox/databox-ruby
data/example.rb CHANGED
@@ -4,21 +4,15 @@ require 'bundler/setup'
4
4
  require 'databox'
5
5
 
6
6
  Databox.configure do |c|
7
- c.push_token = "vi0jlkpxsy5pdhdtw94el"
7
+ c.push_token = ENV["DATABOX_PUSH_TOKEN"]
8
8
  end
9
9
 
10
10
  client = Databox::Client.new()
11
11
 
12
- client.insert_all([
13
- {key: 'temp.ljx', value: 4.3, attributes: {test: 'rees je'}},
14
- {key: 'temp.ljx', value: 1.3, date: '2015-01-01 09:00:00'},
15
- ])
16
-
17
-
18
- #3.times do |t|
19
- # client.push(key: "example.ruby", value: t*100, date:(DateTime.now - t).strftime('%Y-%m-%d'))
20
- #end
12
+ 3.times do |t|
13
+ client.push(key: "example.ruby", value: t*100, date:(DateTime.now - t).strftime('%Y-%m-%d'))
14
+ end
21
15
 
22
- #client.push(key: "example.ruby.unit", value: 100, unit: "USD")
16
+ client.push(key: "example.ruby.unit", value: 100, unit: "USD")
23
17
 
24
18
  pp client.last_push(3)
@@ -38,7 +38,6 @@ class Databox::Client
38
38
  end
39
39
 
40
40
  def process_kpi(options={})
41
- options.delete_if { |k, _| [:date, 'date'].include?(k) }
42
41
 
43
42
  %i{key value}.each do |k|
44
43
  raise("Missing '#{k}'") if (options[k] || options[k.to_s]).nil?
@@ -1,3 +1,3 @@
1
1
  module Databox
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: databox
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oto Brglez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-02 00:00:00.000000000 Z
11
+ date: 2018-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.6.12
146
+ rubygems_version: 2.5.2.3
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: API wrapper for Databox