Permalink
Browse files

check trailing slash

  • Loading branch information...
1 parent 341351a commit 283cd8697c404313ca62b3d4066505edd9f715d7 @masaki masaki committed Nov 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/ikachan/message.rb
View
@@ -11,7 +11,9 @@ def message
instance = Java::jenkins::model::Jenkins.instance
root_url = (instance && instance.root_url) || ''
- msg << " (#{root_url}/#{build.url})"
+
+ url = [ root_url, build.url ].join(root_url[-1] == '/' ? '' : '/')
+ msg << " (#{url})"
"\x03%s%s" % [code.to_s, msg]
end

0 comments on commit 283cd86

Please sign in to comment.