<commit_before>puts 'Seeding initial configuration'
puts '-- creating roles'
Role.create([
  { :name => 'admin' },
  { :name => 'user' },
  { :name => 'superadmin'}
], :without_protection => true)
puts "Default roles created: #{Role.all.map(&:name)}"

puts '-- setting up default users'

user = User.create! :name => 'Default User',
  :email => '<EMAIL>',
  :password => 'password',
  :password_confirmation => 'password'
user.add_role :user
puts "New user created: #{user.name}"

admin = User.create! :name => 'Default Admin',
  :email => '<EMAIL>',
  :password => 'password',
  :password_confirmation => 'password'
admin.remove_role :user
admin.add_role :admin
puts "New user created: #{admin.name}"

superadmin = User.create! :name => 'Default Superadmin',
  :email => ENV["DEFAULT_ADMIN_EMAIL"].dup,
  :password => ENV["<PASSWORD>_ADMIN_PASSWORD"].dup,
  :password_confirmation => ENV["DEFAULT_ADMIN_PASSWORD"].dup
superadmin.remove_role :user
superadmin.add_role :superadmin
puts "New user created: #{superadmin.name}"<commit_msg>Bugfix: Remove buggy role creation in seed script.<commit_after>puts 'SETTING UP DEFAULT USER LOGIN'
user = User.create! :name => 'Default User',
  :email => '<EMAIL>',
  :password => 'password',
  :password_confirmation => 'password'
user.add_role :user
puts "New user created: #{user.name}"

admin = User.create! :name => 'Default Admin',
  :email => '<EMAIL>',
  :password => 'password',
  :password_confirmation => 'password'
admin.remove_role :user
admin.add_role :admin
puts "New user created: #{admin.name}"

superadmin = User.create! :name => 'Default Superadmin',
  :email => ENV["DEFAULT_ADMIN_EMAIL"].dup,
  :password => ENV["<PASSWORD>_ADMIN_PASSWORD"].dup,
  :password_confirmation => ENV["DEFAULT_ADMIN_PASSWORD"].dup
superadmin.remove_role :user
superadmin.add_role :superadmin
puts "New user created: #{superadmin.name}"
{'fraction_non_alphanumeric': 0.16675574559059328, 'fraction_numerical': 0.0, 'mean_word_length': 5.685714285714286, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 37, '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': '7074505', 'n_tokens_mistral': 619, 'n_tokens_neox': 621, 'n_words': 154}