fraggle 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fraggle.rb +1 -14
- metadata +2 -2
data/lib/fraggle.rb
CHANGED
@@ -7,20 +7,7 @@ module Fraggle
|
|
7
7
|
extend Logger
|
8
8
|
|
9
9
|
def self.connect(uri, *args)
|
10
|
-
|
11
|
-
addrs = []
|
12
|
-
|
13
|
-
params.each do |param|
|
14
|
-
k, v = param.split("=")
|
15
|
-
if k == "ca" && v =~ /^[\d.]+:\d+$/
|
16
|
-
addrs << v
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
if addrs.empty?
|
21
|
-
fail "The URI (#{uri}) does not contain valid addresses"
|
22
|
-
end
|
23
|
-
|
10
|
+
addrs = addrs_for(uri)
|
24
11
|
host, port = addrs.first.split(":")
|
25
12
|
c = EM.connect(host, port, Client, addrs, *args)
|
26
13
|
Snap.new(0, c)
|