<commit_before>module GeocodedByAddress


  unless Rails.env.test?
    def geocoder_by_address
      nil
    end
  else
    def geocoder_by_address
      geocoded_by :address do |object, geocoder_results|
        geocoder = geocoder_results.first

        if geocoder
          object.latitude = geocoder.latitude
          object.longitude = geocoder.longitude
          object.route = geocoder.address_components_of_type(:route).first["short_name"]
          object.neighborhood_name = geocoder.address_components_of_type(:neighborhood).first["long_name"]
          object.city_name = geocoder.city
          object.state_name = geocoder.state
          object.state_code = geocoder.state_code
          object.country_code = geocoder.country_code<commit_msg>Adjust in GeocodedByAddress module to run more fast in test<commit_after>module GeocodedByAddress


  if Rails.env.test?
    def geocoder_by_address
      nil
    end
  else
    def geocoder_by_address
      geocoded_by :address do |object, geocoder_results|
        geocoder = geocoder_results.first

        if geocoder
          object.latitude = geocoder.latitude
          object.longitude = geocoder.longitude
          object.route = geocoder.address_components_of_type(:route).first["short_name"]
          object.neighborhood_name = geocoder.address_components_of_type(:neighborhood).first["long_name"]
          object.city_name = geocoder.city
          object.state_name = geocoder.state
          object.state_code = geocoder.state_code
          object.country_code = geocoder.country_code
{'fraction_non_alphanumeric': 0.06649616368286446, 'fraction_numerical': 0.0, 'mean_word_length': 2.972081218274112, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4120507', 'n_tokens_mistral': 482, 'n_tokens_neox': 469, 'n_words': 80}