influxdb-client 1.0.0.pre.52 → 1.0.0.pre.100

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
- SHA1:
3
- metadata.gz: 77a3348a07712d159ec88ae8ed19d4acfff43ae2
4
- data.tar.gz: 8b15aa9a19517801f11b425c7ee76af72455f290
2
+ SHA256:
3
+ metadata.gz: af9a8c5ca8d1c35e286e83210d5b7061af6a3377dd6805b589548636f979e6c1
4
+ data.tar.gz: fe71919d4a1f5cc370bf00d4b0b67f926a08346278caeeae8f0f741742e9a841
5
5
  SHA512:
6
- metadata.gz: a1d422230a7e8b12a78d45dfe4c60699191b420aebe305e6de6a8be03659676ce616a3192259c45d682f827da505a69ba777ec6287dfa3da6c36b47f67ff1731
7
- data.tar.gz: 41096bf0e2a42e0b8af3f4fd57d5fba0b3ca23f4ccaa6d8aab96e5da453311517e05cd83738650d8f66396ca1d2dbc29ea37393a84127f53cb5fcdf45d15188f
6
+ metadata.gz: ed6dec7435b0c568dad08516ef56fa691cf6d7f63ed4f475c106687f14027720f5c6fb09b32831e1e47e9d997987d2fd0be124be7adf1089adbd3bf0ff26f0fc
7
+ data.tar.gz: d2f2c48d7d7d0fe07009eac23740a71ef3e6ea7a196b6a73220f3f02a35e926cc293f508b0f1bcc958be54a813dccc1a7ab241b215fdf1baef73e465bbcdb5be
@@ -23,22 +23,26 @@
23
23
  version: 2.1
24
24
 
25
25
  commands:
26
- influxdb-restart:
26
+ influxdb-onboarding:
27
27
  steps:
28
28
  - run:
29
- name: "Start InfluxDB 2"
30
- command: ./bin/influxdb-restart.sh
29
+ name: "Post onBoarding request to InfluxDB 2"
30
+ command: ./bin/influxdb-onboarding.sh
31
31
  prepare:
32
32
  description: "Prepare environment to tests"
33
33
  steps:
34
34
  - checkout
35
- - influxdb-restart
35
+ - influxdb-onboarding
36
36
  test:
37
+ parameters:
38
+ ruby-image:
39
+ type: string
37
40
  steps:
38
41
  - restore_cache:
39
42
  name: Restoring Gem Cache
40
43
  keys:
41
- - &cache-key gem-cache-{{ checksum "influxdb-client.gemspec" }}
44
+ - &cache-key gem-cache-{{ checksum "influxdb-client.gemspec" }}-<< parameters.ruby-image >>
45
+ - gem-cache-{{ checksum "influxdb-client.gemspec" }}
42
46
  - gem-cache-
43
47
  - run:
44
48
  name: Install dependencies
@@ -67,14 +71,23 @@ commands:
67
71
 
68
72
  jobs:
69
73
  tests-ruby:
70
- machine: true
74
+ parameters:
75
+ ruby-image:
76
+ type: string
77
+ default: &default-ruby-image "circleci/ruby:2.6-stretch"
78
+ docker:
79
+ - image: << parameters.ruby-image >>
80
+ - image: &influx-image quay.io/influxdb/influx:nightly
71
81
  steps:
72
82
  - prepare
73
- - test
83
+ - test:
84
+ ruby-image: << parameters.ruby-image >>
74
85
  - storing-test-results
75
86
 
76
87
  deploy-preview:
77
- machine: true
88
+ docker:
89
+ - image: *default-ruby-image
90
+ - image: *influx-image
78
91
  steps:
79
92
  - run:
80
93
  name: Early return if this build is from a forked repository
@@ -99,10 +112,19 @@ workflows:
99
112
  version: 2
100
113
  build:
101
114
  jobs:
102
- - tests-ruby
115
+ - tests-ruby:
116
+ name: ruby-2.6
117
+ - tests-ruby:
118
+ name: ruby-2.5
119
+ ruby-image: "circleci/ruby:2.5-stretch"
120
+ - tests-ruby:
121
+ name: ruby-2.4
122
+ ruby-image: "circleci/ruby:2.4-stretch"
103
123
  - deploy-preview:
104
124
  requires:
105
- - tests-ruby
125
+ - ruby-2.6
126
+ - ruby-2.5
127
+ - ruby-2.4
106
128
  filters:
107
129
  branches:
108
130
  only: master
@@ -0,0 +1,5 @@
1
+ ## 1.0.0 [unreleased]
2
+
3
+ ### Features
4
+ 1. [#4](https://github.com/bonitoo-io/influxdb-client-ruby/pull/4): Added WriteApi that will be used for Fluentd plugin
5
+
File without changes
data/README.md CHANGED
@@ -13,7 +13,7 @@ This repository contains the reference Ruby client for the InfluxDB 2.0.
13
13
 
14
14
  ## Installation
15
15
 
16
- The InfluxDB 2 client is bundled as a gem and is hosted on [Rubygems](https://rubygems.org/gems/mongo).
16
+ The InfluxDB 2 client is bundled as a gem and is hosted on [Rubygems](https://rubygems.org/gems/influxdb-client).
17
17
 
18
18
  ### Install the Gem
19
19
 
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # The MIT License
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+ #
23
+
24
+ set -e
25
+
26
+ echo "Wait to start InfluxDB 2.0"
27
+ wget -S --spider --tries=20 --retry-connrefused --waitretry=5 http://localhost:9999/metrics
28
+
29
+ echo
30
+ echo "Post onBoarding request, to setup initial user (my-user@my-password), org (my-org) and bucketSetup (my-bucket)"
31
+ echo
32
+ curl -i -X POST http://localhost:9999/api/v2/setup -H 'accept: application/json' \
33
+ -d '{
34
+ "username": "my-user",
35
+ "password": "my-password",
36
+ "org": "my-org",
37
+ "bucket": "my-bucket",
38
+ "token": "my-token"
39
+ }'
@@ -30,6 +30,8 @@ DEFAULT_INFLUXDB_V2_VERSION="nightly"
30
30
  INFLUXDB_V2_VERSION="${INFLUXDB_V2_VERSION:-$DEFAULT_INFLUXDB_V2_VERSION}"
31
31
  INFLUXDB_V2_IMAGE=${DOCKER_REGISTRY}influx:${INFLUXDB_V2_VERSION}
32
32
 
33
+ SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
34
+
33
35
  docker kill influxdb_v2 || true
34
36
  docker rm influxdb_v2 || true
35
37
  docker network rm influx_network || true
@@ -50,17 +52,7 @@ docker run \
50
52
  --publish 9999:9999 \
51
53
  "${INFLUXDB_V2_IMAGE}"
52
54
 
53
- echo "Wait to start InfluxDB 2.0"
54
- wget -S --spider --tries=20 --retry-connrefused --waitretry=5 http://localhost:9999/metrics
55
-
56
- echo
57
- echo "Post onBoarding request, to setup initial user (my-user@my-password), org (my-org) and bucketSetup (my-bucket)"
58
- echo
59
- curl -i -X POST http://localhost:9999/api/v2/setup -H 'accept: application/json' \
60
- -d '{
61
- "username": "my-user",
62
- "password": "my-password",
63
- "org": "my-org",
64
- "bucket": "my-bucket",
65
- "token": "my-token"
66
- }'
55
+ #
56
+ # Post onBoarding request to InfluxDB 2
57
+ #
58
+ "${SCRIPT_PATH}"/influxdb-onboarding.sh
@@ -31,8 +31,8 @@ module InfluxDB
31
31
  # InfluxDBClient::Client.new(url: 'http://localhost:9999', token: 'my-token')
32
32
  #
33
33
  # @param [Hash] options The options to be used by the client.
34
- # @param [String] url InfluxDB server API url (ex. http://localhost:9999).
35
- # @param [String] token authentication token
34
+ # @param [String] url InfluxDB URL to connect to (ex. http://localhost:9999).
35
+ # @param [String] token Access Token used for authenticating/authorizing the InfluxDB request sent by client.
36
36
  #
37
37
  # @option options [String] :bucket the default destination bucket for writes
38
38
  # @option options [String] :org the default organization bucket for writes
@@ -48,7 +48,7 @@ module InfluxDB
48
48
  @options[:token] = token if token.is_a? String
49
49
  @closed = false
50
50
 
51
- at_exit { close }
51
+ at_exit { close! }
52
52
  end
53
53
 
54
54
  # Write time series data into InfluxDB thought WriteApi.
@@ -61,7 +61,7 @@ module InfluxDB
61
61
  # Close all connections into InfluxDB 2.
62
62
  #
63
63
  # @return [ true ] Always true.
64
- def close
64
+ def close!
65
65
  @closed = true
66
66
  true
67
67
  end
@@ -55,8 +55,8 @@ class ClientTest < Minitest::Test
55
55
  def test_close
56
56
  client = InfluxDB::Client.new('http://localhost:9999', 'my-token')
57
57
 
58
- assert_equal true, client.close
59
- assert_equal true, client.close
58
+ assert_equal true, client.close!
59
+ assert_equal true, client.close!
60
60
  end
61
61
 
62
62
  def test_get_write_api
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.0.0.pre.52
4
+ version: 1.0.0.pre.100
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Bednar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2020-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -134,10 +134,12 @@ files:
134
134
  - ".github/PULL_REQUEST_TEMPLATE"
135
135
  - ".gitignore"
136
136
  - ".rubocop.yml"
137
+ - CHANGELOG.md
137
138
  - Gemfile
138
- - LICENSE.txt
139
+ - LICENSE
139
140
  - README.md
140
141
  - Rakefile
142
+ - bin/influxdb-onboarding.sh
141
143
  - bin/influxdb-restart.sh
142
144
  - influxdb-client.gemspec
143
145
  - lib/influxdb/client.rb
@@ -173,8 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
175
  - !ruby/object:Gem::Version
174
176
  version: 1.3.1
175
177
  requirements: []
176
- rubyforge_project:
177
- rubygems_version: 2.6.13
178
+ rubygems_version: 3.0.3
178
179
  signing_key:
179
180
  specification_version: 4
180
181
  summary: Ruby library for InfluxDB 2.