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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: a35d70ed83c318bad08d7d03f1d65b67953a7fc3277c4a925d59fca5e097dde5
4
- data.tar.gz: 4c34876161086123e961d6fa3c43ec808f2ed1024acf205436bdd284f00b756c
2
+ SHA1:
3
+ metadata.gz: ea0ef1fdc75be35c711e62cbe12f80755c2b8985
4
+ data.tar.gz: 776b4cd261b825af89a42d16e7be8e5e51869e44
5
5
  SHA512:
6
- metadata.gz: e83524fcec1f9a816c05d6f4eb5c5e9d8067beccf25551e628b444d6d568f28aa55f8acb41336263640f143fd17f37e9ccd0289f1c97c670f3edf9b14e433193
7
- data.tar.gz: c4c1e66730b9ba1a0dd0529b30f9bbc4b13929674ab0b523952ba5ee2264caa13b712ddf05c91d4262453b32df0559e4f84a37277c136fa8167fbd758329beb0
6
+ metadata.gz: e68245d292c220601eee90a27c992f6516c52ddf3f144081879623a9f334ec11ac4ccffb8de51b74759d924b5d7e5344ce0023b4c9c1f9b1a86ec43c5a8b164c
7
+ data.tar.gz: e0d6a1c802d56e51aa6935d75dfe2c2a3e1270183e62640599922bc66a27da69d8cc50c9460211fbe4757768e32e945f489096b2a3911f1b6a60460a9af690a8
@@ -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.2.9
11
- - 2.3.8
12
- - 2.4.5
13
- - 2.5.3
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.5.0
23
- - rvm: 2.5.3
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.5.3
25
+ - rvm: "2.6"
27
26
  env: TEST_TASK=rubocop
28
- - rvm: jruby-9.1.5.0
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
- - rvm: 2.5.3
34
+
35
+ - rvm: "2.6"
32
36
  env: influx_version=1.0.2 pkghash=88f6c30fec2c6e612e802e23b9161fdfc7c5c29f6be036f0376326445aff0037
33
- - rvm: 2.5.3
34
- env: influx_version=1.1.0 pkghash=f1520a2e18e0ab47e8a8810671e07d5a47960e54f7553b78bebe7d3c7594742f
35
- - rvm: 2.5.3
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.5.3
38
- env: influx_version=1.3.6 pkghash=6406cdd21466bcb832b967078adaa9f07cb6ae524a6579c15141692031f5f840
39
- - rvm: 2.5.3
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.5.3
42
- env: influx_version=1.5.2 pkghash=42fede7b497bdf30d4eb5138db218d1add986fca4fce4a8bcd9c7d6dabaf572a
43
- - rvm: 2.5.3
44
- env: influx_version=1.6.1 pkghash=a833ac16890182a75983c61e5fe6471ae27cbab7984d7b7361034887b7428de2
45
- - rvm: 2.5.3
46
- env: influx_version=1.7.0 pkghash=0615a395b3f8e68455b0a8a2584d00ff8694f62caf77468900f7cf0a77f2b8be
47
- - rvm: 2.5.3
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
@@ -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.4.0, this gem requires Ruby >= 2.2.0. Support for MRI < 2.2 is
43
- still available in the v0.3.x series, see [stable-03 branch](https://github.com/influxdata/influxdb-ruby/tree/stable-03)
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
@@ -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", "~> 1.3"
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.60.0"
24
+ spec.add_development_dependency "rubocop", "~> 0.61.1"
25
25
  spec.add_development_dependency "webmock", "~> 3.0"
26
26
  end
@@ -13,6 +13,7 @@ module InfluxDB
13
13
  def dump
14
14
  dump = @series.dup
15
15
  dump << ",#{@tags}" if @tags
16
+ dump << " ".freeze if dump[-1] == "\\"
16
17
  dump << " #{@values}"
17
18
  dump << " #{@timestamp}" if @timestamp
18
19
  dump
@@ -1,3 +1,3 @@
1
1
  module InfluxDB # :nodoc:
2
- VERSION = "0.6.4".freeze
2
+ VERSION = "0.7.0".freeze
3
3
  end
@@ -1,7 +1,10 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe InfluxDB::Client do
4
- let(:client) { described_class.new(udp: { host: "localhost", port: 44_444 }) }
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 = s.recvfrom(30).first
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: 44_444 },
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
- s.close
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 << (RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.5.0" ? "~" : "%7E")
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.6.4
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: 2018-12-02 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
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.60.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.60.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.7.6
171
+ rubygems_version: 2.6.13
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Ruby library for InfluxDB.