<commit_before>require 'ostruct'

module ExconSpecHelper

  def http_request(method, uri, options = {}, &block)
    Excon.defaults[:ssl_verify_peer] = false
    uri      = Addressable::URI.heuristic_parse(uri)
    uri      = uri.omit(:userinfo).to_s.gsub(' ', '+')

    options  = options.merge(:method => method) # Dup and merge
    response = Excon.new(uri).request(options, &block)<commit_msg>Use blocking requests in Excon specs to pass on Jruby<commit_after>require 'ostruct'

module ExconSpecHelper

  def http_request(method, uri, options = {}, &block)
    Excon.defaults[:ssl_verify_peer] = false
    uri      = Addressable::URI.heuristic_parse(uri)
    uri      = uri.omit(:userinfo).to_s.gsub(' ', '+')

    options  = options.merge(:method => method, :nonblock => false) # Dup and merge
    response = Excon.new(uri).request(options, &block)
{'fraction_non_alphanumeric': 0.13849765258215962, 'fraction_numerical': 0.0, 'mean_word_length': 4.047337278106509, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '401725', 'n_tokens_mistral': 284, 'n_tokens_neox': 269, 'n_words': 58}