-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from amba178/seed_editing_branch
connects AgileVentures/MetPlus_tracker#166
- Loading branch information
Showing
9 changed files
with
65 additions
and
30 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
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
web: bundle exec puma -C config/puma.rb |
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
workers Integer(ENV['WEB_CONCURRENCY'] || 2) | ||
threads_count = Integer(ENV['MAX_THREADS'] || 5) | ||
threads threads_count, threads_count | ||
|
||
preload_app! | ||
|
||
rackup DefaultRackup | ||
port ENV['PORT'] || 3000 | ||
environment ENV['RACK_ENV'] || 'development' | ||
|
||
on_worker_boot do | ||
# Worker specific setup for Rails 4.1+ | ||
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot | ||
ActiveRecord::Base.establish_connection | ||
end |
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 |
---|---|---|
|
@@ -48,31 +48,58 @@ | |
# user.confirmed_at = DateTime.now | ||
# end | ||
|
||
|
||
#incase rerun comes in. not necessary | ||
JobSeekerStatus.delete_all | ||
Job.delete_all | ||
Company.delete_all | ||
Address.delete_all | ||
CompanyPerson.delete_all | ||
JobCategory.delete_all | ||
|
||
cp1 = Company.create(:ein => '12-2123244', :phone=> '721-234-4646', email: '[email protected]', website: 'http://www.wallmart.com', :name=> 'Walmart') | ||
cp2 = Company.create(:ein => '13-1244445', :phone=> '721-234-1010', email: '[email protected]', website: 'http://www.target.com', :name=> 'Target') | ||
cp3 = Company.create(:ein => '12-1252445', :phone=> '865-234-4646', email: '[email protected]', website: 'http://www.Food4less.com',:name=> 'Food4less') | ||
cp4 = Company.create(:ein => '15-1342447', :phone=> '971-234-4646', email: '[email protected]', website: 'http://www.macy.com', :name=> 'Macy') | ||
|
||
address1 = Address.create(:street => "1234 East Maripos Avenu", city: "San Diego", zipcode: "92105") | ||
address2 = Address.create(:street => "1234 East Main Street", city: "Los Angeles", zipcode: "92108") | ||
address1.update_attribute(:location, cp1) | ||
address2.update_attribute(:location, cp2) | ||
|
||
cperson = CompanyPerson.create(company_id: cp1.id, address_id: address1.id, status: "Active", title: "General Manager", | ||
email: "[email protected]", :password => "secrete", first_name: "salem", :last_name => "Ali", confirmed_at: DateTime.now) | ||
cperson2 = CompanyPerson.create(company_id: cp2.id, address_id: address2.id, status: "Active", title: "Day Manager", | ||
email: "[email protected]", :password => "secrete", first_name: "Kalem", :last_name => "Kli", confirmed_at: DateTime.now) | ||
|
||
|
||
# Job Categories | ||
jcategory = JobCategory.create(name: 'SW Developer - RoR', | ||
description: 'Ruby on Rails backend developer') | ||
jcategory1 = JobCategory.create(name: 'SW Developer - JS', | ||
description: 'Javascript frontend developer') | ||
jcategory2 = JobCategory.create(name: 'SW Developer - Java', | ||
description: 'Java backend developer') | ||
jcategory3 = JobCategory.create(name: 'SW Project Manager - Agile', | ||
description: 'Manages Agile SW development projects') | ||
Jjcategory4 = JobCategory.create(name: 'SW Project Manager - Waterfall', | ||
description: 'Manages SW development projects using waterfall SDLC') | ||
jcategory5 = JobCategory.create(name: 'Product Manager - SaaS', | ||
description: 'Manages SaaS product development and commecialization') | ||
|
||
Job.create(:title => 'Software Developer', :description => 'Looking for a software developer intern.', :company_id => cp1.id, | ||
:company_person_id => '1', :job_category_id => '1' ) | ||
:company_person_id => cperson.id, :job_category_id =>jcategory1.id ) | ||
Job.create(:title => 'Cashier', :description => 'Looking for well qualified cashier with 5 years experience', :company_id => cp2.id, | ||
:company_person_id => '2', :job_category_id => '2' ) | ||
:company_person_id => cperson2.id, :job_category_id => jcategory.id ) | ||
Job.create(:title => 'Driver', :description => 'Looking for a truck driver with class A license', :company_id => cp3.id, | ||
:company_person_id => '3', :job_category_id => '3' ) | ||
:company_person_id => cperson.id, :job_category_id => jcategory.id ) | ||
Job.create(:title => 'Security Personel', :description => 'If you have Security Guard license, and love to work third shift, than call us.', :company_id => cp4.id, | ||
:company_person_id => '4', :job_category_id => '4' ) | ||
:company_person_id => cperson.id, :job_category_id => jcategory1.id) | ||
|
||
|
||
#incase rerun comes in. not necessary | ||
JobSeekerStatus.delete_all | ||
|
||
['Unemployedlooking', 'Employedlooking', 'Employednotlooking'].each do |status| | ||
case status | ||
when 'Unemployedlooking' | ||
when 'Unemployedlooking' | ||
@jss1 = JobSeekerStatus.find_or_create_by(:value => status, | ||
description: "A jobseeker Without any work and looking for a job.") | ||
when 'Employedlooking' | ||
|
@@ -183,23 +210,6 @@ | |
"1990", confirmed_at: Time.now) | ||
|
||
|
||
|
||
# Job Categories | ||
JobCategory.create(name: 'SW Developer - RoR', | ||
description: 'Ruby on Rails backend developer') | ||
JobCategory.create(name: 'SW Developer - JS', | ||
description: 'Javascript frontend developer') | ||
JobCategory.create(name: 'SW Developer - Java', | ||
description: 'Java backend developer') | ||
JobCategory.create(name: 'SW Project Manager - Agile', | ||
description: 'Manages Agile SW development projects') | ||
JobCategory.create(name: 'SW Project Manager - Waterfall', | ||
description: 'Manages SW development projects using waterfall SDLC') | ||
JobCategory.create(name: 'Product Manager - SaaS', | ||
description: 'Manages SaaS product development and commecialization') | ||
|
||
|
||
|
||
jobseeker = JobSeeker.create(first_name: 'abc',last_name:'def',email:'[email protected]', password:'dfg123',password_confirmation:'dfg123',phone:'345-890-7890',year_of_birth: | ||
"1990", confirmed_at: Time.now) | ||
|
||
|
@@ -218,3 +228,4 @@ | |
|
||
|
||
|
||
# Think we have enough users(JS, AA, JD, CM, CP). We can login in productin env with created creditials. |