nsq-ruby 2.0.5 → 2.1.0

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: 75fe2c17097cac238a13e0c784c10178234aa0ba
4
- data.tar.gz: 830a7e15cc355dc436ee985d6e0e436954088b14
3
+ metadata.gz: ec0a2c4e5a3d5760baeed6bd367ee0a862f26867
4
+ data.tar.gz: cc3907855851ddfb2aa67ae6b2b061b1e0a88740
5
5
  SHA512:
6
- metadata.gz: 833b00efbf86bd95efbe65f1125d1cd126419e926cc37dd0bdc4731d1b8f8839dd86dd53f811246ac4e9e397f5cdb3ab735a33ef9c4caa6ee725c0071f51b05c
7
- data.tar.gz: 4a7f4889f04a893d5fc7d3fa123d8d89b1eb6bc32b98574f67ec10dbb078801bb3d249f1fd39d63e8934919c958639ecfb4fabde4af2bc75719b746a46b85950
6
+ metadata.gz: 9f404d3b90fbf3bb069b9ad90739c695f565295724630f78251a835774bcc3c773570130efe220aec7e8e7d5ff48e1880e9a48eb4b4abec4e0fe6d00a1321768
7
+ data.tar.gz: 1a6c23c5644bf488964fe405b9f827b61062be8964c566af3e9522c7d56c483f517148958ec50544c922aa6cd42dccb44281bf5241a9ac6fdca0834621390568
data/README.md CHANGED
@@ -7,6 +7,8 @@ nsq-ruby is a simple NSQ client library written in Ruby.
7
7
  - It's well tested.
8
8
  - It's being used in production and has processed billions of messages.
9
9
 
10
+ [![Build Status](https://travis-ci.org/wistia/nsq-ruby.svg?branch=master)](https://travis-ci.org/wistia/nsq-ruby)
11
+
10
12
 
11
13
  ## Quick start
12
14
 
@@ -376,6 +378,7 @@ millions of messages a day.
376
378
  - Unbekandt Léo ([@soulou](https://github.com/Soulou))
377
379
  - Matthias Schneider ([@mschneider82](https://github.com/mschneider82))
378
380
  - Lukas Eklund ([@leklund](https://github.com/leklund))
381
+ - Paco Guzmán ([@pacoguzman](https://github.com/pacoguzman))
379
382
 
380
383
 
381
384
  ## MIT License
@@ -403,7 +403,6 @@ module Nsq
403
403
 
404
404
  # Let's do this thing
405
405
  attempts = 0
406
- start_time = Time.now
407
406
 
408
407
  begin
409
408
  attempts += 1
@@ -440,7 +439,7 @@ module Nsq
440
439
  def server_needs_rdy_re_ups?
441
440
  # versions less than 0.3.0 need RDY re-ups
442
441
  # see: https://github.com/bitly/nsq/blob/master/ChangeLog.md#030---2014-11-18
443
- major, minor, patch = @server_version.split('.').map(&:to_i)
442
+ major, minor = @server_version.split('.').map(&:to_i)
444
443
  major == 0 && minor <= 2
445
444
  end
446
445
 
@@ -78,9 +78,11 @@ module Nsq
78
78
  begin
79
79
  body = Net::HTTP.get(uri)
80
80
  data = JSON.parse(body)
81
+ producers = data['producers'] || # v1.0.0-compat
82
+ (data['data'] && data['data']['producers'])
81
83
 
82
- if data['data'] && data['data']['producers']
83
- data['data']['producers'].map do |producer|
84
+ if producers
85
+ producers.map do |producer|
84
86
  "#{producer['broadcast_address']}:#{producer['tcp_port']}"
85
87
  end
86
88
  else
@@ -1,8 +1,8 @@
1
1
  module Nsq
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 0
5
- PATCH = 5
4
+ MINOR = 1
5
+ PATCH = 0
6
6
  BUILD = nil
7
7
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nsq-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wistia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-29 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.1'
47
+ version: '2.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.1'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement