<commit_before>namespace :spree_roles do
  namespace :permissions do
    desc "Create admin username and password"
    task :populate => :environment do
      admin = Spree::Role.where(:name => 'admin').first_or_create!
      user = Spree::Role.where(:name => 'user').first_or_create!
      user.is_default = true
      user.save!

      permission1 = Spree::Permission.create!(:title => 'can-manage-all', :priority => 0)
      permission2 = Spree::Permission.create!(:title => 'default-permissions', :priority => 1)

      user.permissions = [permission2]
      admin.permissions = [permission1]
    end
  end
end<commit_msg>Add more permissions to rake task populate<commit_after>namespace :spree_roles do
  namespace :permissions do
    desc "Create admin username and password"
    task :populate => :environment do
      admin = Spree::Role.where(:name => 'admin').first_or_create!
      user = Spree::Role.where(:name => 'user').first_or_create!
      user.is_default = true
      user.save!

      permission1 = Spree::Permission.create!(title: 'can-manage-all', priority: 0)
      permission2 = Spree::Permission.create!(title: 'default-permissions', priority: 1)
      permission3 = Spree::Permission.create!(title: 'can-manage-spree/products', priority: 2) 
      permission4 = Spree::Permission.create!(title: 'can-manage-spree/orders', priority: 2) 
      permission5 = Spree::Permission.create!(title: 'can-manage-spree/users', priority: 2)
      permission6 = Spree::Permission.create(title: 'can-read-spree/orders', priority: 3)
      permission7 = Spree::Permission.create(title: 'can-index-spree/orders', priority: 3)


      user.permissions = [permission2]
      admin.permissions = [permission1]
    end
  end
end
{'fraction_non_alphanumeric': 0.13444893248701673, 'fraction_numerical': 0.012694748990190421, 'mean_word_length': 3.8983050847457625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6475944', 'n_tokens_mistral': 536, 'n_tokens_neox': 513, 'n_words': 114}