<commit_before>require 'addressable/uri'
require 'sitemap_generator'
require 'fog-aws'

SitemapGenerator::Interpreter.class_eval {
  def alternates(url)
    LOCALES.keys.map do |lang|
      href = Addressable::URI.parse("#{Sitemap.default_host}#{url}")
      href.query_values = (href.query_values || {}).merge(locale: lang)
      {
        href: href.to_s,
        lang: lang
      }
    end
  end
}

SitemapGenerator::Sitemap.default_host = 'http://www.citylines.co'
SitemapGenerator::Sitemap.adapter = SitemapGenerator::S3Adapter.new(fog_provider: 'AWS',
                                                                    aws_access_key_id: AWS_ACCESS_KEY_ID,
                                                                    aws_secret_access_key: AWS_SECRET_ACCESS_KEY,
                                                                    fog_directory: AWS_BUCKET,
                                                                    fog_region: AWS_REGION)<commit_msg>Convert sitemap default host to https<commit_after>require 'addressable/uri'
require 'sitemap_generator'
require 'fog-aws'

SitemapGenerator::Interpreter.class_eval {
  def alternates(url)
    LOCALES.keys.map do |lang|
      href = Addressable::URI.parse("#{Sitemap.default_host}#{url}")
      href.query_values = (href.query_values || {}).merge(locale: lang)
      {
        href: href.to_s,
        lang: lang
      }
    end
  end
}

SitemapGenerator::Sitemap.default_host = 'https://www.citylines.co'
SitemapGenerator::Sitemap.adapter = SitemapGenerator::S3Adapter.new(fog_provider: 'AWS',
                                                                    aws_access_key_id: AWS_ACCESS_KEY_ID,
                                                                    aws_secret_access_key: AWS_SECRET_ACCESS_KEY,
                                                                    fog_directory: AWS_BUCKET,
                                                                    fog_region: AWS_REGION)
{'fraction_non_alphanumeric': 0.08801213960546282, 'fraction_numerical': 0.0010116337885685382, 'mean_word_length': 1.5229591836734695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '770630', 'n_tokens_mistral': 516, 'n_tokens_neox': 526, 'n_words': 78}