influxdb 0.1.0 → 0.1.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: b18af835198acf64a60f0b61b3464e79dcbf98e8
4
- data.tar.gz: 068c5f701cfe5a346778017cfdb72ae622ecaa37
3
+ metadata.gz: 3e708cfd29b32a5d60b415ae05c17d60e1d003b8
4
+ data.tar.gz: bd843bc59f21981ab448b682129a478276e01a83
5
5
  SHA512:
6
- metadata.gz: 63fe3e1f05b0a61c685a2fc8d536b5d343311c315d5c3ae9502a8fe1b1526657e544087afa330570c840d7bcdca85d28785cb654034b2832206b5397a902f9eb
7
- data.tar.gz: 6e885b8eac8803845c3779d801e1eac99c5d90836de81f3f70ed92a8cf0400e9cd333790a6f303a13cbacf298c64606f2185f312e6532f293f70a893e4b623c8
6
+ metadata.gz: 559ccfca33fc274337448ea27c9ac082d9f0f0d45b12b3c37cb934ebfa44539966d109d54bb28e20ce9fc28ccb71744fdc017a8061a36aa04308c454695c8594
7
+ data.tar.gz: 69ad1c57c5d07a8ce36e8efee843d8c68230bf5a6f5c74c1136b343bcafd776cfad28815d2e4acb2034aa731a2ec0d1c652edc86db242a1f9d98a12080e6c16b
data/README.md CHANGED
@@ -17,6 +17,22 @@ Or add it to your `Gemfile`, etc.
17
17
  Usage
18
18
  -----
19
19
 
20
+ Connecting to a single host:
21
+
22
+ ``` ruby
23
+ require 'influxdb'
24
+
25
+ influxdb = InfluxDB::Client.new host: "influxdb.domain.com"
26
+ ```
27
+
28
+ Connecting to multiple hosts (with built-in load balancing and failover):
29
+
30
+ ``` ruby
31
+ require 'influxdb'
32
+
33
+ influxdb = InfluxDB::Client.new hosts: ["influxdb1.domain.com", "influxdb2.domain.com"]
34
+ ```
35
+
20
36
  Create a database:
21
37
 
22
38
  ``` ruby
@@ -122,8 +122,8 @@ module InfluxDB
122
122
  update_database_user(database, username, :admin => admin)
123
123
  end
124
124
 
125
- def continuous_queries
126
- get full_url("continuous_queries")
125
+ def continuous_queries(database)
126
+ get full_url("db/#{database}/continuous_queries")
127
127
  end
128
128
 
129
129
  def write_point(name, data, async=@async, time_precision=@time_precision)
@@ -1,3 +1,3 @@
1
1
  module InfluxDB
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: influxdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Persen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -96,7 +96,6 @@ files:
96
96
  - influxdb.gemspec
97
97
  - lib/influxdb.rb
98
98
  - lib/influxdb/client.rb
99
- - lib/influxdb/config.rb
100
99
  - lib/influxdb/errors.rb
101
100
  - lib/influxdb/logger.rb
102
101
  - lib/influxdb/max_queue.rb
@@ -1,44 +0,0 @@
1
- require 'json'
2
-
3
- module InfluxDB
4
- class Config
5
- attr_accessor :path, :config
6
-
7
- # +:path+:: path to the config file
8
- # +:config+:: hash representing InfluxDB configuration
9
- def initialize(*args)
10
- opts = args.last.is_a?(Hash) ? args.last : {}
11
- @path = opts[:path] || '/opt/influxdb/shared/config.json'
12
- @config = opts[:config] || default_config
13
- end
14
-
15
- def render
16
- return JSON.pretty_generate(@config)
17
- end
18
-
19
- def valid?(path=@path)
20
- begin
21
- JSON.parse(File.read(path))
22
- return true
23
- rescue JSON::ParserError
24
- return false
25
- end
26
- end
27
-
28
- private
29
-
30
- def default_config
31
- return {
32
- 'AdminHttpPort' => 8083,
33
- 'AdminAssetsDir' => '/opt/influxdb/current/admin',
34
- 'ApiHttpPort' => 8086,
35
- 'RaftServerPort' => 8090,
36
- 'SeedServers' => [],
37
- 'DataDir' => '/opt/influxdb/shared/data/db',
38
- 'RaftDir' => '/opt/influxdb/shared/data/raft'
39
- }
40
- end
41
-
42
- end
43
- end
44
-