From 4fd77ce06ea209af6210394ed09b8dbe5db17f1f Mon Sep 17 00:00:00 2001 From: Andrew Strovers Date: Fri, 20 Mar 2015 11:32:50 -0500 Subject: [PATCH 1/4] Added more seed data for future developers. * Added projects that default to approved so devs can see them without logging in. --- db/seeds.rb | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 4 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 7b8a3671..ca0865ed 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -11,7 +11,91 @@ @user.is_admin = true @user.save! - # Example Organization, Project, and Job - Organization.create(:name => "CodeMontage", :url => "http://codemontage.com", :github_org => "CodeMontage", :twitter => "CodeMontage", :image_url => "http://codemontage.com/assets/cm_header_logo.png") - Project.create(:organization_id => 1, :name => "CodeMontage Platform", :github_repo => "codemontage", :cause_list => "Volunteerism, Economic Empowerment, Tech Inclusion", :technology_list => "Ruby, Rails, PostgreSQL") - Job.create(:organization_id => 1, :title => "Superhero", :overview => "Save the world with CodeMontage.", :cause_list => "Volunteerism, Economic Empowerment, Tech Inclusion", :technology_list => "Ruby, Rails, PostgreSQL") + +# Exmaples + # Organizations + Organization.create( + :name => "CodeMontage", + :url => "http://codemontage.com", + :github_org => "CodeMontage", + :twitter => "CodeMontage", + :image_url => "http://codemontage.com/assets/cm_header_logo.png" + ) + + Organization.create( + :name => "OmahaCodeSchool", + :url => "http://omahacodeschool.com", + :github_org => "OmahaCodeSchool", + :twitter => "OmahaCodeSchool", + :image_url => "http://codemontage.com/assets/cm_header_logo.png" + ) + + Organization.create( + :name => "Dev Bootcamp", + :url => "http://devbootcamp.com", + :github_org => "DevBootCamp", + :twitter => "DevBootCamp", + :image_url => "http://codemontage.com/assets/cm_header_logo.png" + ) + + # Projects + Project.create( + :organization_id => 1, + :name => "CodeMontage Platform", + :github_repo => "codemontage", + :cause_list => "Volunteerism, Economic Empowerment, Tech Inclusion", + :technology_list => "Ruby, Rails, PostgreSQL", + is_approved: true + ) + + Project.create( + :organization_id => 2, + :name => "OmahaCodeSchool Platform", + :github_repo => "omahacodeschool", + :cause_list => "Tech Education, Social Empowerment, Tech Inclusion", + :technology_list => "Ruby, Rails, PostgreSQL, Javascript, HTML, CSS", + is_approved: true + ) + + Project.create( + :organization_id => 3, + :name => "DevBootCamp Platform", + :github_repo => "devbootcamp", + :cause_list => "Tech Education, Social Empowerment", + :technology_list => "Ruby, Rails, Javascript, HTML, CSS", + is_approved: true + ) + + Project.create( + :organization_id => 1, + :name => "Not Approved Project", + :github_repo => "codemonate", + :cause_list => "Volunteerism, Social Empowerment, Tech Inclusion", + :technology_list => "Ruby, Rails, Javascript, HTML, CSS" + ) + + Project.create( + :organization_id => 2, + :name => "Ruby Rogues Podcast", + :github_repo => "codemontage", + :cause_list => "Tech Education, Social Empowerment, Talking Heads, Tech Awareness", + :technology_list => "Ruby, Rails, Django, MongoDB, Python", + is_approved: true + ) + + # Jobs + Job.create( + :organization_id => 1, + :title => "Superhero", + :overview => "Save the world with CodeMontage.", + :cause_list => "Volunteerism, Economic Empowerment, Tech Inclusion", + :technology_list => "Ruby, Rails, PostgreSQL" + ) + + Job.create( + :organization_id => 1, + :title => "Happiness Engineer", + :overview => "Save the world with CodeMontage by bringing joy to users.", + :cause_list => "Volunteerism, Mood Empowerment, Tech Inclusion", + :technology_list => "Ruby, Rails, PostgreSQL" + ) From 3b7a78816d21e74dc24b28f1169164f4bb13ad62 Mon Sep 17 00:00:00 2001 From: Andrew Strovers Date: Fri, 20 Mar 2015 11:42:47 -0500 Subject: [PATCH 2/4] Changed file to new Hash syntax. --- db/seeds.rb | 102 ++++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index ca0865ed..e45f4cab 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -7,7 +7,7 @@ # Mayor.create(name: 'Emanuel', city: cities.first) # Admin User can login & add most other data via ActiveAdmin - @user = User.new(:email => "user@codemontage.com", :password => "passw0rd") + @user = User.new(:email: "user@codemontage.com", :password: "passw0rd") @user.is_admin = true @user.save! @@ -15,87 +15,87 @@ # Exmaples # Organizations Organization.create( - :name => "CodeMontage", - :url => "http://codemontage.com", - :github_org => "CodeMontage", - :twitter => "CodeMontage", - :image_url => "http://codemontage.com/assets/cm_header_logo.png" + name: "CodeMontage", + url: "http://codemontage.com", + github_org: "CodeMontage", + twitter: "CodeMontage", + image_url: "http://codemontage.com/assets/cm_header_logo.png" ) Organization.create( - :name => "OmahaCodeSchool", - :url => "http://omahacodeschool.com", - :github_org => "OmahaCodeSchool", - :twitter => "OmahaCodeSchool", - :image_url => "http://codemontage.com/assets/cm_header_logo.png" + name: "OmahaCodeSchool", + url: "http://omahacodeschool.com", + github_org: "OmahaCodeSchool", + twitter: "OmahaCodeSchool", + image_url: "http://codemontage.com/assets/cm_header_logo.png" ) Organization.create( - :name => "Dev Bootcamp", - :url => "http://devbootcamp.com", - :github_org => "DevBootCamp", - :twitter => "DevBootCamp", - :image_url => "http://codemontage.com/assets/cm_header_logo.png" + name: "Dev Bootcamp", + url: "http://devbootcamp.com", + github_org: "DevBootCamp", + twitter: "DevBootCamp", + image_url: "http://codemontage.com/assets/cm_header_logo.png" ) # Projects Project.create( - :organization_id => 1, - :name => "CodeMontage Platform", - :github_repo => "codemontage", - :cause_list => "Volunteerism, Economic Empowerment, Tech Inclusion", - :technology_list => "Ruby, Rails, PostgreSQL", + organization_id: 1, + name: "CodeMontage Platform", + github_repo: "codemontage", + cause_list: "Volunteerism, Economic Empowerment, Tech Inclusion", + technology_list: "Ruby, Rails, PostgreSQL", is_approved: true ) Project.create( - :organization_id => 2, - :name => "OmahaCodeSchool Platform", - :github_repo => "omahacodeschool", - :cause_list => "Tech Education, Social Empowerment, Tech Inclusion", - :technology_list => "Ruby, Rails, PostgreSQL, Javascript, HTML, CSS", + organization_id: 2, + name: "OmahaCodeSchool Platform", + github_repo: "omahacodeschool", + cause_list: "Tech Education, Social Empowerment, Tech Inclusion", + technology_list: "Ruby, Rails, PostgreSQL, Javascript, HTML, CSS", is_approved: true ) Project.create( - :organization_id => 3, - :name => "DevBootCamp Platform", - :github_repo => "devbootcamp", - :cause_list => "Tech Education, Social Empowerment", - :technology_list => "Ruby, Rails, Javascript, HTML, CSS", + organization_id: 3, + name: "DevBootCamp Platform", + github_repo: "devbootcamp", + cause_list: "Tech Education, Social Empowerment", + technology_list: "Ruby, Rails, Javascript, HTML, CSS", is_approved: true ) Project.create( - :organization_id => 1, - :name => "Not Approved Project", - :github_repo => "codemonate", - :cause_list => "Volunteerism, Social Empowerment, Tech Inclusion", - :technology_list => "Ruby, Rails, Javascript, HTML, CSS" + organization_id: 1, + name: "Not Approved Project", + github_repo: "codemonate", + cause_list: "Volunteerism, Social Empowerment, Tech Inclusion", + technology_list: "Ruby, Rails, Javascript, HTML, CSS" ) Project.create( - :organization_id => 2, - :name => "Ruby Rogues Podcast", - :github_repo => "codemontage", - :cause_list => "Tech Education, Social Empowerment, Talking Heads, Tech Awareness", - :technology_list => "Ruby, Rails, Django, MongoDB, Python", + organization_id: 2, + name: "Ruby Rogues Podcast", + github_repo: "codemontage", + cause_list: "Tech Education, Social Empowerment, Talking Heads, Tech Awareness", + technology_list: "Ruby, Rails, Django, MongoDB, Python", is_approved: true ) # Jobs Job.create( - :organization_id => 1, - :title => "Superhero", - :overview => "Save the world with CodeMontage.", - :cause_list => "Volunteerism, Economic Empowerment, Tech Inclusion", - :technology_list => "Ruby, Rails, PostgreSQL" + organization_id: 1, + title: "Superhero", + overview: "Save the world with CodeMontage.", + cause_list: "Volunteerism, Economic Empowerment, Tech Inclusion", + technology_list: "Ruby, Rails, PostgreSQL" ) Job.create( - :organization_id => 1, - :title => "Happiness Engineer", - :overview => "Save the world with CodeMontage by bringing joy to users.", - :cause_list => "Volunteerism, Mood Empowerment, Tech Inclusion", - :technology_list => "Ruby, Rails, PostgreSQL" + organization_id: 1, + title: "Happiness Engineer", + overview: "Save the world with CodeMontage by bringing joy to users.", + cause_list: "Volunteerism, Mood Empowerment, Tech Inclusion", + technology_list: "Ruby, Rails, PostgreSQL" ) From a0f8fac7dafbb77b4179f7a12263967939943e69 Mon Sep 17 00:00:00 2001 From: Andrew Strovers Date: Fri, 20 Mar 2015 11:44:57 -0500 Subject: [PATCH 3/4] Removed an unnecessary line and fixed indentation to appease hound. --- db/seeds.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index e45f4cab..bba24cbb 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -11,8 +11,7 @@ @user.is_admin = true @user.save! - -# Exmaples + # Exmaples # Organizations Organization.create( name: "CodeMontage", From 84461cb46b63f8f90e621d29332afa5c99916a9d Mon Sep 17 00:00:00 2001 From: Andrew Strovers Date: Fri, 20 Mar 2015 11:47:14 -0500 Subject: [PATCH 4/4] Removed extra colon. --- db/seeds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index bba24cbb..636d7259 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -7,7 +7,7 @@ # Mayor.create(name: 'Emanuel', city: cities.first) # Admin User can login & add most other data via ActiveAdmin - @user = User.new(:email: "user@codemontage.com", :password: "passw0rd") + @user = User.new(email: "user@codemontage.com", :password: "passw0rd") @user.is_admin = true @user.save!