<commit_before>require 'colorize'
puts "Clearing existing data".green
BookClubBook.destroy_all
BookGenre.destroy_all
Book.destroy_all
Genre.destroy_all
BookClub.destroy_all

puts "Reseting auto increment".green
ActiveRecord::Base.connection.tables.each do |table|
  ActiveRecord::Base.connection.execute("ALTER TABLE #{table} AUTO_INCREMENT = 1")
end

fiction = Genre.create!(name: 'Fiction')
sci_fi = Genre.create!(name: 'Science Fiction')
fantasy = Genre.create!(name: 'Fantasy')
apple = Genre.create!(name: 'Apple')
non_fiction = Genre.create!(name: 'Non-Fiction')

Book.create!([{
  title: "Hyperion",
  author: "<NAME>",
  description: "Probably my favorite science fiction book (and series) I've ever read. Hyperion is written in a style similar to The Canterbury Tales, in which a series of stories are told by the main characters. Each story is a gem in itself, but alude to the larger storyline. The scope of the story is ambitious - spanning time, planets religion and love.",
  amazon_id: "0553283685",
  rating: 5,<commit_msg>adds enviroment check to seed file<commit_after>require 'colorize'
puts "Clearing existing data".green
BookClubBook.destroy_all
BookGenre.destroy_all
Book.destroy_all
Genre.destroy_all
BookClub.destroy_all

if Rails.env != "production"
  puts "Reseting auto increment".green
  ActiveRecord::Base.connection.tables.each do |table|
    ActiveRecord::Base.connection.execute("ALTER TABLE #{table} AUTO_INCREMENT = 1")
  end
end

fiction = Genre.create!(name: 'Fiction')
sci_fi = Genre.create!(name: 'Science Fiction')
fantasy = Genre.create!(name: 'Fantasy')
apple = Genre.create!(name: 'Apple')
non_fiction = Genre.create!(name: 'Non-Fiction')

Book.create!([{
  title: "Hyperion",
  author: "<NAME>",
  description: "Probably my favorite science fiction book (and series) I've ever read. Hyperion is written in a style similar to The Canterbury Tales, in which a series of stories are told by the main characters. Each story is a gem in itself, but alude to the larger storyline. The scope of the story is ambitious - spanning time, planets religion and love.",
  amazon_id: "0553283685",
  rating: 5,
{'fraction_non_alphanumeric': 0.10710944808231992, 'fraction_numerical': 0.011225444340505144, 'mean_word_length': 5.4818181818181815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5670943', 'n_tokens_mistral': 701, 'n_tokens_neox': 645, 'n_words': 228}