<commit_before>namespace :subscriptions do

  desc "Generate all subscription's orders from today"
  task generate_orders: :environment do
    Spree::Subscription.send_today.ids.each do |id|
      Spree::Subscription.delay.create_order(id)
    end
  end

  desc 'Generate subscription products'
  task generate_products: :environment do
    data = {
      gender: ['men', 'womem'],
      recurring: [true, false],
      limit: [3,6,9,12],
      wrap: ['every month', 'first month', 'none']
    }

    data[:gender].each do |gender|
      data[:wrap].each do |wrap|
        data[:recurring].each do |recurring|
          if recurring
            Spree::SubscriptionProduct.generate(gender, recurring, wrap)
          else
            data[:limit].each do |limit|
              Spree::SubscriptionProduct.generate(gender, recurring, wrap, limit)
            end
          end
        end
      end
    end
  end
end<commit_msg>Fix typo<commit_after>namespace :subscriptions do

  desc "Generate all subscription's orders from today"
  task generate_orders: :environment do
    Spree::Subscription.send_today.ids.each do |id|
      Spree::Subscription.delay.create_order(id)
    end
  end

  desc 'Generate subscription products'
  task generate_products: :environment do
    data = {
      gender: ['men', 'women'],
      recurring: [true, false],
      limit: [3,6,9,12],
      wrap: ['every month', 'first month', 'none']
    }

    data[:gender].each do |gender|
      data[:wrap].each do |wrap|
        data[:recurring].each do |recurring|
          if recurring
            Spree::SubscriptionProduct.generate(gender, recurring, wrap)
          else
            data[:limit].each do |limit|
              Spree::SubscriptionProduct.generate(gender, recurring, wrap, limit)
            end
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10840108401084012, 'fraction_numerical': 0.005420054200542005, 'mean_word_length': 2.5095057034220534, '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': '5143795', 'n_tokens_mistral': 538, 'n_tokens_neox': 528, 'n_words': 144}