opentsdb-ruby 0.0.2 → 0.0.3

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: 137e3fc251ccc866b3211c17710181c233d3e5d3
4
- data.tar.gz: 30fd3ba112c0cbee000a2c921f1558695ca4ecff
3
+ metadata.gz: 0965273870cf1d0e970171c7f3feb80e14de6050
4
+ data.tar.gz: 7bd33e7972ef2a6c1f194fe4d042d2b137835f9d
5
5
  SHA512:
6
- metadata.gz: 260ed6de97dab70facdcf5442446fb2006d178170954323bc2c6b48844e7981a3a45630c0fe1252fa86f7b20ee1f8b773368b052670f40682917ba055a4442e7
7
- data.tar.gz: 9cd16e28f2e7d80722901652cfcf3425430aaa886cb79163811f4c03090be6d9545696f4fc89cc8adb5ad6c5819ef763c95f15265aad64b5222ab00da014aa7c
6
+ metadata.gz: b35e664047831e9afa4f5d93f0a1a58f868d65eb8b4b5b13b7b1a6bc2fab9e9c6c323cec0b88f87f228546bb954265d446ceeac7d4e44153b5ca7a805a53b280
7
+ data.tar.gz: 2c155b03575e551bae84f72e8a0674857e7427486730a449c2d900de5f8d7db754ebb88e3627ed8aeda68b3b6436d6a0c56d1d29397bd34f057d47b622678e9c
data/README.md CHANGED
@@ -2,13 +2,14 @@
2
2
 
3
3
  Ruby client for OpenTSDB HTTP Query API.
4
4
 
5
- [![Gem Version](http://img.shields.io/gem/v/opentsdb-ruby.svg)](https://rubygems.org/gems/opentsdb-ruby) [![Build Status](https://travis-ci.org/cloudinsight/opentsdb-ruby.png)](https://travis-ci.org/cloudinsight/opentsdb-ruby) [![Code Climate](https://codeclimate.com/github/cloudinsight/opentsdb-ruby/badges/gpa.svg)](https://codeclimate.com/github/cloudinsight/opentsdb-ruby)
5
+ [![Gem Version](http://img.shields.io/gem/v/opentsdb-ruby.svg)](https://rubygems.org/gems/opentsdb-ruby) [![Build Status](https://travis-ci.org/cloudinsight/opentsdb-ruby.png)](https://travis-ci.org/cloudinsight/opentsdb-ruby) [![Code Climate](https://codeclimate.com/github/cloudinsight/opentsdb-ruby/badges/gpa.svg)](https://codeclimate.com/github/cloudinsight/opentsdb-ruby) [![Test Coverage](https://codeclimate.com/github/cloudinsight/opentsdb-ruby/badges/coverage.svg)](https://codeclimate.com/github/cloudinsight/opentsdb-ruby/coverage)
6
+
6
7
  ## Installation
7
8
 
8
9
  Add this line to your application's Gemfile:
9
10
 
10
11
  ```ruby
11
- gem 'opentsdb-ruby'
12
+ gem 'opentsdb-ruby', require 'opentsdb'
12
13
  ```
13
14
 
14
15
  And then execute:
@@ -26,11 +27,11 @@ Or install it yourself as:
26
27
 
27
28
  ```ruby
28
29
  #config/initializers/opentsdb.rb
29
-
30
- Opentsdb.configure do |config|
31
- config.host = 'localhost' # opentsdb server host default: localhost
32
- config.port = 4242 # opentsdb server port default: 4242
33
- end
30
+ #require 'opentsdb'
31
+ Opentsdb.configure do |config|
32
+ config.host = 'localhost' # opentsdb server host default: localhost
33
+ config.port = 4242 # opentsdb server port default: 4242
34
+ end
34
35
  ```
35
36
 
36
37
  ### Usage
@@ -22,7 +22,7 @@ class QueryParam
22
22
  {}.tap do |h|
23
23
  h[:start] = start_time
24
24
  h[:end] = end_time
25
- h[:queries] = queries
25
+ h[:queries] = [queries]
26
26
  end.to_json
27
27
  end
28
28
 
@@ -43,13 +43,13 @@ class QueryParam
43
43
  end
44
44
 
45
45
  def queries
46
- [{}.tap do |qh|
46
+ {}.tap do |qh|
47
47
  qh[:aggregator] = aggregator
48
48
  qh[:rate] = rate
49
49
  qh[:metric] = metric
50
50
  qh[:tags] = tags
51
51
  qh[:downsample] = downsample if downsample
52
- end]
52
+ end
53
53
  end
54
54
 
55
55
  def aggregator_for
@@ -1,3 +1,3 @@
1
1
  module Opentsdb
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentsdb-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - lizhe
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-18 00:00:00.000000000 Z
12
+ date: 2016-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake