infopark-politics 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -214,7 +214,8 @@ module Politics
214
214
  def find_workers
215
215
  workers = []
216
216
  browser = Net::DNS::MDNSSD.browse(mdns_type) do |reply|
217
- workers << reply.name unless reply.name == uri
217
+ worker_uri = reply.name.gsub(/#/, '.')
218
+ workers << worker_uri unless worker_uri == uri
218
219
  end
219
220
  sleep 5
220
221
  browser.stop
@@ -332,7 +333,7 @@ module Politics
332
333
  @port = URI.parse(DRb.uri).port
333
334
 
334
335
  # Register our DRb server with Bonjour.
335
- name = @uri
336
+ name = @uri.gsub(/\./, '#')
336
337
  domain = "local"
337
338
  log.debug "register service #{name} of type #{mdns_type} within domain #{domain} at port #{@port}"
338
339
  handle = Net::DNS::MDNSSD.register(name, mdns_type, domain, @port) do |reply|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark-politics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham