master
 1# This file should contain all the record creation needed to seed the database with its default values.
 2# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
 3program = Program.find_or_create_by!(name: Program::STRONG_LIFTS)
 4squat = Exercise.find_or_create_by!(name: "Squat")
 5bench_press = Exercise.find_or_create_by!(name: "Bench Press")
 6barbell_row = Exercise.find_or_create_by!(name: "Barbell Row")
 7dips = Exercise.find_or_create_by!(name: "Weighted Dips")
 8paused_bench_press = Exercise.find_or_create_by!(name: "Paused Bench Press")
 9planks = Exercise.find_or_create_by!(name: "Planks")
10
11routine_a = program.routines.find_or_create_by(name: "A")
12routine_a.add_exercise(squat, sets: 5, repetitions: 5)
13routine_a.add_exercise(bench_press, sets: 5, repetitions: 5)
14routine_a.add_exercise(barbell_row, sets: 5, repetitions: 5)
15routine_a.add_exercise(dips, sets: 3, repetitions: 5)
16routine_a.add_exercise(paused_bench_press, sets: 3, repetitions: 5)
17routine_a.add_exercise(planks, sets: 3, duration: 60.seconds)
18
19overhead_press = Exercise.find_or_create_by!(name: "Overhead Press")
20deadlift = Exercise.find_or_create_by!(name: "Deadlift")
21chin_ups = Exercise.find_or_create_by!(name: "Chinups")
22pull_ups = Exercise.find_or_create_by!(name: "Pull Ups")
23close_grip_bench_press = Exercise.find_or_create_by!(
24  name: "Close Grip Bench Press"
25)
26
27routine_b = program.routines.find_or_create_by(name: "B")
28routine_b.add_exercise(squat, sets: 5, repetitions: 5)
29routine_b.add_exercise(overhead_press, sets: 5, repetitions: 5)
30routine_b.add_exercise(deadlift, sets: 1, repetitions: 5)
31routine_b.add_exercise(chin_ups, sets: 3, repetitions: 5)
32routine_b.add_exercise(pull_ups, sets: 3, repetitions: 5)
33routine_b.add_exercise(close_grip_bench_press, sets: 3, repetitions: 5)