influxdb 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +29 -26
- data/CHANGELOG.md +6 -0
- data/README.md +4 -2
- data/influxdb.gemspec +2 -2
- data/lib/influxdb/point_value.rb +1 -0
- data/lib/influxdb/version.rb +1 -1
- data/spec/influxdb/cases/udp_client_spec.rb +8 -14
- data/spec/influxdb/client_spec.rb +1 -1
- data/spec/influxdb/point_value_spec.rb +3 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ea0ef1fdc75be35c711e62cbe12f80755c2b8985
|
4
|
+
data.tar.gz: 776b4cd261b825af89a42d16e7be8e5e51869e44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e68245d292c220601eee90a27c992f6516c52ddf3f144081879623a9f334ec11ac4ccffb8de51b74759d924b5d7e5344ce0023b4c9c1f9b1a86ec43c5a8b164c
|
7
|
+
data.tar.gz: e0d6a1c802d56e51aa6935d75dfe2c2a3e1270183e62640599922bc66a27da69d8cc50c9460211fbe4757768e32e945f489096b2a3911f1b6a60460a9af690a8
|
data/.travis.yml
CHANGED
@@ -3,14 +3,12 @@ dist: trusty
|
|
3
3
|
language: ruby
|
4
4
|
before_install:
|
5
5
|
- gem update --system --no-doc
|
6
|
-
- gem install bundler --no-doc
|
7
|
-
- gem update bundler --no-doc
|
8
6
|
- bin/provision.sh
|
9
7
|
rvm:
|
10
|
-
- 2.
|
11
|
-
- 2.
|
12
|
-
- 2.
|
13
|
-
- 2.
|
8
|
+
- "2.3"
|
9
|
+
- "2.4"
|
10
|
+
- "2.5"
|
11
|
+
- "2.6"
|
14
12
|
- ruby-head
|
15
13
|
env:
|
16
14
|
- TEST_TASK=spec
|
@@ -19,37 +17,42 @@ matrix:
|
|
19
17
|
allow_failures:
|
20
18
|
- rvm: jruby-head
|
21
19
|
- rvm: ruby-head
|
22
|
-
- rvm: jruby-9.1.
|
23
|
-
- rvm: 2.5.
|
20
|
+
- rvm: jruby-9.1.17.0
|
21
|
+
- rvm: jruby-9.2.5.0
|
22
|
+
- rvm: "2.6"
|
24
23
|
env: influx_version=nightly channel=nightlies
|
25
24
|
include:
|
26
|
-
- rvm: 2.
|
25
|
+
- rvm: "2.6"
|
27
26
|
env: TEST_TASK=rubocop
|
28
|
-
|
27
|
+
|
28
|
+
- rvm: jruby-9.1.17.0
|
29
|
+
env: JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M'
|
30
|
+
- rvm: jruby-9.2.5.0
|
31
|
+
env: JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M'
|
29
32
|
- rvm: jruby-head
|
30
33
|
env: JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M'
|
31
|
-
|
34
|
+
|
35
|
+
- rvm: "2.6"
|
32
36
|
env: influx_version=1.0.2 pkghash=88f6c30fec2c6e612e802e23b9161fdfc7c5c29f6be036f0376326445aff0037
|
33
|
-
- rvm: 2.
|
34
|
-
env: influx_version=1.1.
|
35
|
-
- rvm: 2.
|
37
|
+
- rvm: "2.6"
|
38
|
+
env: influx_version=1.1.5 pkghash=0ecb9385cc008f6e5094e6e8f8ea70522023a16d4397e401898f3973176d3b21
|
39
|
+
- rvm: "2.6"
|
36
40
|
env: influx_version=1.2.4 pkghash=2fac8391e04aa1bec9151e8f0d8f18df030c866af2b4963ab7d86c6ddc172182
|
37
|
-
- rvm: 2.
|
38
|
-
env: influx_version=1.3.
|
39
|
-
- rvm: 2.
|
41
|
+
- rvm: "2.6"
|
42
|
+
env: influx_version=1.3.8 pkghash=35c9cb2943bbde04aa5e94ad6d8caf5fc9b1480bdbcde7c34078de135cc4f788
|
43
|
+
- rvm: "2.6"
|
40
44
|
env: influx_version=1.4.3 pkghash=0477080f1d1cf8e1242dc7318280b9010c4c45cf6a415a2a5de607ae17fa0359
|
41
|
-
- rvm: 2.
|
42
|
-
env: influx_version=1.5.
|
43
|
-
- rvm: 2.
|
44
|
-
env: influx_version=1.6.
|
45
|
-
- rvm: 2.
|
46
|
-
env: influx_version=1.7.
|
47
|
-
- rvm: 2.
|
45
|
+
- rvm: "2.6"
|
46
|
+
env: influx_version=1.5.4 pkghash=fa6f8d3196d13ffc376d533581b534692c738181ce3427c53484c138d9e6b902
|
47
|
+
- rvm: "2.6"
|
48
|
+
env: influx_version=1.6.4 pkghash=dbfa13a0f9e38a8e7b19294c30144903bb681ac0aba0a3a8f4f349c37d5de5f9
|
49
|
+
- rvm: "2.6"
|
50
|
+
env: influx_version=1.7.2 pkghash=0bce61b7d89bf3216a7d3cb7a38423bd1c3a1b7d2ea8086b39cb26130ad78995
|
51
|
+
- rvm: "2.6"
|
48
52
|
env: influx_version=nightly channel=nightlies
|
49
|
-
fail_fast: true
|
50
53
|
addons:
|
51
54
|
apt:
|
52
55
|
packages:
|
53
56
|
- haveged
|
54
57
|
- libgmp-dev
|
55
|
-
script: bundle exec rake $TEST_TASK
|
58
|
+
script: travis_retry bundle exec rake $TEST_TASK
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
For the full commit log, [see here](https://github.com/influxdata/influxdb-ruby/commits/master).
|
4
4
|
|
5
|
+
## v0.7.0, released 2018-01-11
|
6
|
+
|
7
|
+
- Drop support for Ruby 2.2, since Bundler dropped it and we want to use
|
8
|
+
Bundler in the development cycle as well.
|
9
|
+
- Fix issue with tag values ending in a backslash.
|
10
|
+
|
5
11
|
## v0.6.4, releases 2018-12-02
|
6
12
|
|
7
13
|
- Fix newly introduced `InfluxDB.now(precision)` for precisions larger
|
data/README.md
CHANGED
@@ -39,8 +39,10 @@ Maintained by [@toddboom](https://github.com/toddboom) and [@dmke](https://githu
|
|
39
39
|
|
40
40
|
## Ruby support
|
41
41
|
|
42
|
-
Since v0.
|
43
|
-
|
42
|
+
Since v0.7.0, this gem requires Ruby >= 2.3.0. MRI 2.2 *should* still work,
|
43
|
+
however we are unable to test this properly, since our toolchain (Bundler)
|
44
|
+
has dropped support for it. Support for MRI < 2.2 is still available in the
|
45
|
+
v0.3.x series, see [stable-03 branch](https://github.com/influxdata/influxdb-ruby/tree/stable-03)
|
44
46
|
for documentation.
|
45
47
|
|
46
48
|
## Installation
|
data/influxdb.gemspec
CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.required_ruby_version = ">= 2.2.0"
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler"
|
21
|
+
spec.add_development_dependency "bundler"
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
spec.add_development_dependency "rspec", "~> 3.6"
|
24
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
24
|
+
spec.add_development_dependency "rubocop", "~> 0.61.1"
|
25
25
|
spec.add_development_dependency "webmock", "~> 3.0"
|
26
26
|
end
|
data/lib/influxdb/point_value.rb
CHANGED
data/lib/influxdb/version.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe InfluxDB::Client do
|
4
|
-
let(:
|
4
|
+
let(:socket) { UDPSocket.new.tap { |s| s.bind "localhost", 0 } }
|
5
|
+
after { socket.close rescue nil }
|
6
|
+
|
7
|
+
let(:client) { described_class.new(udp: { host: "localhost", port: socket.addr[1] }) }
|
5
8
|
|
6
9
|
specify { expect(client.writer).to be_a(InfluxDB::Writer::UDP) }
|
7
10
|
|
@@ -9,32 +12,23 @@ describe InfluxDB::Client do
|
|
9
12
|
let(:message) { 'responses,region=eu value=5i' }
|
10
13
|
|
11
14
|
it "sends a UDP packet" do
|
12
|
-
s = UDPSocket.new
|
13
|
-
s.bind("localhost", 44_444)
|
14
|
-
|
15
15
|
client.write_point("responses", values: { value: 5 }, tags: { region: 'eu' })
|
16
16
|
|
17
|
-
rec_message =
|
17
|
+
rec_message = socket.recvfrom(30).first
|
18
18
|
expect(rec_message).to eq message
|
19
|
-
|
20
|
-
s.close
|
21
19
|
end
|
22
20
|
end
|
23
21
|
|
24
22
|
describe "#write with discard_write_errors" do
|
25
23
|
let(:client) do
|
26
|
-
described_class.new
|
27
|
-
udp: { host: "localhost", port:
|
24
|
+
described_class.new \
|
25
|
+
udp: { host: "localhost", port: socket.addr[1] },
|
28
26
|
discard_write_errors: true
|
29
|
-
)
|
30
27
|
end
|
31
28
|
|
32
29
|
it "doesn't raise" do
|
33
|
-
s = UDPSocket.new
|
34
|
-
s.bind("localhost", 44_444)
|
35
|
-
|
36
30
|
client.write_point("responses", values: { value: 5 }, tags: { region: 'eu' })
|
37
|
-
|
31
|
+
socket.close
|
38
32
|
|
39
33
|
client.write_point("responses", values: { value: 7 }, tags: { region: 'eu' })
|
40
34
|
|
@@ -47,7 +47,7 @@ describe InfluxDB::Client do
|
|
47
47
|
it "escapes params" do
|
48
48
|
url = subject.send(:full_url, "/unknown", value: ' !@#$%^&*()/\\_+-=?|`~')
|
49
49
|
encoded_fragment = "value=+%21%40%23%24%25%5E%26%2A%28%29%2F%5C_%2B-%3D%3F%7C%60"
|
50
|
-
encoded_fragment << (
|
50
|
+
encoded_fragment << (RUBY_VERSION >= "2.5.0" ? "~" : "%7E")
|
51
51
|
expect(url).to include(encoded_fragment)
|
52
52
|
end
|
53
53
|
|
@@ -6,7 +6,8 @@ describe InfluxDB::PointValue do
|
|
6
6
|
point = {
|
7
7
|
series: '1= ,"\\1',
|
8
8
|
tags: {
|
9
|
-
'2= ,"\\2' => '3= ,"\\3'
|
9
|
+
'2= ,"\\2' => '3= ,"\\3',
|
10
|
+
'4' => "5\\", # issue #225
|
10
11
|
},
|
11
12
|
values: {
|
12
13
|
'4= ,"\\4' => '5= ,"\\5',
|
@@ -25,6 +26,7 @@ describe InfluxDB::PointValue do
|
|
25
26
|
series = [
|
26
27
|
%(1=\\ \\,"\\1),
|
27
28
|
%(2\\=\\ \\,"\\2=3\\=\\ \\,"\\3),
|
29
|
+
%(4=5\\ ),
|
28
30
|
]
|
29
31
|
fields = [
|
30
32
|
%(4\\=\\ \\,\\"\\4="5= ,\\"\\\\5"),
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Persen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
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: '0'
|
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: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.61.1
|
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: 0.
|
68
|
+
version: 0.61.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.6.13
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Ruby library for InfluxDB.
|