influxdb-client 1.17.0.pre.2922 → 1.18.0.pre.3131

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
2
  SHA256:
3
- metadata.gz: daff4d53ef5a1db583b79aaf2cbd3576b1f18f3994fd8bb4f0fdd3e1aa5e38d5
4
- data.tar.gz: d706d7ca9d5adbb2dfd47e8600a069ace3fcc4c4c03139ba7115b6c67452f551
3
+ metadata.gz: 73bf8b9baedd893accddf4d4a1523f33cf08402266d777ca65505425f087932d
4
+ data.tar.gz: 669fc3647f594bc35e7e986681d124205a48cfcae3442c30ac02f38e4527b97c
5
5
  SHA512:
6
- metadata.gz: 5fb240eb8fc015e859fc82cc0c510b0376f797bdde86e2f452d33b2eefb037f8d577af54a042b8c240c65b194fbed7d21112ea3652ae0d846f3f6e3980bf0754
7
- data.tar.gz: 13bf21d089edd3f0e2a51576e107b32a56c66015030529de66af4d5cf1ec9dde98e19e7c76ad18f0b9c185248e4a04306edb3b2c873d85223b43b603afccba1a
6
+ metadata.gz: faa26cfa1227c175a181a5a8b07f4d4bae703370a9e156db962a16fab59d8e068b85ee7baf00b3d77dd5ddb9f5db2ba7400009aefcc302f4655cca3412113cdd
7
+ data.tar.gz: 321a5771affde50b2ebba68fed2bde826840f904b3a8f92c60885974d60adf57e260a207fe6cc15501c24ccee9a5eca4b39f91945f124e345d0487adf66e9c56
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## 1.17.0 [unreleased]
1
+ ## 1.18.0 [unreleased]
2
+
3
+ ## 1.17.0 [2021-08-20]
4
+
5
+ ### Bug Fixes
6
+ 1. [#87](https://github.com/influxdata/influxdb-client-ruby/pull/87): Parsing infinite numbers
2
7
 
3
8
  ## 1.16.0 [2021-07-09]
4
9
 
data/README.md CHANGED
@@ -26,6 +26,15 @@ This repository contains the reference Ruby client for the InfluxDB 2.0.
26
26
  - [Contributing](#contributing)
27
27
  - [License](#license)
28
28
 
29
+ ## Documentation
30
+
31
+ This section contains links to the client library documentation.
32
+
33
+ * [Product documentation](https://docs.influxdata.com/influxdb/v2.0/api-guide/client-libraries/), [Getting Started](#installation)
34
+ * [Examples](examples)
35
+ * [API Reference](https://influxdata.github.io/influxdb-client-ruby/InfluxDB2.html)
36
+ * [Changelog](CHANGELOG.md)
37
+
29
38
  ## Features
30
39
 
31
40
  InfluxDB 2.0 client consists of two packages
@@ -54,13 +63,13 @@ The client can be installed manually or with bundler.
54
63
  To install the client gem manually:
55
64
 
56
65
  ```
57
- gem install influxdb-client -v 1.16.0
66
+ gem install influxdb-client -v 1.17.0
58
67
  ```
59
68
 
60
69
  For management API:
61
70
 
62
71
  ```
63
- gem install influxdb-client-apis -v 1.16.0
72
+ gem install influxdb-client-apis -v 1.17.0
64
73
  ```
65
74
 
66
75
  ## Usage
@@ -240,7 +240,14 @@ module InfluxDB2
240
240
  when 'unsignedLong', 'long', 'duration'
241
241
  str_val.to_i
242
242
  when 'double'
243
- str_val.to_f
243
+ case str_val
244
+ when '+Inf'
245
+ Float::INFINITY
246
+ when '-Inf'
247
+ -Float::INFINITY
248
+ else
249
+ str_val.to_f
250
+ end
244
251
  when 'base64Binary'
245
252
  Base64.decode64(str_val)
246
253
  when 'dateTime:RFC3339', 'dateTime:RFC3339Nano'
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module InfluxDB2
22
- VERSION = '1.17.0'.freeze
22
+ VERSION = '1.18.0'.freeze
23
23
  end
@@ -1,4 +1,4 @@
1
- # The MIT License
1
+ # The MIT
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -166,7 +166,7 @@ class FluxCsvParserTest < MiniTest::Test
166
166
  "#default,mean,,,,,,,,,,,\n" \
167
167
  ",result,table,_start,_stop,_time,_value,_field,_measurement,language,license,name,owner\n" \
168
168
  ',,0,2020-11-02T07:29:49.55050738Z,2020-12-02T07:29:49.55050738Z,2020-11-02T09:00:00Z,9,' \
169
- "stars,github_repository,Ruby,MIT License,influxdb-client-ruby,influxdata\n"
169
+ "stars,gh,Ruby,MIT,influxdb-client-ruby,influxdata\n"
170
170
 
171
171
  tables = InfluxDB2::FluxCsvParser.new(data).parse.tables
172
172
  records = tables[0].records
@@ -464,4 +464,29 @@ class FluxCsvParserErrorTest < MiniTest::Test
464
464
  assert_equal true, tables[0].columns[2].group
465
465
  assert_equal 1, tables[1].records.size
466
466
  end
467
+
468
+ def test_parse_infinity
469
+ data = '#group,false,false,true,true,true,true,true,true,true,true,false,false
470
+ #datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double
471
+ #default,_result,,,,,,,,,,,
472
+ ,result,table,_start,_stop,_field,_measurement,language,license,name,owner,le,_value
473
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,0,0
474
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,10,0
475
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,20,0
476
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,30,0
477
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,40,0
478
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,50,0
479
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,60,0
480
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,70,0
481
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,80,0
482
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,90,0
483
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,+Inf,15
484
+ ,,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,gh,C#,MIT,ruby,influxdata,-Inf,15'
485
+
486
+ tables = InfluxDB2::FluxCsvParser.new(data).parse.tables
487
+ assert_equal 1, tables.size
488
+ assert_equal 12, tables[0].records.size
489
+ assert_equal tables[0].records[10].values['le'], Float::INFINITY
490
+ assert_equal tables[0].records[11].values['le'], -Float::INFINITY
491
+ end
467
492
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: influxdb-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0.pre.2922
4
+ version: 1.18.0.pre.3131
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Bednar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler