nats 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/HISTORY.md +1 -0
- data/README.md +13 -9
- data/lib/nats/client.rb +3 -0
- data/lib/nats/version.rb +1 -1
- data/nats.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8f530fc702ac09e68eab88e1c14f1765640f39231d1d359e330396eecbbb6540
|
4
|
+
data.tar.gz: aeb4c366f71b70e16e636e13e0a0267239e9a654999dc7ab82a9c6f2d8ae720e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7664e44a5c309ca972a694eccb35ef201b448ea970a19b1e202059adc611e104b95c3659f2a217743b76baf100e890921e15c5b6808b00bc6895d9a1a63c9392
|
7
|
+
data.tar.gz: 54671440f1400fde1bb56ed99380e45853fa0ab71c0125f89c66846cd23e475c4d49869b5272e55a95b5b8685a4ed76e96248b8b59315cf6033c0f917e76c88d
|
data/HISTORY.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
- Add discovered servers helper for servers announced via async INFO (#136)
|
6
6
|
- Add time based reconnect backoff (#139)
|
7
7
|
- Modify lang sent on connect when using jruby (#135)
|
8
|
+
- Update eventmachine dependencies (#134)
|
8
9
|
|
9
10
|
## v0.8.0 (August 10, 2016)
|
10
11
|
- Added cluster auto discovery handling which is supported on v0.9.2 server release (#125)
|
data/README.md
CHANGED
@@ -3,14 +3,16 @@
|
|
3
3
|
A [Ruby](http://ruby-lang.org) client for the [NATS messaging system](https://nats.io).
|
4
4
|
|
5
5
|
[](http://opensource.org/licenses/MIT)
|
6
|
-
[](http://travis-ci.org/nats-io/ruby-nats) [](http://travis-ci.org/nats-io/ruby-nats) [](https://rubygems.org/gems/nats/versions/0.8.4) [](http://www.rubydoc.info/github/nats-io/ruby-nats)
|
7
7
|
|
8
8
|
## Supported Platforms
|
9
9
|
|
10
10
|
This gem and the client are known to work on the following Ruby platforms:
|
11
11
|
|
12
|
-
- MRI
|
13
|
-
- JRuby 9.1.2.0
|
12
|
+
- MRI 2.2, 2.3.0, 2.4.0, 2.5.0
|
13
|
+
- JRuby 9.1.2.0, 9.1.15.0
|
14
|
+
|
15
|
+
If you're looking for a non-EventMachine alternative, check out the [nats-pure](https://github.com/nats-io/pure-ruby-nats) gem.
|
14
16
|
|
15
17
|
## Getting Started
|
16
18
|
|
@@ -106,10 +108,11 @@ end
|
|
106
108
|
|
107
109
|
### Auto discovery
|
108
110
|
|
109
|
-
Starting from release `0.8.0` of the gem, the client also auto
|
110
|
-
new nodes announced by the server as they attach to the
|
111
|
-
Reconnection logic parameters such as time to back-off on
|
112
|
-
apply the same to both discovered nodes and
|
111
|
+
Starting from release `0.8.0` of the gem, the client also auto
|
112
|
+
discovers new nodes announced by the server as they attach to the
|
113
|
+
cluster. Reconnection logic parameters such as time to back-off on
|
114
|
+
failure and max attempts apply the same to both discovered nodes and
|
115
|
+
those defined explicitly on connect:
|
113
116
|
|
114
117
|
```ruby
|
115
118
|
opts = {
|
@@ -155,7 +158,8 @@ NATS.connect { NATS.publish('test', 'Hello World!') }
|
|
155
158
|
|
156
159
|
### TLS
|
157
160
|
|
158
|
-
Advanced customizations options for setting up a secure connection can
|
161
|
+
Advanced customizations options for setting up a secure connection can
|
162
|
+
be done by including them on connect:
|
159
163
|
|
160
164
|
```ruby
|
161
165
|
options = {
|
@@ -212,7 +216,7 @@ See examples and benchmarks for more information..
|
|
212
216
|
|
213
217
|
(The MIT License)
|
214
218
|
|
215
|
-
Copyright (c) 2010-
|
219
|
+
Copyright (c) 2010-2018 Derek Collison
|
216
220
|
|
217
221
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
218
222
|
of this software and associated documentation files (the "Software"), to
|
data/lib/nats/client.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'securerandom'
|
3
|
+
require 'openssl' unless defined?(OpenSSL)
|
3
4
|
|
4
5
|
ep = File.expand_path(File.dirname(__FILE__))
|
5
6
|
|
@@ -111,6 +112,8 @@ module NATS
|
|
111
112
|
opts[:ssl] = ENV['NATS_SSL'].downcase == 'true' unless ENV['NATS_SSL'].nil?
|
112
113
|
opts[:max_reconnect_attempts] = ENV['NATS_MAX_RECONNECT_ATTEMPTS'].to_i unless ENV['NATS_MAX_RECONNECT_ATTEMPTS'].nil?
|
113
114
|
opts[:reconnect_time_wait] = ENV['NATS_RECONNECT_TIME_WAIT'].to_i unless ENV['NATS_RECONNECT_TIME_WAIT'].nil?
|
115
|
+
opts[:name] ||= ENV['NATS_CONNECTION_NAME']
|
116
|
+
|
114
117
|
|
115
118
|
opts[:ping_interval] = ENV['NATS_PING_INTERVAL'].to_i unless ENV['NATS_PING_INTERVAL'].nil?
|
116
119
|
opts[:max_outstanding_pings] = ENV['NATS_MAX_OUTSTANDING_PINGS'].to_i unless ENV['NATS_MAX_OUTSTANDING_PINGS'].nil?
|
data/lib/nats/version.rb
CHANGED
data/nats.gemspec
CHANGED
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.require_paths = ['lib']
|
22
22
|
s.bindir = 'bin'
|
23
|
-
s.executables = ['nats-pub', 'nats-sub', 'nats-queue', 'nats-
|
23
|
+
s.executables = ['nats-pub', 'nats-sub', 'nats-queue', 'nats-request']
|
24
24
|
|
25
25
|
s.files = %w[
|
26
26
|
COPYING
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Collison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -38,7 +38,6 @@ executables:
|
|
38
38
|
- nats-pub
|
39
39
|
- nats-sub
|
40
40
|
- nats-queue
|
41
|
-
- nats-top
|
42
41
|
- nats-request
|
43
42
|
extensions: []
|
44
43
|
extra_rdoc_files: []
|
@@ -90,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
89
|
version: '0'
|
91
90
|
requirements: []
|
92
91
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.7.3
|
94
93
|
signing_key:
|
95
94
|
specification_version: 4
|
96
95
|
summary: NATS is an open-source, high-performance, lightweight cloud messaging system.
|