<commit_before>module Elastictastic
  class PatronTransport
    def initialize(options = {})
      @http = Patron::Session.new
      @http.base_url = URI::HTTP.build(options.symbolize_keys.slice(:host, :port)).to_s
      @http.timeout = 60
    end

    def get(path, params = nil, headers = {})
      path_with_query = path
      path_with_query << '?' << params.to_query if params
      @http.get(path_with_query, headers).body
    end

    def post(path, data, headers = {})
      @http.post(path, data, headers).body
    end

    def put(path, data, headers = {})
      @http.put(path, data, headers).body
    end

    def delete(path, data = nil, headers = {})
      @http.request(:delete, path, headers, :data => data).body
    end
  end
end<commit_msg>Make patron transport work with correct arguments<commit_after>module Elastictastic
  class PatronTransport
    def initialize(config)
      @http = Patron::Session.new
      @http.base_url = URI::HTTP.build(:host => config.host, :port => config.port).to_s
      @http.timeout = 60
    end

    def get(path, params = nil, headers = {})
      path_with_query = path
      path_with_query << '?' << params.to_query if params
      @http.get(path_with_query, headers).body
    end

    def post(path, data, headers = {})
      @http.post(path, data, headers).body
    end

    def put(path, data, headers = {})
      @http.put(path, data, headers).body
    end

    def delete(path, data = nil, headers = {})
      @http.request(:delete, path, headers, :data => data).body
    end
  end
end
{'fraction_non_alphanumeric': 0.13260025873221215, 'fraction_numerical': 0.00258732212160414, 'mean_word_length': 2.8967254408060454, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '5612912', 'n_tokens_mistral': 497, 'n_tokens_neox': 493, 'n_words': 121}