converse 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,8 @@ require "converse/broker"
2
2
 
3
3
  module Converse
4
4
  class RESTBroker < Broker
5
- attr_accessor :peer_host_and_port
5
+ attr_accessor :host
6
+ attr_accessor :port
6
7
  attr_accessor :username
7
8
  attr_accessor :password
8
9
 
@@ -15,12 +16,19 @@ module Converse
15
16
 
16
17
  def open_topic(concern, action)
17
18
  if (concern.nil? == true or concern == "")
18
- "http://#{@peer_host_and_port}/#{action}"
19
+ "http://#{host_and_port()}/#{action}"
19
20
  else
20
- "http://#{@peer_host_and_port}/#{concern}/#{action}"
21
+ "http://#{host_and_port()}/#{concern}/#{action}"
21
22
  end
22
23
  end
23
24
 
25
+ def host_and_port
26
+ u = ""
27
+ u = u + @host if not @host.nil?
28
+ u = u + ":" + @port if not @port.nil?
29
+ u
30
+ end
31
+
24
32
  def authenticated_by(username)
25
33
  @username = username
26
34
  self
@@ -1,3 +1,3 @@
1
1
  module Converse
2
- VERSION = "1.0.15"
2
+ VERSION = "1.0.16"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: converse
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 15
10
- version: 1.0.15
9
+ - 16
10
+ version: 1.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ernst van Graan