Permalink
Browse files

strip variables to prevent invalid URLs

  • Loading branch information...
kronn committed Mar 2, 2011
1 parent fe7e21e commit b050fdb853c767189d82603ff138081738f839b0
Showing with 4 additions and 4 deletions.
  1. +4 −4 services/travis_ci.rb
View
@@ -1,9 +1,9 @@
service :travis_ci do |data, payload|
user = data['user'] || payload['repository']['owner']['name']
token = data['token']
domain = data['domain'] || 'http://travis-ci.org'
user = (data['user'] || payload['repository']['owner']['name']).strip
token = (data['token']).strip
domain = (data['domain'] || 'http://travis-ci.org').strip
scheme = domain.to_s.scan(/^https?/).pop || 'http'
scheme = (domain.to_s.scan(/^https?/).pop || 'http').strip
travis_url = URI.parse("#{scheme}://#{user}:#{token}@#{domain}/builds")

0 comments on commit b050fdb

Please sign in to comment.