krakow 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.2.2
2
+ * Fix `nsqlookupd` attribute in `Consumer` and `Discovery`
3
+
1
4
  ## v0.2.0
2
5
  * Fix the rest of the namespacing issues
3
6
  * Start adding some tests
@@ -12,19 +12,20 @@ module Krakow
12
12
  def initialize(args={})
13
13
  super
14
14
  required! :topic, :channel
15
- optional :host, :port, :nslookupd, :max_in_flight, :backoff_interval, :discovery_interval, :notifier, :connection_features
15
+ optional :host, :port, :nslookupd, :nsqlookupd, :max_in_flight, :backoff_interval, :discovery_interval, :notifier, :connection_features
16
16
  arguments[:max_in_flight] ||= 1
17
17
  arguments[:discovery_interval] ||= 30
18
18
  arguments[:connection_features] ||= {}
19
+ arguments[:nsqlookupd] ||= arguments[:nslookupd]
19
20
  @connections = {}
20
21
  @distribution = Distribution::Default.new(
21
22
  :max_in_flight => max_in_flight,
22
23
  :backoff_interval => backoff_interval
23
24
  )
24
25
  @queue = Queue.new
25
- if(nslookupd)
26
- debug "Connections will be established via lookup #{nslookupd.inspect}"
27
- @discovery = Discovery.new(:nslookupd => nslookupd)
26
+ if(nsqlookupd)
27
+ debug "Connections will be established via lookup #{nsqlookupd.inspect}"
28
+ @discovery = Discovery.new(:nsqlookupd => nsqlookupd)
28
29
  init!
29
30
  every(discovery_interval){ init! }
30
31
  elsif(host && port)
@@ -9,13 +9,13 @@ module Krakow
9
9
 
10
10
  def initialize(args={})
11
11
  super
12
- required! :nslookupd
12
+ required! :nsqlookupd
13
13
  end
14
14
 
15
15
  # topic:: Topic name
16
16
  # Return list of end points with given topic name available
17
17
  def lookup(topic)
18
- result = [nslookupd].flatten.map do |location|
18
+ result = [nsqlookupd].flatten.map do |location|
19
19
  uri = URI.parse(location)
20
20
  uri.path = '/lookup'
21
21
  uri.query = "topic=#{topic}&ts=#{Time.now.to_i}"
@@ -1,5 +1,5 @@
1
1
  module Krakow
2
2
  class Version < Gem::Version
3
3
  end
4
- VERSION = Version.new('0.2.0')
4
+ VERSION = Version.new('0.2.2')
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: krakow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -136,7 +136,6 @@ files:
136
136
  - Gemfile
137
137
  - README.md
138
138
  - krakow.gemspec
139
- - krakow-0.2.0.gem
140
139
  - CHANGELOG.md
141
140
  - Gemfile.lock
142
141
  homepage: http://github.com/chrisroberts/krakow