<commit_before>#encoding: utf-8

module Cielo
  class Connection
    attr_reader :environment
    attr_reader :numero_afiliacao
    attr_reader :chave_acesso

    def initialize numero_afiliacao = Cielo.numero_afiliacao, chave_acesso = Cielo.chave_acesso
      @environment = eval(Cielo.environment.to_s.capitalize)
      @numero_afiliacao = numero_afiliacao
      @chave_acesso = chave_acesso
      port = 443
      @http = Net::HTTP.new(@environment::BASE_URL,port)
      @http.ssl_version = :SSLv3 if @http.respond_to? :ssl_version
      @http.use_ssl = true
      @http.open_timeout = 10*1000
      @http.read_timeout = 40*1000
    end

    def request!(params={})
      str_params = ""
      params.each do |key, value|<commit_msg>Mudando versão para compatibilidade com a CIELO<commit_after>#encoding: utf-8

module Cielo
  class Connection
    attr_reader :environment
    attr_reader :numero_afiliacao
    attr_reader :chave_acesso

    def initialize numero_afiliacao = Cielo.numero_afiliacao, chave_acesso = Cielo.chave_acesso
      @environment = eval(Cielo.environment.to_s.capitalize)
      @numero_afiliacao = numero_afiliacao
      @chave_acesso = chave_acesso
      port = 443
      @http = Net::HTTP.new(@environment::BASE_URL,port)
      @http.ssl_version = :TLSv1 if @http.respond_to? :ssl_version
      @http.use_ssl = true
      @http.open_timeout = 10*1000
      @http.read_timeout = 40*1000
    end

    def request!(params={})
      str_params = ""
      params.each do |key, value|
{'fraction_non_alphanumeric': 0.09163346613545817, 'fraction_numerical': 0.02257636122177955, 'mean_word_length': 3.4193548387096775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5865082', 'n_tokens_mistral': 558, 'n_tokens_neox': 528, 'n_words': 99}