nats 0.5.0 → 0.5.1

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
  SHA1:
3
- metadata.gz: 854c4efd26b49d2deb4bf7a193d4772e94e2a4aa
4
- data.tar.gz: ec49fc499a9e7a5ea0358c302715846320d0ecb4
3
+ metadata.gz: bdd90752229d1b9e8958d4a29b02951ce3107d93
4
+ data.tar.gz: 0f7ddb25822e6be88d025d8a1ab200470b7c5a2f
5
5
  SHA512:
6
- metadata.gz: e23d8a54b39f792851d216223923ee01c4e32870f4ebebd757c8d9eb7f61c89b57d0ec5ed811899550df5d97f7076aef5dd41b2c4d65a3239a61e18fbc80d8c7
7
- data.tar.gz: 436d5d9485298a9257bd5d0ad248f483d0e1ba09a1464559e18c7526f28f5f100ed4951043879a562112fc794a88e4302b1a4089269f3e5a1f1bfb074a2f39f3
6
+ metadata.gz: c0543c590534e277b2b95077d564acdc0055478e04655fa24030022f34bd14bd0a7fd5450288c89984106f0832d68088053fdec3555a3f6bf6c4f0630efdfb2c
7
+ data.tar.gz: 9207aac064c91db634a100a01f482696ffa0362ce257ab44661c921b9fab408206009fc082fd20ade7c67521c625b36ae1a7d1d278c8d70b6645177b9687f5cd
data/README.md CHANGED
@@ -83,7 +83,7 @@ NATS.subscribe(subject, :queue => 'job.workers') { |msg| puts "Received '#{msg}'
83
83
  NATS.start(:servers => ['nats://127.0.0.1:4222', 'nats://127.0.0.1:4223'] do |c|
84
84
  puts "NATS is connected to #{c.connected_server}"
85
85
  c.on_reconnect do
86
- puts "Reconnected to server at #{c.connected_server}
86
+ puts "Reconnected to server at #{c.connected_server}"
87
87
  end
88
88
  end
89
89
 
@@ -91,7 +91,7 @@ opts = {
91
91
  :dont_randomize_servers => true,
92
92
  :reconnect_time_wait => 0.5,
93
93
  :max_reconnect_attempts = 10,
94
- :servers => ['nats://127.0.0.1:4222', 'nats://127.0.0.1:4223', 'nats://127.0.0.1:4224]
94
+ :servers => ['nats://127.0.0.1:4222', 'nats://127.0.0.1:4223', 'nats://127.0.0.1:4224']
95
95
  }
96
96
 
97
97
  NATS.connect(opts) do |c|
data/lib/nats/client.rb CHANGED
@@ -9,7 +9,7 @@ require "#{ep}/ext/json"
9
9
 
10
10
  module NATS
11
11
 
12
- VERSION = "0.5.0".freeze
12
+ VERSION = "0.5.1".freeze
13
13
 
14
14
  DEFAULT_PORT = 4222
15
15
  DEFAULT_URI = "nats://localhost:#{DEFAULT_PORT}".freeze
@@ -791,7 +791,7 @@ module NATS
791
791
  # Dump the one we were trying if it wasn't connected
792
792
  current = server_pool.shift
793
793
  # FIXME(dlc) - Should we remove from the list on error?
794
- server_pool << current if (current && can_reuse_server?(current) && !current[:error_received])
794
+ server_pool << current if (current && (options[:max_reconnect_attempts] < 0 || can_reuse_server?(current) && !current[:error_received]))
795
795
  # If we are out of options, go ahead and disconnect.
796
796
  process_disconnect and return if server_pool.empty?
797
797
  # bind new one
@@ -1,7 +1,7 @@
1
1
 
2
2
  module NATSD #:nodoc:
3
3
 
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  APP_NAME = 'nats-server'
6
6
 
7
7
  DEFAULT_PORT = 4222
data/nats.gemspec CHANGED
@@ -17,7 +17,7 @@ spec = Gem::Specification.new do |s|
17
17
  s.authors = ['Derek Collison']
18
18
  s.email = ['derek.collison@gmail.com']
19
19
 
20
- s.add_dependency('eventmachine', '~> 1.0', '>= 1.0.7')
20
+ s.add_dependency('eventmachine', '~> 1.0', '= 1.0.7')
21
21
  s.add_dependency('json_pure', '~> 1.8', '>= 1.8.1')
22
22
  s.add_dependency('daemons', '~> 1.1', '>= 1.2.2')
23
23
  s.add_dependency('thin', '~> 1.6', '>= 1.6.3')
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Collison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.0'
20
- - - ">="
20
+ - - '='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.7
23
23
  type: :runtime
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
29
  version: '1.0'
30
- - - ">="
30
+ - - '='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.7
33
33
  - !ruby/object:Gem::Dependency