<commit_before>module Spree
  class SitemapController < BaseController
    def index
      @public_dir = "http://#{Spree::Config[:site_url]}/"

      @products = Spree::Product.active.find(:all)
      @taxonomies = Spree::Taxonomy.all

      # Get Pages from static_content extension
      slugs_to_reject = ["sidebar"] # if want to exlude pages from the sitemap, enter the slugs here
      #slugs = []
      #sitemap_slugs = []
      #Page.all.each { |p| slugs << p.slug }
      #sitemap_slugs = slugs - slugs_to_reject
      #@pages = []
      #sitemap_slugs.each {|s| @pages << Page.find_by_slug(s) }

      respond_to do |format|
        format.html {  }
        format.xml { render :layout => false, :xml => _build_xml(_add_products_to_tax(_build_taxon_hash, true), @public_dir) }
        format.text do
          @nav = _add_products_to_tax(_build_taxon_hash, true)
          render :layout => false
        end
      end
    end

    private

    def returning(value)
      yield(value)
      value<commit_msg>changed sitename to use parties after url<commit_after>module Spree
  class SitemapController < BaseController
    def index
      @public_dir = "http://#{Spree::Config[:site_url]}/parties/"

      @products = Spree::Product.active.find(:all)
      @taxonomies = Spree::Taxonomy.all

      # Get Pages from static_content extension
      slugs_to_reject = ["sidebar"] # if want to exlude pages from the sitemap, enter the slugs here
      #slugs = []
      #sitemap_slugs = []
      #Page.all.each { |p| slugs << p.slug }
      #sitemap_slugs = slugs - slugs_to_reject
      #@pages = []
      #sitemap_slugs.each {|s| @pages << Page.find_by_slug(s) }

      respond_to do |format|
        format.html {  }
        format.xml { render :layout => false, :xml => _build_xml(_add_products_to_tax(_build_taxon_hash, true), @public_dir) }
        format.text do
          @nav = _add_products_to_tax(_build_taxon_hash, true)
          render :layout => false
        end
      end
    end

    private

    def returning(value)
      yield(value)
      value
{'fraction_non_alphanumeric': 0.11159420289855072, 'fraction_numerical': 0.0, 'mean_word_length': 2.620629370629371, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6635794', 'n_tokens_mistral': 690, 'n_tokens_neox': 683, 'n_words': 153}