-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cleans up seeds by only keeping the necessary admins to initialize the application * I think git actually prefers spaces * PR feedback * seed
- Loading branch information
Showing
1 changed file
with
2 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,82 +5,11 @@ | |
# | ||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) | ||
# Mayor.create(name: 'Emanuel', city: cities.first) | ||
people = [ | ||
{ :name => "John" ,:major => "English" , :sid => "111" ,:email => "[email protected]"}, | ||
{ :name => "Josh" ,:major => "CS" ,:sid => "222" ,:email => "[email protected]"}, | ||
{ :name => "Jorge" ,:major => "English" ,:sid => "333" ,:email => "[email protected]"}, | ||
{ :name => "CCC" ,:major => "EECS" ,:sid => "444" ,:email => "[email protected]"}, | ||
{ :name => "DDD" ,:major => "English" ,:sid => "555" ,:email => "[email protected]"}, | ||
{:name => "EEE" , :major =>"English" ,:sid => "666" ,:email => "[email protected]"}, | ||
{:name => "FFF" ,:major => "EECS" ,:sid => "777" ,:email => "[email protected]"}, | ||
{:name => "GGG" ,:major => "CS" ,:sid => "888" ,:email => "[email protected]"}, | ||
{:name => "HHH" ,:major => "English" ,:sid => "999" ,:email =>"[email protected]"}, | ||
{:name => "III" ,:major => "English" ,:sid => "1111" ,:email => "[email protected]"}, | ||
{:name => "JJJ" ,:major => "English" ,:sid => "2222" ,:email => "[email protected]"}, | ||
{:name => "Kay" ,:major => "EECS" ,:sid => "3333" ,:email => "[email protected]"}, | ||
{:name => "Ana" ,:major => "CS" ,:sid => "4444" ,:email => "[email protected]"}, | ||
{:name => "Anant Sahai" ,:major => "EECS" ,:sid => "26131973" ,:email => "[email protected]"}, | ||
{:name => "Adnan Hemani" ,:major => "CS" ,:sid => "26726609" ,:email => "[email protected]"} | ||
] | ||
|
||
people.each do |ue| | ||
User.create!( ue) | ||
end | ||
|
||
tone = Team.new | ||
tone.approved = false | ||
tone.submitted = false | ||
tone.passcode = "passcode1" | ||
tone.save! | ||
tone.users << User.where(name: "Josh") | ||
tone.users << User.where(name: "CCC") | ||
tone.users << User.where(name: "GGG") | ||
tone.users << User.where(name: "Jorge") | ||
tone.users << User.where(name: "Adnan") | ||
|
||
|
||
|
||
|
||
two = Team.new | ||
two.approved = false | ||
two.submitted = false | ||
two.passcode = "passcode2" | ||
two.save! | ||
two.users << User.where(name: "JJJ") | ||
two.users << User.where(name: "DDD") | ||
two.users << User.where(name: "John") | ||
|
||
tthree = Team.new | ||
tthree.approved = false | ||
tthree.submitted = false | ||
tthree.passcode = "passcode3" | ||
tthree.save! | ||
tthree.users << User.where(name: "Kay") | ||
tthree.users << User.where(name: "Ana") | ||
tthree.users << User.where(name: "III") | ||
|
||
|
||
admins = [ | ||
{ :name => "Anna", :email => "[email protected]", :superadmin => false}, | ||
{ :name => "Bruce", :email => "[email protected]", :superadmin => false}, | ||
{ :name => "EnrollMe", :email => "[email protected]", :superadmin => true}, | ||
{ :name => "Rihanna", :email => "[email protected]", :superadmin => false} | ||
{ :name => "EnrollMe", :email => "[email protected]", :superadmin => true}, | ||
{ :name => "Michael-David Sasson", :email => "[email protected]", :superadmin => false} | ||
] | ||
|
||
admins.each do |a| | ||
Admin.create!(a) | ||
end | ||
|
||
|
||
full = Discussion.create!(:number => 66666, :day=> "Wednesday", :time=> "3pm", :capacity => 3) | ||
somewhat_full = Discussion.create!(:number => 42000, :day=> "Thursday", :time=> "3pm", :capacity => 5) | ||
spank = Discussion.create!(:number => 50400, :day=> "Friday", :time=> "2pm", :capacity => 20) | ||
Discussion.create!(:number => 13370, :day=>"Wednesday", :time=> "3pm", :capacity => 5) | ||
Discussion.create!(:number => 13380, :day=>"Thusday", :time=> "3pm", :capacity => 5) | ||
Discussion.create!(:number => 13390, :day=>"Friday", :time=> "3pm", :capacity => 5) | ||
Discussion.create!(:number => 54321, :day=>"Tuesday", :time=> "3:00 P.M.", :capacity => 25) | ||
|
||
|
||
full.teams << two | ||
somewhat_full.teams << tone | ||
spank.teams << tthree |