influxdb-api 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -8
- data/lib/influxdb/api/namespaces/series.rb +3 -1
- data/lib/influxdb/api/version.rb +1 -1
- data/spec/lib/influxdb/api/namespaces/series_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b75a2d9451bb4769cdeb997320a0f13ab86e2720
|
4
|
+
data.tar.gz: 64a82894fa549ac9e121efa329fd2cf46e102660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b941d094565812ef1300f2220fcf3bf4984ab223b3c5f09dc06623d35711afa4d25cf93b3cdd4bc321d43d05b7749180430760dbbd2b8c2baed06bd66042d4eb
|
7
|
+
data.tar.gz: 15e64056ba5e997146f3f31d0a3689ab9cc5b039c9d70298a4e904f1cf3bd32532c82b5d36f00e225ffe5915cc17f6093573e028ec9767bece7013dfc61cc515
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby client for InfluxDB
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/undr/influxdb-api.svg?branch=master)](https://travis-ci.org/undr/influxdb-api) [![Code Climate](https://codeclimate.com/github/undr/influxdb-api/badges/gpa.svg)](https://codeclimate.com/github/undr/influxdb-api)
|
3
|
+
[![Build Status](https://travis-ci.org/undr/influxdb-api.svg?branch=master)](https://travis-ci.org/undr/influxdb-api) [![Code Climate](https://codeclimate.com/github/undr/influxdb-api/badges/gpa.svg)](https://codeclimate.com/github/undr/influxdb-api) [![Gem Version](https://badge.fury.io/rb/influxdb-api.svg)](http://badge.fury.io/rb/influxdb-api)
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -141,8 +141,9 @@ database.continuous_queries.create('select MEAN(user) as user_mean from cpu grou
|
|
141
141
|
database.continuous_queries.delete(1)
|
142
142
|
# => true
|
143
143
|
|
144
|
-
# I haven't tested these methods yet. They aren't implemented on my influxdb server.
|
145
144
|
database.shard_spaces.all
|
145
|
+
# => [{"name"=>"default", "database"=>"influxdb_api", "regex"=>"/.*/", "retentionPolicy"=>"inf", "shardDuration"=>"7d", "replicationFactor"=>1, "split"=>1},
|
146
|
+
# {"name"=>"default", "database"=>"influxdb_ruby", "regex"=>"/.*/", "retentionPolicy"=>"inf", "shardDuration"=>"7d", "replicationFactor"=>1, "split"=>1}]
|
146
147
|
database.shard_spaces.create(attrs)
|
147
148
|
database.shard_spaces.update('spacename', attrs)
|
148
149
|
database.shard_spaces.delete('spacename')
|
@@ -157,7 +158,16 @@ client.cluster_admins.delete('username')
|
|
157
158
|
# => true
|
158
159
|
|
159
160
|
client.servers.all
|
160
|
-
# => [{"id"=>1,
|
161
|
+
# => [{"id"=>1,
|
162
|
+
# "isLeader"=>true,
|
163
|
+
# "isUp"=>false,
|
164
|
+
# "leaderRaftConnectString"=>"http://undr.local:8090",
|
165
|
+
# "leaderRaftName"=>"97f5a3f53052a5a7",
|
166
|
+
# "protobufConnectString"=>"undr.local:8099",
|
167
|
+
# "raftConnectionString"=>"http://undr.local:8090",
|
168
|
+
# "raftName"=>"97f5a3f53052a5a7",
|
169
|
+
# "state"=>4,
|
170
|
+
# "stateName"=>"Potential"}]
|
161
171
|
client.servers.delete(1)
|
162
172
|
# => true
|
163
173
|
|
@@ -172,19 +182,19 @@ client.shards.delete(1)
|
|
172
182
|
# => true
|
173
183
|
|
174
184
|
v = client.version
|
175
|
-
# => "InfluxDB v0.
|
176
|
-
v > '0.
|
185
|
+
# => "InfluxDB v0.8.3 (git: fbf9a474055051c64e947f2a071388ee009a08d5) (leveldb: 1.15)"
|
186
|
+
v > '0.8.6'
|
177
187
|
# => false
|
178
|
-
v > '0.
|
188
|
+
v > '0.8'
|
179
189
|
# => true
|
180
190
|
v.major
|
181
191
|
# => 0
|
182
192
|
v.minor
|
183
|
-
# =>
|
193
|
+
# => 8
|
184
194
|
v.patch
|
185
195
|
# => 3
|
186
196
|
v.git
|
187
|
-
# => "
|
197
|
+
# => "fbf9a474055051c64e947f2a071388ee009a08d5"
|
188
198
|
v.engine
|
189
199
|
# "leveldb: 1.15.0"
|
190
200
|
v.engine.major
|
@@ -7,7 +7,9 @@ module Influxdb
|
|
7
7
|
undef_method(:create) if method_defined?(:create)
|
8
8
|
|
9
9
|
def all
|
10
|
-
raw_execute('
|
10
|
+
raw_execute('SELECT * FROM /.*/ LIMIT 1').map{|s| s['name']}
|
11
|
+
rescue Client::Errors::BadRequest => e
|
12
|
+
[]
|
11
13
|
end
|
12
14
|
|
13
15
|
def write(*series)
|
data/lib/influxdb/api/version.rb
CHANGED
@@ -14,7 +14,7 @@ describe Influxdb::Api::Namespaces::Series do
|
|
14
14
|
}]) }
|
15
15
|
|
16
16
|
before do
|
17
|
-
stub_request(:get, 'http://root:root@localhost:8086/db/dbname/series?q=
|
17
|
+
stub_request(:get, 'http://root:root@localhost:8086/db/dbname/series?q=SELECT%20*%20FROM%20/.*/%20LIMIT%201').
|
18
18
|
to_return(status: 200, body: response, headers: { 'Content-Type' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxdb-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- undr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|