<commit_before>service :travis_ci do |data, payload|
  user = data['user'] || payload['repository']['owner']['name']
  token = data['token']
  domain = data['domain'] || 'http://travis-ci.org'

  scheme = domain.to_s.scan(/^https?/).pop || 'http'

  travis_url = URI.parse("#{scheme}://#{user}:#{token}@#{domain}/builds")

  Net::HTTP.post_form(travis_url, :payload => JSON.generate(payload))
  nil
end
<commit_msg>strip variables to prevent invalid URLs<commit_after>service :travis_ci do |data, payload|
  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').strip

  travis_url = URI.parse("#{scheme}://#{user}:#{token}@#{domain}/builds")

  Net::HTTP.post_form(travis_url, :payload => JSON.generate(payload))
  nil
end

{'fraction_non_alphanumeric': 0.22747747747747749, 'fraction_numerical': 0.0, 'mean_word_length': 5.442028985507246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4081487', 'n_tokens_mistral': 311, 'n_tokens_neox': 317, 'n_words': 51}