influxdb 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.md +12 -0
- data/influxdb.gemspec +4 -4
- data/lib/influxdb/client.rb +0 -1
- data/lib/influxdb/client/http.rb +1 -1
- data/lib/influxdb/config.rb +0 -1
- data/lib/influxdb/max_queue.rb +0 -2
- data/lib/influxdb/version.rb +1 -1
- data/lib/influxdb/writer/async.rb +21 -2
- data/smoke/provision.sh +7 -2
- data/spec/influxdb/cases/query_cluster_spec.rb +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32eb764b72ed6837bac8c3ef72761d12770294f2
|
4
|
+
data.tar.gz: 5cbc233bb93ffd39948d4a0bbd522916c189a04d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 650cf3793a7bca2653ff4b999f6dfa0ec4cd3d1bc95f1bd9e00e402d10bf546ce091d9f88becd633567b9d9c1c69c8b789185b332366e92e91efdc57db841691
|
7
|
+
data.tar.gz: f78046d93b485dc1e124a0d4a6076e3ed214dc02462ce44f6d9ab5e32fac0928216ab5bd917e5d3ab12bfb02f42000f65dedde1e4648b7e32bd139117ac19755
|
data/.travis.yml
CHANGED
@@ -26,7 +26,7 @@ matrix:
|
|
26
26
|
env: TEST_TASK=rubocop
|
27
27
|
- rvm: jruby-9.1.5.0
|
28
28
|
- rvm: jruby-head
|
29
|
-
env: JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M'
|
29
|
+
env: TEST_TASK=spec JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M'
|
30
30
|
- rvm: 2.4.2
|
31
31
|
env: TEST_TASK=smoke influx_version=1.0.2 pkghash=3e4c349cb57507913d9abda1459bdbed
|
32
32
|
- rvm: 2.4.2
|
@@ -34,7 +34,7 @@ matrix:
|
|
34
34
|
- rvm: 2.4.2
|
35
35
|
env: TEST_TASK=smoke influx_version=1.2.4 pkghash=0545d67217393282188e5d5cdedfdc85
|
36
36
|
- rvm: 2.4.2
|
37
|
-
env: TEST_TASK=smoke influx_version=1.3.
|
37
|
+
env: TEST_TASK=smoke influx_version=1.3.6 pkghash256=6406cdd21466bcb832b967078adaa9f07cb6ae524a6579c15141692031f5f840
|
38
38
|
- rvm: 2.4.2
|
39
39
|
env: TEST_TASK=smoke influx_version=nightly channel=nightlies
|
40
40
|
fail_fast: true
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ For the full commit log, [see here](https://github.com/influxdata/influxdb-ruby/
|
|
6
6
|
|
7
7
|
- None yet.
|
8
8
|
|
9
|
+
## v0.4.3, released 2017-10-21
|
10
|
+
|
11
|
+
- Added warning to `InfluxDB::Write::Async#write`, marking the currently
|
12
|
+
ignored arguments as significant in the next release.
|
13
|
+
|
9
14
|
## v0.4.2, released 2017-09-26
|
10
15
|
|
11
16
|
- Bugfix in `InfluxDB::PointValue`: Properly encode backslashes (#200)
|
@@ -23,6 +28,13 @@ For the full commit log, [see here](https://github.com/influxdata/influxdb-ruby/
|
|
23
28
|
- Allow configuration by an URL (idea by @carlhoerberg in #188).
|
24
29
|
- Improved logging (#180).
|
25
30
|
|
31
|
+
## v0.3.17, released 2017-09-27
|
32
|
+
|
33
|
+
- (Backport from v0.4.1) Bugfix in async client: Flush queue before exit
|
34
|
+
(#198, #199 @onlynone)
|
35
|
+
- (Backport from v0.4.2) Bugfix in `InfluxDB::PointValue`: Properly
|
36
|
+
encode backslashes (#200)
|
37
|
+
|
26
38
|
## v0.3.16, released 2017-08-17
|
27
39
|
|
28
40
|
- **This is propably the last release in the 0.3.x series.**
|
data/influxdb.gemspec
CHANGED
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.required_ruby_version = ">= 2.2.0"
|
22
22
|
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
24
|
spec.add_development_dependency "rake"
|
24
|
-
spec.add_development_dependency "
|
25
|
-
spec.add_development_dependency "
|
26
|
-
spec.add_development_dependency "webmock",
|
27
|
-
spec.add_development_dependency "rubocop", "~> 0.49"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.6"
|
26
|
+
spec.add_development_dependency "rubocop", "~> 0.49"
|
27
|
+
spec.add_development_dependency "webmock", "~> 3.0"
|
28
28
|
end
|
data/lib/influxdb/client.rb
CHANGED
data/lib/influxdb/client/http.rb
CHANGED
@@ -89,7 +89,7 @@ module InfluxDB
|
|
89
89
|
parsed_response = response.body.each_line.with_object({}) do |line, parsed|
|
90
90
|
parsed.merge!(JSON.parse(line)) { |_key, oldval, newval| oldval + newval }
|
91
91
|
end
|
92
|
-
elsif response.body
|
92
|
+
elsif (body = response.body) && (body != "")
|
93
93
|
parsed_response = JSON.parse(response.body)
|
94
94
|
end
|
95
95
|
|
data/lib/influxdb/config.rb
CHANGED
data/lib/influxdb/max_queue.rb
CHANGED
data/lib/influxdb/version.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'thread'
|
2
1
|
require "net/http"
|
3
2
|
require "uri"
|
4
3
|
|
@@ -12,7 +11,16 @@ module InfluxDB
|
|
12
11
|
@config = config
|
13
12
|
end
|
14
13
|
|
15
|
-
def write(data,
|
14
|
+
def write(data, precision = nil, retention_policy = nil, database = nil)
|
15
|
+
if !precision.nil? || !retention_policy.nil? || !database.nil?
|
16
|
+
opts = {
|
17
|
+
precision: precision,
|
18
|
+
retention_policy: retention_policy,
|
19
|
+
database: database,
|
20
|
+
}.delete_if { |_, v| v.nil? }
|
21
|
+
warn_arguments(opts)
|
22
|
+
end
|
23
|
+
|
16
24
|
data = data.is_a?(Array) ? data : [data]
|
17
25
|
data.map { |p| worker.push(p) }
|
18
26
|
end
|
@@ -28,6 +36,17 @@ module InfluxDB
|
|
28
36
|
end
|
29
37
|
end
|
30
38
|
|
39
|
+
private
|
40
|
+
|
41
|
+
def warn_arguments(**which)
|
42
|
+
warn [
|
43
|
+
"You are using influxdb in async mode, and have provided one or",
|
44
|
+
"more parameter which are currently ignored:",
|
45
|
+
which.map { |k, v| format "%s=%p", k, v }.join(", "),
|
46
|
+
"Starting with v0.5.0, these arguments will no longer be ignored.",
|
47
|
+
].join(" ")
|
48
|
+
end
|
49
|
+
|
31
50
|
class Worker
|
32
51
|
attr_reader :client,
|
33
52
|
:queue,
|
data/smoke/provision.sh
CHANGED
@@ -23,16 +23,21 @@ fi
|
|
23
23
|
|
24
24
|
echo "== Download verification"
|
25
25
|
hash_sum=$(md5sum "${HOME}/${package_name}" | awk '{ print $1 }')
|
26
|
+
sha2_sum=$(sha256sum "${HOME}/${package_name}" | awk '{ print $1 }')
|
26
27
|
|
27
|
-
if [ -z "${pkghash}" ]; then
|
28
|
+
if [ -z "${pkghash}" ] || [ -z "${pkghash256}"]; then
|
28
29
|
echo "-- Skipping, pkghash is empty"
|
29
30
|
else
|
30
|
-
if [ "${
|
31
|
+
if [ -n "${pkghash256}" ] && [ "${sha2_sum}" != "${pkghash256}" ]; then
|
32
|
+
echo >&2 "E: Hash sum mismatch (got ${sha2_sum}, expected ${pkghash256})"
|
33
|
+
exit 1
|
34
|
+
elif [ "${hash_sum}" != "${pkghash}" ]; then
|
31
35
|
echo >&2 "E: Hash sum mismatch (got ${hash_sum}, expected ${pkghash})"
|
32
36
|
exit 1
|
33
37
|
fi
|
34
38
|
fi
|
35
39
|
echo "-- Download has MD5 hash: ${hash_sum}"
|
40
|
+
echo "-- Download has SHA256 hash: ${sha2_sum}"
|
36
41
|
|
37
42
|
|
38
43
|
echo "== Installing"
|
@@ -59,7 +59,7 @@ describe InfluxDB::Client do
|
|
59
59
|
before do
|
60
60
|
stub_request(:get, "http://influxdb.test:9999/query").with(
|
61
61
|
query: { u: "username", p: "password", q: "SHOW USERS" }
|
62
|
-
).to_return(body: JSON.generate(response, status: 200)
|
62
|
+
).to_return(body: JSON.generate(response), status: 200)
|
63
63
|
end
|
64
64
|
|
65
65
|
it "should GET a list of cluster admins" do
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Persen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,33 +53,33 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0.49'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0.49'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0
|
75
|
+
version: '3.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0
|
82
|
+
version: '3.0'
|
83
83
|
description: This is the official Ruby library for InfluxDB.
|
84
84
|
email:
|
85
85
|
- influxdb@googlegroups.com
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.6.
|
166
|
+
rubygems_version: 2.6.13
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: Ruby library for InfluxDB.
|