You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/amq/uri.rb
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,9 @@ class URI
31
31
32
32
defself.parse(connection_string)
33
33
uri= ::URI.parse(connection_string)
34
-
raiseArgumentError.new("Connection URI must use amqp or amqps schema (example: amqp://bus.megacorp.internal:5766), learn more at http://bit.ly/ks8MXK")unless%w{amqpamqps}.include?(uri.scheme)
34
+
unless%w{amqpamqps}.include?(uri.scheme)
35
+
raiseArgumentError,"Connection URI must use amqp or amqps schema (example: amqp://bus.megacorp.internal:5766), learn more at http://bit.ly/ks8MXK"
opts[:ssl]=uri.scheme.to_s.downcase =~ /amqps/i# TODO: rename to tls
44
46
ifuri.path =~ %r{^/(.*)}
45
-
raiseArgumentError.new("#{uri} has multiple-segment path; please percent-encode any slashes in the vhost name (e.g. /production => %2Fproduction). Learn more at http://bit.ly/amqp-gem-and-connection-uris")if $1.index('/')
47
+
if $1.index('/')
48
+
raiseArgumentError,"#{uri} has multiple-segment path; please percent-encode any slashes in the vhost name (e.g. /production => %2Fproduction). Learn more at http://bit.ly/amqp-gem-and-connection-uris"
0 commit comments