Commit e457e016 by Ngo Trung Hung

fix rubocop

parent c874fae5
Pipeline #704 failed with stages
in 0 seconds
# frozen_string_literal: true
# Description/Explanation of Person class
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
require 'nokogiri' require 'nokogiri'
require 'open-uri' require 'open-uri'
include CrawlerHelper
def page_not_found def page_not_found
respond_to do |format| respond_to do |format|
......
# frozen_string_literal: true
# Description/Explanation of Person class
class ApplyJobController < ApplicationController class ApplyJobController < ApplicationController
def new def new
......
# frozen_string_literal: true
# Description/Explanation of Person class
class CityController < ApplicationController class CityController < ApplicationController
def index def index
......
# frozen_string_literal: true
# Description/Explanation of Person class
class ErrorsController < ApplicationController class ErrorsController < ApplicationController
def file_not_found def file_not_found
render 'errors/file_not_found' render 'errors/file_not_found'
......
# frozen_string_literal: true
# Description/Explanation of Person class
class HomeController < ApplicationController class HomeController < ApplicationController
add_breadcrumb "Trang chủ", :root_path add_breadcrumb "Trang chủ", :root_path
def index def index
@industries = Industry.sort_asc.all @industries = Industry.sort_asc.all
@job_count = Job.all.count @job_count = Job.all.count
@five_jobs = Job.order(created_at: :desc).limit(5) @five_jobs = Job.order(created_at: :desc).limit(5)
@cities = City.all @cities = City.all
@top_city = City.top_hot.take(11) @top_city = City.top_hot.take(11)
@top_industry = Industry.top_hot.take(11) @top_industry = Industry.top_hot.take(11)
end end
end end
# frozen_string_literal: true
# Description/Explanation of Person class
class IndustryController < ApplicationController class IndustryController < ApplicationController
def index def index
......
# frozen_string_literal: true
# Description/Explanation of Person class
class JobController < ApplicationController class JobController < ApplicationController
def index def index
end end
def detail def detail
add_breadcrumb "Trang chủ&nbsp;".html_safe, root_path add_breadcrumb "Trang chủ&nbsp;".html_safe, root_path
@job = Job.find(params[:id]) @job = Job.find(params[:id])
city = [] city = []
industry = [] industry = []
@job.cities.each do |val| @job.cities.each do |val|
city << val.name city << val.name
end end
@job.industries.each do |val| @job.industries.each do |val|
industry << val.name industry << val.name
end end
add_breadcrumb "&nbsp;#{city[0]}&nbsp;".html_safe, "/jobs/city/#{city[0]}" add_breadcrumb "&nbsp;#{city[0]}&nbsp;".html_safe, "/jobs/city/#{city[0]}"
add_breadcrumb "&nbsp;#{industry[0]}&nbsp;".html_safe, "/jobs/industry/#{industry[0]}" add_breadcrumb "&nbsp;#{industry[0]}&nbsp;".html_safe, "/jobs/industry/#{industry[0]}"
add_breadcrumb "&nbsp;#{@job.name}".html_safe add_breadcrumb "&nbsp;#{@job.name}".html_safe
end end
def find_data_by_industry def find_data_by_industry
@industries = Industry.sort_asc.all @industries = Industry.sort_asc.all
@cities = City.all @cities = City.all
id_industry = Industry.find_by(name: params[:key_industry]) id_industry = Industry.find_by(name: params[:key_industry])
@fill_data = id_industry.jobs.page(params[:page]) @fill_data = id_industry.jobs.page(params[:page])
render 'result_data' render 'result_data'
end end
def find_data_by_city def find_data_by_city
@industries = Industry.sort_asc.all @industries = Industry.sort_asc.all
@cities = City.all @cities = City.all
id_city = City.find_by(name: params[:key_city]) id_city = City.find_by(name: params[:key_city])
@fill_data = id_city.jobs.page(params[:page]) @fill_data = id_city.jobs.page(params[:page])
render 'result_data' render 'result_data'
end end
def find_data_by_company def find_data_by_company
@industries = Industry.sort_asc.all @industries = Industry.sort_asc.all
@cities = City.all @cities = City.all
company = Company.find_by(name: params[:key_company]) company = Company.find_by(name: params[:key_company])
@fill_data = company.jobs.page(params[:page]) @fill_data = company.jobs.page(params[:page])
render 'result_data' render 'result_data'
end end
end end
class TestController < ApplicationController
def index
end
end
# frozen_string_literal: true
# Description/Explanation of Person class
module ApplicationHelper module ApplicationHelper
def full_title(page_title) def full_title(page_title)
base_title = "VenJob" base_title = 'VenJob'
if page_title.empty? if page_title.empty?
base_title base_title
else else
......
# frozen_string_literal: true
# Description/Explanation of Person class
class ApplicationRecord < ActiveRecord::Base class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true self.abstract_class = true
end end
# frozen_string_literal: true
# Description/Explanation of Person class
class AppliedJob < ApplicationRecord class AppliedJob < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :job belongs_to :job
......
# frozen_string_literal: true
# Description/Explanation of Person class
class City < ApplicationRecord class City < ApplicationRecord
has_many :city_jobs has_many :city_jobs
has_many :jobs, through: :city_jobs has_many :jobs, through: :city_jobs
......
# frozen_string_literal: true
# Description/Explanation of Person class
class CityJob < ApplicationRecord class CityJob < ApplicationRecord
belongs_to :city belongs_to :city
belongs_to :job belongs_to :job
......
# frozen_string_literal: true
# Description/Explanation of Person class
class Company < ApplicationRecord class Company < ApplicationRecord
has_many :jobs has_many :jobs
end end
# frozen_string_literal: true
# Description/Explanation of Person class
class Favorite < ApplicationRecord class Favorite < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :job belongs_to :job
......
# frozen_string_literal: true
# Description/Explanation of Person class
class History < ApplicationRecord class History < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :job belongs_to :job
......
# frozen_string_literal: true
# Description/Explanation of Person class
class Industry < ApplicationRecord class Industry < ApplicationRecord
has_many :industry_jobs has_many :industry_jobs
has_many :jobs, through: :industry_jobs has_many :jobs, through: :industry_jobs
scope :sort_asc, -> { order(name: :asc)} scope :sort_asc, -> { order(name: :asc) }
def self.top_hot def self.top_hot
hash = {} hash = {}
data_industries = Industry.all data_industries = Industry.all
data_industries.each do |val| data_industries.each do |val|
hash[val.name] = val.jobs.count hash[val.name] = val.jobs.count
end end
hash = hash.select { |k,v| v > 0} hash = hash.select { |k,v| v > 0 }
hash.sort_by { |k,v| v }.reverse hash.sort_by { |k,v| v }.reverse
end end
end end
# frozen_string_literal: true
# Description/Explanation of Person class
class IndustryJob < ApplicationRecord class IndustryJob < ApplicationRecord
belongs_to :industry belongs_to :industry
belongs_to :job belongs_to :job
......
# frozen_string_literal: true
# Description/Explanation of Person class
class Job < ApplicationRecord class Job < ApplicationRecord
belongs_to :company belongs_to :company
......
# frozen_string_literal: true
# Description/Explanation of Person class
class User < ApplicationRecord class User < ApplicationRecord
has_many :applied_jobs has_many :applied_jobs
has_many :jobs, through: :applied_jobs has_many :jobs, through: :applied_jobs
......
...@@ -14,7 +14,7 @@ default: &default ...@@ -14,7 +14,7 @@ default: &default
encoding: utf8 encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root username: root
password: '1' password: '12345678'
socket: /var/run/mysqld/mysqld.sock socket: /var/run/mysqld/mysqld.sock
......
...@@ -16,7 +16,7 @@ port ENV.fetch("PORT") { 3000 } ...@@ -16,7 +16,7 @@ port ENV.fetch("PORT") { 3000 }
environment ENV.fetch("RAILS_ENV") { "development" } environment ENV.fetch("RAILS_ENV") { "development" }
# Specifies the `pidfile` that Puma will use. # Specifies the `pidfile` that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } pidfile ENV.fetch('PIDFILE') { "tmp/pids/server.pid" }
# Specifies the number of `workers` to boot in clustered mode. # Specifies the number of `workers` to boot in clustered mode.
# Workers are forked webserver processes. If using threads and workers together # Workers are forked webserver processes. If using threads and workers together
......
# frozen_string_literal: true
Rails.application.routes.draw do Rails.application.routes.draw do
get 'apply_job/create' get 'apply_job/create'
root 'home#index' match 'apply', to: 'apply_job#new', via: :get, constraints: { job_id: /.*/ }
match '/confirm', to: 'apply_job#show', via: 'post'
match '/404', to: "errors#file_not_found", via: :all root 'home#index'
match '/422', to: "errors#unprocessable", via: :all match '/404', to: 'errors#file_not_found', via: :all
match '/500', to: "errors#internal_server_error", via: :all match '/422', to: 'errors#unprocessable', via: :all
match '/500', to: 'errors#internal_server_error', via: :all
match 'apply', to: 'apply_job#new', via: :get, constraints: { job_id: /.*/}
match '/confirm', to: 'apply_job#show', via: 'post'
match 'detail/:id', to: 'job#detail', via: 'get' get 'detail/:id', to: 'job#detail'
match 'jobs/city/(:key_city)', to: 'job#find_data_by_city', via: 'get', constraints: { key_city: /.*/} get 'jobs/city/(:key_city)', to: 'job#find_data_by_city', constraints: { key_city: /.*/ }
match 'jobs/industry/(:key_industry)', to: 'job#find_data_by_industry', via: 'get', constraints: { key_industry: /.*/} get 'jobs/industry/(:key_industry)', to: 'job#find_data_by_industry', constraints: { key_industry: /.*/ }
match 'jobs/company/(:key_company)', to: 'job#find_data_by_company', via: 'get', constraints: { key_company: /.*/} get 'jobs/company/(:key_company)', to: 'job#find_data_by_company', constraints: { key_company: /.*/ }
match 'cities', to: 'city#index', via: 'get' get 'cities', to: 'city#index'
match 'industries', to: 'industry#index', via: 'get' get 'industries', to: 'industry#index'
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end end
# frozen_string_literal: true
env :PATH, ENV['PATH'] env :PATH, ENV['PATH']
every 10.minutes do every 10.minutes do
rake "crawler:populate", output: {error: 'error.log', standard: 'cron.log'} rake 'crawler:populate', output: { error: 'error.log', standard: 'cron.log' }
end end
every :day, at: "19:00pm"do every :day, at: '19:00pm' do
rake "csv:import_csv" rake 'csv:import_csv'
end end
every :day, at: "16:30pm" do every :day, at: '16:30pm' do
rake "crawler:deletelog" rake 'crawler:deletelog'
end end
# frozen_string_literal: true
%w[ %w[
.ruby-version .ruby-version
.rbenv-vars .rbenv-vars
......
Crawling data location...
.
.
.
Save data to database...
------------------------
Crawl data companies
Crawling link on page...
PLease wait...
Result:
Company: 41 link
Job : 50 link
------------------------
Công ty TNHH SXTM XNK Minh Hiền
Học viện VTC Academy
FE CREDIT
CÔNG TY CỔ PHẦN ĐẦU TƯ CHÂU Á THÁI BÌNH DƯƠNG
Công ty TNHH Two Kings Distribution
CÔNG TY TNHH THƯƠNG MẠI DỊCH VỤ XUẤT NHẬP KHẨU TTH VIỆT NAM
Công Ty Cổ Phần Chuỗi Thực Phẩm TH
Công Ty Cổ Phần Quảng Cáo Thương Mại Sen Vàng
Công ty CP Công trình Giao Thông Đồng Nai
Skretting Vietnam - Nutreco International ( Vietnam)
Công Ty Cổ Phần Hà Nội Foods Việt Nam
Monroe Consulting Group Vietnam
CÔNG TY CỔ PHẦN AP SAIGON PETRO
CÔNG TY TNHH SHR VIỆT NAM
Công Ty Cổ Phần Kinh Doanh Chế Biến Nông Sản Bảo Minh
Cty CP Đầu Tư Xây Dựng Trung Nam
CÔNG TY CỔ PHẦN PHÁT TRIỂN BẤT ĐỘNG SẢN CASA HOLDINGS
CÔNG TY CỔ PHẦN PHÂN BÓN HÀ LAN
Công Ty TNHH Golden Phoenix Vietnam
Công ty TNHH Quốc tế Fleming Việt Nam
Công Ty TNHH Aeon Việt Nam
Công Ty TNHH Halo Group
Công Ty Cổ Phần VNG
Công Ty Cổ Phần Diana Unicharm
Ngân Hàng TMCP Phương Đông - OCB
CÔNG TY TNHH SMC MANUFACTURING (VIỆT NAM)
MegaCEO
CÔNG TY TNHH THỰC PHẨM PHÚC LỘC THỌ
CellphoneS & Điện Thoại Vui - Hệ thống bán lẻ và sửa chữa điện thoại di động toàn quốc
Cty TNHH Thời Trang & Mỹ Phẩm Duy Anh (DAFC)
Công ty TNHH Công nghệ Dược phẩm Lotus
Công Ty CP TM DV SX Hương Thủy
EQuest Education Group (EQG)
CÔNG TY TNHH PHỒN THỊNH - TAE GWANG
N KID Corporation
Công ty TNHH Vector Fabrication (Việt Nam)
Công Ty CP Dược Phẩm Pharmacity
CÔNG TY TNHH AZOOM VIETNAM INC.
Công ty Cổ Phần Ẩm Thực Chảo Đỏ
Công Ty TNHH Dịch Vụ Quảng Cáo MC
Công ty Cổ phần Hướng nghiệp Á Âu
Please wait for crawl jobs data! . . .
0 - https://careerbuilder.vn/vi/tim-viec-lam/sales-administration-officer.35B46C1D.html
1 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-kinh-doanh-dai-dien-thuong-mai.35B46C1C.html
2 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-it.35B46C1B.html
3 - https://careerbuilder.vn/vi/tim-viec-lam/thuc-tap-hanh-chinh-nhan-su.35B46BE3.html
4 - https://careerbuilder.vn/vi/tim-viec-lam/key-account.35B46C1E.html
5 - https://careerbuilder.vn/vi/tim-viec-lam/thuc-tap-bien-tap.35B46C1F.html
6 - https://careerbuilder.vn/vi/tim-viec-lam/thuc-tap-sinh-tuyen-dung-ha-noi-02-ho-chi-minh-02.35B46BD8.html
7 - https://careerbuilder.vn/vi/tim-viec-lam/key-account-saler.35B46C22.html
8 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-telesales-my-pham.35B46C24.html
9 - https://careerbuilder.vn/vi/tim-viec-lam/ban-hang-kenh-key-account.35B46C26.html
10 - https://careerbuilder.vn/vi/tim-viec-lam/thuc-tap-sinh-ke-toan.35B46C28.html
11 - https://careerbuilder.vn/vi/tim-viec-lam/digital-bank-junior-project-manager.35B46C29.html
12 - https://careerbuilder.vn/vi/tim-viec-lam/vtc-academy-nhan-vien-telesales-fulltime.35B46C25.html
13 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-kinh-doanh.35B46C27.html
Crawler data jobs success!
Crawling data location...
.
.
.
Save data to database...
------------------------
Crawl data companies
Crawling link on page...
PLease wait...
Result:
Company: 38 link
Job : 50 link
------------------------
Công ty cổ phần tập đoàn giáo dục Edufit
CÔNG TY TNHH TIALOC VIỆT NAM
Mobicast
Tập đoàn Digital Novaon
Công ty CP Công trình Giao Thông Đồng Nai
Công Ty TNHH Digimall
Công ty Cổ Phần Thảo Mộc Xanh Long An
Công ty TNHH MTV Mrspeedy Việt Nam
Ngân Hàng TMCP Quốc Tế Việt Nam (VIB)
Tổng Công Ty CP Bảo Hiểm Bảo Long
Công ty TNHH SXTM XNK Minh Hiền
Học viện VTC Academy
FE CREDIT
CÔNG TY CỔ PHẦN ĐẦU TƯ CHÂU Á THÁI BÌNH DƯƠNG
Công ty TNHH Two Kings Distribution
CÔNG TY TNHH THƯƠNG MẠI DỊCH VỤ XUẤT NHẬP KHẨU TTH VIỆT NAM
Công Ty Cổ Phần Chuỗi Thực Phẩm TH
Công Ty Cổ Phần Quảng Cáo Thương Mại Sen Vàng
Skretting Vietnam - Nutreco International ( Vietnam)
Công Ty Cổ Phần Hà Nội Foods Việt Nam
Monroe Consulting Group Vietnam
CÔNG TY CỔ PHẦN AP SAIGON PETRO
CÔNG TY TNHH SHR VIỆT NAM
Công Ty Cổ Phần Kinh Doanh Chế Biến Nông Sản Bảo Minh
Cty CP Đầu Tư Xây Dựng Trung Nam
CÔNG TY CỔ PHẦN PHÁT TRIỂN BẤT ĐỘNG SẢN CASA HOLDINGS
CÔNG TY CỔ PHẦN PHÂN BÓN HÀ LAN
Công Ty TNHH Golden Phoenix Vietnam
Công ty TNHH Quốc tế Fleming Việt Nam
Công Ty TNHH Aeon Việt Nam
Công Ty TNHH Halo Group
Công Ty Cổ Phần VNG
Công Ty Cổ Phần Diana Unicharm
Ngân Hàng TMCP Phương Đông - OCB
CÔNG TY TNHH SMC MANUFACTURING (VIỆT NAM)
MegaCEO
CÔNG TY TNHH THỰC PHẨM PHÚC LỘC THỌ
Please wait for crawl jobs data! . . .
0 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-van-thu.35B46C23.html
1 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-ban-bao-hiem-con-nguoi.35B46B6C.html
2 - https://careerbuilder.vn/vi/tim-viec-lam/quan-ly-khach-hang-cao-cap-quan-ly-khach-hang-doanh-nghiep.35B46C1A.html
3 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-qc-nganh-in-an.35B46C20.html
4 - https://careerbuilder.vn/vi/tim-viec-lam/senior-business-development-executive.35B447EB.html
5 - https://careerbuilder.vn/vi/tim-viec-lam/nhan-vien-qc-nganh-nhua.35B46C08.html
6 - https://careerbuilder.vn/vi/tim-viec-lam/ke-toan-vien-kiem-admin-accountant-cum-administrator.35B46C2A.html
7 - https://careerbuilder.vn/vi/tim-viec-lam/tai-xe.35B46C2B.html
8 - https://careerbuilder.vn/vi/tim-viec-lam/truong-phong-cham-soc-khach-hang.35B46C2C.html
9 - https://careerbuilder.vn/vi/tim-viec-lam/lap-trinh-vien.35B46C2E.html
10 - https://careerbuilder.vn/vi/tim-viec-lam/project-sales-executive.35B46C2D.html
11 - https://careerbuilder.vn/vi/tim-viec-lam/lap-trinh-vien-trung-tam-nghien-cuu-va-phat-trien-san-pham.35B46C31.html
12 - https://careerbuilder.vn/vi/tim-viec-lam/truong-ban-esl.35B46C30.html
Crawler data jobs success!
Crawling data location...
.
.
.
Save data to database...
------------------------
Crawl data companies
Crawling link on page...
PLease wait...
Result:
Company: 35 link
Job : 50 link
------------------------
Học viện VTC Academy
Ngân Hàng TMCP Tiên Phong
CÔNG TY TNHH TIALOC VIỆT NAM
CÔNG TY CỔ PHẦN ĐẦU TƯ CHÂU Á THÁI BÌNH DƯƠNG
Công ty cổ phần tập đoàn giáo dục Edufit
Mobicast
Tập đoàn Digital Novaon
Công ty CP Công trình Giao Thông Đồng Nai
Công Ty TNHH Digimall
Công ty Cổ Phần Thảo Mộc Xanh Long An
Công ty TNHH MTV Mrspeedy Việt Nam
Ngân Hàng TMCP Quốc Tế Việt Nam (VIB)
Tổng Công Ty CP Bảo Hiểm Bảo Long
Công ty TNHH SXTM XNK Minh Hiền
FE CREDIT
Công ty TNHH Two Kings Distribution
CÔNG TY TNHH THƯƠNG MẠI DỊCH VỤ XUẤT NHẬP KHẨU TTH VIỆT NAM
Công Ty Cổ Phần Chuỗi Thực Phẩm TH
Công Ty Cổ Phần Quảng Cáo Thương Mại Sen Vàng
Skretting Vietnam - Nutreco International ( Vietnam)
Công Ty Cổ Phần Hà Nội Foods Việt Nam
Monroe Consulting Group Vietnam
CÔNG TY CỔ PHẦN AP SAIGON PETRO
CÔNG TY TNHH SHR VIỆT NAM
Công Ty Cổ Phần Kinh Doanh Chế Biến Nông Sản Bảo Minh
Cty CP Đầu Tư Xây Dựng Trung Nam
CÔNG TY CỔ PHẦN PHÁT TRIỂN BẤT ĐỘNG SẢN CASA HOLDINGS
CÔNG TY CỔ PHẦN PHÂN BÓN HÀ LAN
Công Ty TNHH Golden Phoenix Vietnam
Công ty TNHH Quốc tế Fleming Việt Nam
Công Ty TNHH Aeon Việt Nam
Công Ty TNHH Halo Group
Công Ty Cổ Phần VNG
Công Ty Cổ Phần Diana Unicharm
Please wait for crawl jobs data! . . .
Crawling data location...
.
.
.
Save data to database...
------------------------
Crawl data companies
Crawling link on page...
PLease wait...
Result:
Company: 34 link
Job : 50 link
------------------------
Công Ty Cổ Phần Quảng Cáo Thương Mại Sen Vàng
# frozen_string_literal: true
# This file is auto-generated from the current state of the database. Instead # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
...@@ -12,93 +13,92 @@ ...@@ -12,93 +13,92 @@
ActiveRecord::Schema.define(version: 2020_07_20_035021) do ActiveRecord::Schema.define(version: 2020_07_20_035021) do
create_table "applied_jobs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'applied_jobs', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.bigint "user_id" t.bigint 'user_id'
t.bigint "job_id" t.bigint 'job_id'
t.string "name" t.string 'name'
t.string "email" t.string 'email'
t.text "cv" t.text 'cv'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
t.index ["job_id"], name: "index_applied_jobs_on_job_id" t.index ['job_id'], name: 'index_applied_jobs_on_job_id'
t.index ["user_id"], name: "index_applied_jobs_on_user_id" t.index ['user_id'], name: 'index_applied_jobs_on_user_id'
end end
create_table "cities", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'cities', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.string "name" t.string 'name'
t.boolean "area" t.boolean 'area'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
end end
create_table "city_jobs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'city_jobs', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.bigint "job_id" t.bigint 'job_id'
t.bigint "city_id" t.bigint 'city_id'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
t.index ["city_id"], name: "index_city_jobs_on_city_id" t.index ['city_id'], name: 'index_city_jobs_on_city_id'
t.index ["job_id"], name: "index_city_jobs_on_job_id" t.index ['job_id'], name: 'index_city_jobs_on_job_id'
end end
create_table "companies", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'companies', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.string "name" t.string 'name'
t.string "address" t.string 'address'
t.text "short_description" t.text 'short_description'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
end end
create_table "favorites", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'favorites', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.integer "user_id" t.integer 'user_id'
t.integer "job_id" t.integer 'job_id'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
end end
create_table "histories", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'histories', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.integer "user_id" t.integer 'user_id'
t.integer "job_id" t.integer 'job_id'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
end end
create_table "industries", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'industries', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.string "name" t.string 'name'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
end end
create_table "industry_jobs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'industry_jobs', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.bigint "industry_id" t.bigint 'industry_id'
t.bigint "job_id" t.bigint 'job_id'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
t.index ["industry_id"], name: "index_industry_jobs_on_industry_id" t.index ['industry_id'], name: 'index_industry_jobs_on_industry_id'
t.index ["job_id"], name: "index_industry_jobs_on_job_id" t.index ['job_id'], name: 'index_industry_jobs_on_job_id'
end end
create_table "jobs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'jobs', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.string "name" t.string 'name'
t.integer "company_id" t.integer 'company_id'
t.string "level" t.string 'level'
t.string "experience" t.string 'experience'
t.string "salary" t.string 'salary'
t.datetime "create_date" t.datetime 'create_date'
t.datetime "expiration_date" t.datetime 'expiration_date'
t.text "description" t.text 'description'
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
t.boolean "newdata" t.boolean 'newdata'
end end
create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table 'users', options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8', force: :cascade do |t|
t.string "email" t.string 'email'
t.string "name" t.string 'name'
t.string "password_digest" t.string 'password_digest'
t.text "cv" t.text 'cv'
t.boolean "admin", default: false t.boolean 'admin', default: false
t.datetime "created_at", null: false t.datetime 'created_at', null: false
t.datetime "updated_at", null: false t.datetime 'updated_at', null: false
end end
end end
# frozen_string_literal: true
# This file should contain all the record creation needed to seed the database with its default values. # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
# #
......
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error::ConnectionError: MySQL server has gone away: SELECT `industries`.* FROM `industries` WHERE `industries`.`name` = 'Ngân hàng' LIMIT 1
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:186:in `block in make_foreign_industries_table'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:184:in `each'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:184:in `make_foreign_industries_table'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:98:in `add_data'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:130:in `crawl_data_jobs_interface_1'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:212:in `block in make_data'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:209:in `each'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:209:in `each_with_index'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:209:in `make_data'
/home/hungnt/hungnt_venjob/lib/tasks/crawler.rake:9:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Caused by:
Mysql2::Error::ConnectionError: MySQL server has gone away
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:186:in `block in make_foreign_industries_table'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:184:in `each'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:184:in `make_foreign_industries_table'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:98:in `add_data'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:130:in `crawl_data_jobs_interface_1'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:212:in `block in make_data'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:209:in `each'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:209:in `each_with_index'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:209:in `make_data'
/home/hungnt/hungnt_venjob/lib/tasks/crawler.rake:9:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
SocketError: Failed to open TCP connection to careerbuilder.vn:443 (getaddrinfo: Temporary failure in name resolution)
/home/hungnt/venjob/lib/src/interface_web.rb:40:in `craw_data_cities'
/home/hungnt/venjob/lib/tasks/crawler.rake:7:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Caused by:
SocketError: getaddrinfo: Temporary failure in name resolution
/home/hungnt/venjob/lib/src/interface_web.rb:40:in `craw_data_cities'
/home/hungnt/venjob/lib/tasks/crawler.rake:7:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
Net::OpenTimeout: execution expired
/home/hungnt/venjob/lib/src/interface_web.rb:40:in `craw_data_cities'
/home/hungnt/venjob/lib/tasks/crawler.rake:7:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
Net::OpenTimeout: execution expired
/home/hungnt/venjob/lib/src/interface_web.rb:40:in `craw_data_cities'
/home/hungnt/venjob/lib/tasks/crawler.rake:7:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
Net::OpenTimeout: execution expired
/home/hungnt/venjob/lib/src/interface_web.rb:40:in `craw_data_cities'
/home/hungnt/venjob/lib/tasks/crawler.rake:7:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
Net::OpenTimeout: execution expired
/home/hungnt/venjob/lib/src/interface_web.rb:40:in `craw_data_cities'
/home/hungnt/venjob/lib/tasks/crawler.rake:7:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
ArgumentError: You should not use the `match` method in your router without specifying an HTTP method.
If you want to expose your action to both GET and POST, add `via: [:get, :post]` option.
If you want to expose your action to GET, use `get` in the router:
Instead of: match "controller#action"
Do: get "controller#action"
/home/hungnt/venjob/config/routes.rb:4:in `block in <main>'
/home/hungnt/venjob/config/routes.rb:1:in `<main>'
/home/hungnt/venjob/config/environment.rb:5:in `<main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate => environment
(See full trace by running task with --trace)
rake aborted!
NoMethodError: undefined method `rescue_from' for #<ActionDispatch::Routing::Mapper:0x000055ef745fa5a0>
Did you mean? rescue
/home/hungnt/venjob/config/routes.rb:6:in `block in <main>'
/home/hungnt/venjob/config/routes.rb:1:in `<main>'
/home/hungnt/venjob/config/environment.rb:5:in `<main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate => environment
(See full trace by running task with --trace)
rake aborted!
SyntaxError: /home/hungnt/venjob/config/routes.rb:6: syntax error, unexpected tIDENTIFIER, expecting end
...to: "errors#unprocessable'" via: :all
... ^~~
/home/hungnt/venjob/config/environment.rb:5:in `<main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate => environment
(See full trace by running task with --trace)
rake aborted!
SocketError: Failed to open TCP connection to careerbuilder.vn:443 (getaddrinfo: Temporary failure in name resolution)
/home/hungnt/venjob/lib/src/interface_web.rb:63:in `block in craw_data_companies'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each_with_index'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `craw_data_companies'
/home/hungnt/venjob/lib/tasks/crawler.rake:8:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Caused by:
SocketError: getaddrinfo: Temporary failure in name resolution
/home/hungnt/venjob/lib/src/interface_web.rb:63:in `block in craw_data_companies'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each_with_index'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `craw_data_companies'
/home/hungnt/venjob/lib/tasks/crawler.rake:8:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
SocketError: Failed to open TCP connection to careerbuilder.vn:443 (getaddrinfo: Temporary failure in name resolution)
/home/hungnt/venjob/lib/src/interface_web.rb:63:in `block in craw_data_companies'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each_with_index'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `craw_data_companies'
/home/hungnt/venjob/lib/tasks/crawler.rake:8:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Caused by:
SocketError: getaddrinfo: Temporary failure in name resolution
/home/hungnt/venjob/lib/src/interface_web.rb:63:in `block in craw_data_companies'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `each_with_index'
/home/hungnt/venjob/lib/src/interface_web.rb:62:in `craw_data_companies'
/home/hungnt/venjob/lib/tasks/crawler.rake:8:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
SyntaxError: /home/hungnt/hungnt_venjob/config/routes.rb:9: syntax error, unexpected tIDENTIFIER, expecting end
...tch 'apply?job_id=(:job_id)' to: 'job#new_apply', via: 'get'
... ^~
/home/hungnt/hungnt_venjob/config/environment.rb:5:in `<main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate => environment
(See full trace by running task with --trace)
rake aborted!
TypeError: no implicit conversion of URI::Generic into String
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:225:in `block in make_data'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:224:in `each'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:224:in `each_with_index'
/home/hungnt/hungnt_venjob/lib/src/interface_web.rb:224:in `make_data'
/home/hungnt/hungnt_venjob/lib/tasks/crawler.rake:9:in `block (2 levels) in <main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
=> 2020-07-26 20:23:43 +0700 IMPORT SUCCESS
\ No newline at end of file
# frozen_string_literal: true
require 'zip' require 'zip'
# Description/Explanation of Person class
def extract_zip(file, destination) def extract_zip(file, destination)
FileUtils.mkdir_p(destination) FileUtils.mkdir_p(destination)
Zip::File.open(file) do |zip_file| Zip::File.open(file) do |zip_file|
...@@ -8,4 +11,4 @@ def extract_zip(file, destination) ...@@ -8,4 +11,4 @@ def extract_zip(file, destination)
zip_file.extract(f, fpath) unless File.exist?(fpath) zip_file.extract(f, fpath) unless File.exist?(fpath)
end end
end end
end end
\ No newline at end of file
# frozen_string_literal: true
require 'open-uri' require 'open-uri'
require 'logger' require 'logger'
require 'src/interface_web' require 'src/interface_web'
namespace :crawler do # Description/Explanation of Person class
task populate: :environment do namespace :crawler do
InterfaceWeb.craw_data_cities() task populate: :environment do
InterfaceWeb.craw_data_companies() InterfaceWeb.craw_data_cities
InterfaceWeb.make_data() InterfaceWeb.craw_data_companies
File.open('log/crawler.log','a') do |f| InterfaceWeb.make_data
File.open('log/crawler.log', 'a') do |f|
f.puts "#{Time.now} - INFO: Crawler data don't have error!" f.puts "#{Time.now} - INFO: Crawler data don't have error!"
end end
end end
task deletelog: :environment do task deletelog: :environment do
File.open('cron.log','w') { |file| File.truncate(file,0) } File.open('cron.log', 'w') { |file| File.truncate(file, 0) }
end end
end end
# frozen_string_literal: true
require 'src/ftp' require 'src/ftp'
namespace :csv do
task import_csv: :environment do # Description/Explanation of Person class
File.write('importcsv.log', "=> #{Time.now} IMPORT SUCCESS") namespace :csv do
task import_csv: :environment do
File.write('importcsv.log', "=> #{Time.now} IMPORT CSV SUCCESS")
Company.find_or_create_by(name: 'Bảo mật', address: 'Vui lòng xem trong mô tả công việc') do |company| Company.find_or_create_by(name: 'Bảo mật', address: 'Vui lòng xem trong mô tả công việc') do |company|
company.name = 'Bảo mật' company.name = 'Bảo mật'
company.address = 'Vui lòng xem trong mô tả công việc' company.address = 'Vui lòng xem trong mô tả công việc'
company.short_description = 'Vui lòng xem trong mô tả công việc' company.short_description = 'Vui lòng xem trong mô tả công việc'
end end
FtpSever.import_data_from_csv FtpSever.import_data_from_csv
end end
end end
\ No newline at end of file
namespace :user do # frozen_string_literal: true
task fakedata: :environment do
namespace :user do
task fakedata: :environment do
User.create!(email: 'trunghung5055@gmail.com', User.create!(email: 'trunghung5055@gmail.com',
name: 'Ngô Trung Hưng', name: 'Ngô Trung Hưng',
password_digest: '1111', password_digest: '1111',
admin: 1) admin: 1)
end end
end end
\ No newline at end of file
require "test_helper" # frozen_string_literal: true
require 'test_helper'
# Description/Explanation of Person class
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, using: :chrome, screen_size: [1400, 1400] driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class ApplyJobControllerTest < ActionDispatch::IntegrationTest class ApplyJobControllerTest < ActionDispatch::IntegrationTest
test "should get new" do test 'should get new' do
get apply_job_new_url get apply_job_new_url
assert_response :success assert_response :success
end end
test "should get show" do test 'should get show' do
get apply_job_show_url get apply_job_show_url
assert_response :success assert_response :success
end end
test "should get create" do test 'should get create' do
get apply_job_create_url get apply_job_create_url
assert_response :success assert_response :success
end end
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class CityControllerTest < ActionDispatch::IntegrationTest class CityControllerTest < ActionDispatch::IntegrationTest
test "should get index" do test 'should get index' do
get city_index_url get city_index_url
assert_response :success assert_response :success
end end
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class ErrorsControllerTest < ActionDispatch::IntegrationTest class ErrorsControllerTest < ActionDispatch::IntegrationTest
test "should get file_not_found" do test 'should get file_not_found' do
get errors_file_not_found_url get errors_file_not_found_url
assert_response :success assert_response :success
end end
test "should get unprocessable" do test 'should get unprocessable' do
get errors_unprocessable_url get errors_unprocessable_url
assert_response :success assert_response :success
end end
test "should get internal_server_error" do test 'should get internal_server_error' do
get errors_internal_server_error_url get errors_internal_server_error_url
assert_response :success assert_response :success
end end
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class HomeControllerTest < ActionDispatch::IntegrationTest class HomeControllerTest < ActionDispatch::IntegrationTest
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class IndustryControllerTest < ActionDispatch::IntegrationTest class IndustryControllerTest < ActionDispatch::IntegrationTest
test "should get index" do test 'should get index' do
get industry_index_url get industry_index_url
assert_response :success assert_response :success
end end
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class JobControllerTest < ActionDispatch::IntegrationTest class JobControllerTest < ActionDispatch::IntegrationTest
test "should get index" do test 'should get index' do
get job_index_url get job_index_url
assert_response :success assert_response :success
end end
test "should get detail" do test 'should get detail' do
get job_detail_url get job_detail_url
assert_response :success assert_response :success
end end
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class TestControllerTest < ActionDispatch::IntegrationTest class TestControllerTest < ActionDispatch::IntegrationTest
test "should get index" do test 'should get index' do
get test_index_url get test_index_url
assert_response :success assert_response :success
end end
end end
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class AppliedJobTest < ActiveSupport::TestCase class AppliedJobTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class CityJobTest < ActiveSupport::TestCase class CityJobTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class CityTest < ActiveSupport::TestCase class CityTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class CompanyTest < ActiveSupport::TestCase class CompanyTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class FavoriteTest < ActiveSupport::TestCase class FavoriteTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class HistoryTest < ActiveSupport::TestCase class HistoryTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class IndustryJobTest < ActiveSupport::TestCase class IndustryJobTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class IndustryTest < ActiveSupport::TestCase class IndustryTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class JobTest < ActiveSupport::TestCase class JobTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
require 'test_helper' require 'test_helper'
# Description/Explanation of Person class
class UserTest < ActiveSupport::TestCase class UserTest < ActiveSupport::TestCase
# test "the truth" do # test "the truth" do
# assert true # assert true
......
# frozen_string_literal: true
ENV['RAILS_ENV'] ||= 'test' ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment' require_relative '../config/environment'
require 'rails/test_help' require 'rails/test_help'
# Description/Explanation of Person class
class ActiveSupport::TestCase class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all fixtures :all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment