ignite-client 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -0
- data/lib/ignite/client.rb +6 -2
- data/lib/ignite/version.rb +1 -1
- data/lib/ignite.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 277a2a525c7245552178a032720625ba7a63c14d240209602fcbfa8cab118d97
|
4
|
+
data.tar.gz: 648e9bdfa148eb1f5a45aa0f8b10a62a219c19933c6c03e0d22d84068856b25d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bbbb1683b3871db216a48c340f40daaaf48cd7e12373315efa08a88476e2221d64e13140a13dccaf4b915bd3038f55b5ed1e0123598d842e6b2cb84f9003857
|
7
|
+
data.tar.gz: dbd7de30343a7a771585af080f804c3f4f5f1c049504f3c174ace0fb39e725a2e14d95e3cb0a30359c3a1c13296ba07ca47323fa972bdd2246c6ee8410130728
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -95,6 +95,12 @@ Specify the host and port
|
|
95
95
|
Ignite::Client.new(host: "localhost", port: 10800)
|
96
96
|
```
|
97
97
|
|
98
|
+
Specify the connect timeout [unreleased]
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
Ignite::Client.new(connect_timeout: 3)
|
102
|
+
```
|
103
|
+
|
98
104
|
## Authentication
|
99
105
|
|
100
106
|
For [authentication](https://ignite.apache.org/docs/latest/security/authentication), use:
|
data/lib/ignite/client.rb
CHANGED
@@ -2,8 +2,12 @@ require "ignite"
|
|
2
2
|
|
3
3
|
module Ignite
|
4
4
|
class Client
|
5
|
-
def initialize(host: "localhost", port: 10800, username: nil, password: nil, use_ssl: nil, ssl_params: {})
|
6
|
-
|
5
|
+
def initialize(host: "localhost", port: 10800, username: nil, password: nil, use_ssl: nil, ssl_params: {}, connect_timeout: nil)
|
6
|
+
begin
|
7
|
+
@socket = Socket.tcp(host, port, connect_timeout: connect_timeout, resolv_timeout: connect_timeout)
|
8
|
+
rescue Errno::ETIMEDOUT
|
9
|
+
raise TimeoutError, "Connection timed out"
|
10
|
+
end
|
7
11
|
|
8
12
|
use_ssl = use_ssl.nil? ? (username || password) : use_ssl
|
9
13
|
if use_ssl
|
data/lib/ignite/version.rb
CHANGED
data/lib/ignite.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ignite-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: andrew@ankane.org
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
rubygems_version: 3.2.
|
50
|
+
rubygems_version: 3.2.22
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Ruby client for Apache Ignite
|