<commit_before>require 'faraday'
class FaradayAdapter < HTTPBaseAdapter
  def send_get_request
    conn = Faraday.new(:url => "#{@protocol}://#{@host}:#{@port}") do |faraday|
      faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
    end

    conn.get do |req|
      req.headers = @headers
      req.url parse_uri.to_s
    end
  end

  def send_post_request
    HTTParty.post(parse_uri.to_s, body: @data, headers: @headers)
  end
end<commit_msg>Fix Faraday test adapter to actually use Faraday for POSTing<commit_after>require 'faraday'
class FaradayAdapter < HTTPBaseAdapter
  def send_get_request
    connection.get do |req|
      req.url parse_uri.to_s
      req.headers = @headers
    end
  end

  def send_post_request
    connection.post do |req|
      req.url parse_uri.to_s
      req.headers = @headers
      req.body = @data
    end
  end

  private

  def connection
    Faraday.new(url: "#{@protocol}://#{@host}:#{@port}") do |faraday|
      faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
    end
  end
end
{'fraction_non_alphanumeric': 0.10309278350515463, 'fraction_numerical': 0.0, 'mean_word_length': 3.204724409448819, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '4604443', 'n_tokens_mistral': 371, 'n_tokens_neox': 356, 'n_words': 90}