<commit_before># This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)


# seed the users table
User.create(username: "Mike", password: "<PASSWORD>", role: "admin")
User.create(username: "Anna", password: "<PASSWORD>", role: "user")
User.create(username: "Jenny", password: "<PASSWORD>", role: "user")
User.create(username: "Jack", password: "<PASSWORD>", role: "user")
User.create(username: "Lily", password: "<PASSWORD>", role: "user")
# ------------------------------------------------------------
# seed the articles table
Article.create(author_id: 1, title: "Jay Chou", status: "published", featured: true)
Article.create(author_id: 1, title: "Ruby on Rails", status: "unpublished", featured: false)
Article.create(author_id: 2, title: "Coffee", status: "published", featured: false)
Article.create(author_id: 3, title: "Olympic Games",status: "unpublished", featured: false)
Article.create(author_id: 4, title: "Spotify", status: "unpublished", featured: false)
Article.create(author_id: 5, title: "Empanada",status: "published", featured: false)
Article.create(author_id: 5, title: "Shortcake",status: "unpublished", featured: false)
# -------------------------------------------------------------
# seed the categories table
Category.create(name: "History")
Category.create(name: "Science")
Category.create(name: "Technology")
Category.create(name: "Art")
Category.create(name: "Food")
Category.create(name: "Music")
Category.create(name: "Sports")
# --------------------------------------------------------------
# seed the sorted_articles table
SortedArticle.create(article_id: 1, category_id: 4)
SortedArticle.create(article_id: 1, category_id: 6)
SortedArticle.create(article_id: 2, category_id: 2)
SortedArticle.create(article_id: 2, category_id: 3)
SortedArticle.create(article_id: 3, category_id: 5)<commit_msg>altered seed file with superadmin<commit_after># This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)


# seed the users table
User.create(username: "Mike", password: "<PASSWORD>", role: "admin")
User.create(username: "Anna", password: "<PASSWORD>", role: "user")
User.create(username: "Jenny", password: "<PASSWORD>", role: "user")
User.create(username: "Jack", password: "<PASSWORD>", role: "user")
User.create(username: "Lily", password: "<PASSWORD>", role: "user")
User.create(username: "pie", password: "<PASSWORD>", role: "superadmin")

# ------------------------------------------------------------
# seed the articles table
Article.create(author_id: 1, title: "Jay Chou", status: "published", featured: true)
Article.create(author_id: 1, title: "Ruby on Rails", status: "unpublished", featured: false)
Article.create(author_id: 2, title: "Coffee", status: "published", featured: false)
Article.create(author_id: 3, title: "Olympic Games",status: "unpublished", featured: false)
Article.create(author_id: 4, title: "Spotify", status: "unpublished", featured: false)
Article.create(author_id: 5, title: "Empanada",status: "published", featured: false)
Article.create(author_id: 5, title: "Shortcake",status: "unpublished", featured: false)
# -------------------------------------------------------------
# seed the categories table
Category.create(name: "History")
Category.create(name: "Science")
Category.create(name: "Technology")
Category.create(name: "Art")
Category.create(name: "Food")
Category.create(name: "Music")
Category.create(name: "Sports")
# --------------------------------------------------------------
# seed the sorted_articles table
SortedArticle.create(article_id: 1, category_id: 4)
SortedArticle.create(article_id: 1, category_id: 6)
SortedArticle.create(article_id: 2, category_id: 2)
SortedArticle.create(article_id: 2, category_id: 3)
SortedArticle.create(article_id: 3, category_id: 5)
{'fraction_non_alphanumeric': 0.2245084590763603, 'fraction_numerical': 0.007773205304069501, 'mean_word_length': 4.069524913093859, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '4570231', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1240, 'n_words': 385}