Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
venjob
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Huỳnh Thiên Phước
  • venjob
  • Merge Requests
  • !1

Merged
Opened Jul 28, 2020 by Huỳnh Thiên Phước@phuocht 
  • Report abuse
Report abuse

Page

×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b page origin/page

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout master
git merge --no-ff page

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 54
  • Commits 34
  • Pipelines 28
  • Changes 41
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Huỳnh Thiên Phước @phuocht

    closed

    Jul 28, 2020

    closed

    closed
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    reopened

    Jul 28, 2020

    reopened

    reopened
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • eb99c066 - Update 123456

    Compare with previous version

    Jul 28, 2020

    added 1 commit

    • eb99c066 - Update 123456

    Compare with previous version

    added 1 commit * eb99c066 - Update 123456 [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4860&start_sha=941b0f2580e1b8dec9c476f037cf85b90b02d2f2)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 92e5cb10 - Update 123456.pub

    Compare with previous version

    Jul 28, 2020

    added 1 commit

    • 92e5cb10 - Update 123456.pub

    Compare with previous version

    added 1 commit * 92e5cb10 - Update 123456.pub [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4861&start_sha=eb99c0663311b6fa7cc8028611cd65f3ab816953)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    closed

    Jul 28, 2020

    closed

    closed
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    reopened

    Jul 28, 2020

    reopened

    reopened
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 3 commits

    • 5204717b - Remove CSS files
    • 6ab472c3 - Fix code
    • b29fa28d - Fix code

    Compare with previous version

    Jul 28, 2020

    added 3 commits

    • 5204717b - Remove CSS files
    • 6ab472c3 - Fix code
    • b29fa28d - Fix code

    Compare with previous version

    added 3 commits * 5204717b - Remove CSS files * 6ab472c3 - Fix code * b29fa28d - Fix code [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4874&start_sha=92e5cb10ee3031d57d2dbae4024f2fd67889f6a7)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 8d1b59bc - Fix code and remove css.file

    Compare with previous version

    Jul 29, 2020

    added 1 commit

    • 8d1b59bc - Fix code and remove css.file

    Compare with previous version

    added 1 commit * 8d1b59bc - Fix code and remove css.file [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4880&start_sha=b29fa28deba53e8aa1611caa6c67ade0d9522f85)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 6cc90fd0 - Update crawler_import.rake

    Compare with previous version

    Jul 29, 2020

    added 1 commit

    • 6cc90fd0 - Update crawler_import.rake

    Compare with previous version

    added 1 commit * 6cc90fd0 - Update crawler_import.rake [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4881&start_sha=8d1b59bcdde84cd7f14ebc15d057b62243b9c285)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/controllers/top_pages_controller.rb 0 → 100644
    1 class TopPagesController < ApplicationController
    2 def index
    3 @total = Job.ids
    4 end
    5 def show
    6 @job = Job.all.order(created_at: :desc)
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      @job => @jobs

      `@job` => `@jobs`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#67830ae7ea757a07c29f13c2a88a2ba8ad0d37b8_6_3)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/controllers/top_pages_controller.rb 0 → 100644
    1 class TopPagesController < ApplicationController
    2 def index
    3 @total = Job.ids
    4 end
    5 def show
    6 @job = Job.all.order(created_at: :desc)
    7 @company = Company.all
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      @company => @companies

      `@company` => `@companies`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#67830ae7ea757a07c29f13c2a88a2ba8ad0d37b8_7_3)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/views/top_pages/show.html.erb 0 → 100644
    1 <% provide(:title, 'All jobs') %>
    2 <% @job.each do |job| %>
    3 <% if !job.cities.blank? %>
    • Hoang Phuc Do @phucdh commented Jul 29, 2020
      if job.cities.present?
      ```ruby if job.cities.present? ```
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#edf2081ac4e51d5522ead5c7029be1b0f3cb305a_3_0)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/src/crontab.rb 0 → 100644
    1 class Crontab
    2 def initialize(logger)
    3 @mylogger = logger
    4 end
    5
    6 def find_company
    7 company_info = Nokogiri::HTML(URI.open("https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-trang-1-vi.html"))
    8 company_link = company_info.css('div.caption a.company-name').map { |link| link['href'] }
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      company_links

      `company_links`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#ff96edb8f6368223375814f6559b35e1fef3cca9_8_8)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/src/crontab.rb 0 → 100644
    1 class Crontab
    2 def initialize(logger)
    3 @mylogger = logger
    4 end
    5
    6 def find_company
    7 company_info = Nokogiri::HTML(URI.open("https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-trang-1-vi.html"))
    8 company_link = company_info.css('div.caption a.company-name').map { |link| link['href'] }
    9 company_link.each do |link|
    10 next if link == 'javascript:void(0);'
    11 if link != 'https://careerbuilder.vn/vi/nha-tuyen-dung/hr-vietnam\xE2\x80\x99s-ess-client.35A4EFBA.html'
    12 company_page = Nokogiri::HTML(URI.open(URI.parse(URI.escape(link))))
    13 unless (company_page.search('p.name').text).nil?
    • Hoang Phuc Do @phucdh commented Jul 29, 2020
      if company_page.search('p.name').text.present?
      ```ruby if company_page.search('p.name').text.present? ```
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#ff96edb8f6368223375814f6559b35e1fef3cca9_13_11)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/src/crontab.rb 0 → 100644
    22 introduction: introduction_company)
    23 end
    24 rescue StandardError => e
    25 @mylogger.error "#{e.message}"
    26 end
    27 end
    28 end
    29 end
    30 end
    31 def find_job
    32 page_access = Nokogiri::HTML(URI.open("https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-vi.html"))
    33 get_link = page_access.css('a.job_link').map { |link| link['href'] }
    34 get_link.each do |link|
    35 page_job = Nokogiri::HTML(URI.open(URI.parse(URI.escape(link))))
    36 get_row = page_job.search('div.bg-blue div.row')
    37 if get_row != ""
    • Hoang Phuc Do @phucdh commented Jul 29, 2020
      if get_row.present?
      ```ruby if get_row.present? ```
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#ff96edb8f6368223375814f6559b35e1fef3cca9_37_35)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/src/crontab.rb 0 → 100644
    34 get_link.each do |link|
    35 page_job = Nokogiri::HTML(URI.open(URI.parse(URI.escape(link))))
    36 get_row = page_job.search('div.bg-blue div.row')
    37 if get_row != ""
    38 begin
    39 get_name_company = page_job.search('div.job-desc a.job-company-name').text.strip
    40 company_table = Company.find_by(name: get_name_company)
    41 title_job = page_job.search('div.job-desc p').text
    42 description = page_job.search('div.detail-row')
    43 next if company_table.nil?
    44 job_check = Job.find_by(title: title_job, company_id: company_table.id)
    45 salary = get_row.at_xpath('//li[./strong/i[contains(@class, "fa fa-usd")]]/p').text.strip
    46 experience = get_row.at_xpath('//li[./strong/i[contains(@class, "fa fa-briefcase")]]/p').text.strip
    47 level = get_row.at_xpath('//li[./strong/i[contains(@class, "mdi mdi-account")]]/p').text.strip
    48 expiration_date = get_row.at_xpath('//li[./strong/i[contains(@class, "mdi mdi-calendar-check")]]/p').text.strip
    49 if job_check.nil?
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      if job_check.blank?

      `if job_check.blank?`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#ff96edb8f6368223375814f6559b35e1fef3cca9_49_47)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/src/crontab.rb 0 → 100644
    45 salary = get_row.at_xpath('//li[./strong/i[contains(@class, "fa fa-usd")]]/p').text.strip
    46 experience = get_row.at_xpath('//li[./strong/i[contains(@class, "fa fa-briefcase")]]/p').text.strip
    47 level = get_row.at_xpath('//li[./strong/i[contains(@class, "mdi mdi-account")]]/p').text.strip
    48 expiration_date = get_row.at_xpath('//li[./strong/i[contains(@class, "mdi mdi-calendar-check")]]/p').text.strip
    49 if job_check.nil?
    50 job = Job.create!(title: title_job,
    51 level: level,
    52 salary: salary,
    53 experience: experience,
    54 expiration_date: expiration_date,
    55 description: description,
    56 company_id: company_table.id)
    57 end
    58 find_job = Job.find_by(title: title_job, company_id: company_table.id)
    59 puts find_job.title
    60 unless find_job.nil?
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      if find_job.present?

      `if find_job.present?`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#ff96edb8f6368223375814f6559b35e1fef3cca9_60_58)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/tasks/crawler_import.rake
    10 15 action.crawl_industry
    11 16 action.crawl_company
    12 17 action.crawl_job_relationships
    13 18 end
    14 desc "get file CSV from server"
    15 task csv_get: :environment do
    19 desc 'Crontab'
    20 task auto: :environment do
    21 action = Crawler.new(logger)
    22 crontab = Crontab.new(logger)
    23 crontab.find_company
    24 crontab.find_job
    16 25 action.get_file_csv
    17 action.extract_zip('./jobs.zip','.')
    26 action.extract_zip('./jobs.zip', 'lib/csv')
    27 action.import_file_csv('lib/csv/jobs.csv')
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      Đường dẫn đến file nên sử dụng Rails.root.join

      Rails.root.join('lib', 'csv', 'jobs.csv')
      Đường dẫn đến file nên sử dụng `Rails.root.join` ```ruby Rails.root.join('lib', 'csv', 'jobs.csv') ```
    • Huỳnh Thiên Phước @phuocht commented Jul 29, 2020
      Master

      dạ ok a, e fix lại

      dạ ok a, e fix lại
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#45e7893bb0747bdeb043c90591562045ffd98f61_27_27)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    lib/src/crontab.rb 0 → 100644
    57 end
    58 find_job = Job.find_by(title: title_job, company_id: company_table.id)
    59 puts find_job.title
    60 unless find_job.nil?
    61 location_rel = get_row.css('div.map p a').children.map { |location| location.text.strip }
    62 location_rel.each do |loc|
    63 city_table = City.find_by(name: loc)
    64 if CityJob.find_by(job_id: find_job.id, city_id: city_table.id).nil?
    65 puts "Created City: #{find_job.id} - #{city_table.id}.#{loc}"
    66 city_jobs = CityJob.create!(job_id: find_job.id, city_id: city_table.id)
    67 end
    68 end
    69 industry_rel = get_row.css('li a').children.map { |industry| industry.text.strip }
    70 industry_rel.each do |ind|
    71 industry_table = Industry.find_by(name: ind)
    72 if IndustryJob.find_by(job_id: find_job.id, industry_id: industry_table.id).nil?
    • Hoang Phuc Do @phucdh commented Jul 29, 2020
      unless IndustryJob.exists?(job_id: find_job.id, industry_id: industry_table.id)
      ```ruby unless IndustryJob.exists?(job_id: find_job.id, industry_id: industry_table.id) ```
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 9 of the diff

      Jul 30, 2020

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda#ff96edb8f6368223375814f6559b35e1fef3cca9_72_71)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 29, 2020
    Last updated by Huỳnh Thiên Phước Jul 31, 2020
    lib/src/crontab.rb 0 → 100644
    56 company_id: company_table.id)
    57 end
    58 find_job = Job.find_by(title: title_job, company_id: company_table.id)
    59 puts find_job.title
    60 unless find_job.nil?
    61 location_rel = get_row.css('div.map p a').children.map { |location| location.text.strip }
    62 location_rel.each do |loc|
    63 city_table = City.find_by(name: loc)
    64 if CityJob.find_by(job_id: find_job.id, city_id: city_table.id).nil?
    65 puts "Created City: #{find_job.id} - #{city_table.id}.#{loc}"
    66 city_jobs = CityJob.create!(job_id: find_job.id, city_id: city_table.id)
    67 end
    68 end
    69 industry_rel = get_row.css('li a').children.map { |industry| industry.text.strip }
    70 industry_rel.each do |ind|
    71 industry_table = Industry.find_by(name: ind)
    • Hoang Phuc Do @phucdh commented Jul 29, 2020

      Nên kiểm tra nếu giá trị này bị nil

      Nên kiểm tra nếu giá trị này bị `nil`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 14 of the diff

      Jul 31, 2020

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4891&start_sha=c18c0034d0774f1da98df844fa89161874a70abc#ff96edb8f6368223375814f6559b35e1fef3cca9_70_83)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 2 commits

    • 8debe948 - Fix code and delete unnecessary files CSS
    • d2adce0b - add file rake

    Compare with previous version

    Jul 30, 2020

    added 2 commits

    • 8debe948 - Fix code and delete unnecessary files CSS
    • d2adce0b - add file rake

    Compare with previous version

    added 2 commits * 8debe948 - Fix code and delete unnecessary files CSS * d2adce0b - add file rake [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4884&start_sha=6cc90fd0394bf899614d05e2f5b6804349a5cfda)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • a61a09ea - edit file

    Compare with previous version

    Jul 30, 2020

    added 1 commit

    • a61a09ea - edit file

    Compare with previous version

    added 1 commit * a61a09ea - edit file [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4885&start_sha=d2adce0b85aa09cfb6cd0f5d7c47bb35021003b1)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 8d6e1469 - edit file

    Compare with previous version

    Jul 30, 2020

    added 1 commit

    • 8d6e1469 - edit file

    Compare with previous version

    added 1 commit * 8d6e1469 - edit file [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4886&start_sha=a61a09eaf55cf74a87d6ef3527ab9c3f1e0d0264)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 79e6c572 - Fix code Import CSV and show Industry, City, Job

    Compare with previous version

    Jul 30, 2020

    added 1 commit

    • 79e6c572 - Fix code Import CSV and show Industry, City, Job

    Compare with previous version

    added 1 commit * 79e6c572 - Fix code Import CSV and show Industry, City, Job [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4887&start_sha=8d6e14692c28e5c4a6f5ebe71c3c0081f648a8d2)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/views/layouts/_show_cities.html.erb 0 → 100644
    1 <% @jobs_of_cities.each do |city, count_job| %>
    2 <% @index += 1 %>
    3 <% if @index % 3 == 0 %>
    • Hoang Phuc Do @phucdh commented Jul 30, 2020

      Đây là kiểm tra số lẻ phải không?

      Có thể dùng method #odd?

      @index.odd?
      Edited Jul 30, 2020 by Hoang Phuc Do
      Đây là kiểm tra số lẻ phải không? Có thể dùng method `#odd?` ```ruby @index.odd? ```
    • Huỳnh Thiên Phước @phuocht commented Jul 30, 2020
      Master

      dạ ko a ơi cái này e làm chia cột, cứ tới vị trí cột thứ 3 thì xuống row khác

      dạ ko a ơi cái này e làm chia cột, cứ tới vị trí cột thứ 3 thì xuống row khác
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 13 of the diff

      Jul 30, 2020

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4889&start_sha=79e6c57261f9def23f49d3358af37423c0b66a65#68c56b09c9b168064b848e666682f27909aef1d0_3_2)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/views/layouts/_show_cities.html.erb 0 → 100644
    1 <% @jobs_of_cities.each do |city, count_job| %>
    2 <% @index += 1 %>
    • Hoang Phuc Do @phucdh commented Jul 30, 2020

      Sao index lại cần là instance variable ?

      Có thể dùng local variable được không ?

      Sao index lại cần là instance variable ? Có thể dùng local variable được không ?
    • Huỳnh Thiên Phước @phuocht commented Jul 30, 2020
      Master

      e dùng local variable k truyền được a nên e dùng instance variable

      e dùng local variable k truyền được a nên e dùng instance variable
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 13 of the diff

      Jul 30, 2020

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4889&start_sha=79e6c57261f9def23f49d3358af37423c0b66a65#68c56b09c9b168064b848e666682f27909aef1d0_2_2)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/views/layouts/_show_industries.html.erb 0 → 100644
    1 <% @jobs_of_industries.each do |industry, count_job| %>
    2 <% @index += 1 %>
    3 <% if @index % 3 == 0 %>
    4 <td class="row-table">
    5 <div class="industry-name"><strong><%= Industry.find(industry).name %></strong></div>
    6 <div class="count-job"><%= count_job %></div>
    7 </td>
    8 </tr>
    • Hoang Phuc Do @phucdh commented Jul 30, 2020

      Chỗ này có thẻ đóng </tr> mà không thấy thẻ mở <tr> ?

      Edited Jul 30, 2020 by Hoang Phuc Do
      Chỗ này có thẻ đóng `</tr>` mà không thấy thẻ mở `<tr>` ?
    • Huỳnh Thiên Phước @phuocht commented Jul 30, 2020
      Master

      à e mới mở với đóng lại a ơi, nãy chắc e xóa nhầm @@

      à e mới mở với đóng lại a ơi, nãy chắc e xóa nhầm @@
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 13 of the diff

      Jul 30, 2020

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4889&start_sha=79e6c57261f9def23f49d3358af37423c0b66a65#610ca69bbd79ba9c04563e2330e53f1d6b0ee0ba_8_2)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on the diff Jul 30, 2020
    app/assets/stylesheets/custom.css.scss
    1
    • Van Hau Le @haulv commented Jul 30, 2020
      Master

      @phuocht tên file gì lạ vậy em?

      @phuocht tên file gì lạ vậy em?
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/controllers/jobs_controller.rb
    1 1 class JobsController < ApplicationController
    2 2 def index
    3
    • Van Hau Le @haulv commented Jul 30, 2020
      Master

      @phuocht remove break line

      @phuocht remove break line
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 13 of the diff

      Jul 30, 2020

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4889&start_sha=79e6c57261f9def23f49d3358af37423c0b66a65#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_3_2)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on the diff Jul 30, 2020
    app/assets/stylesheets/custom.css.scss
    1
    • Van Hau Le @haulv commented Jul 30, 2020
      Master

      @phuocht Tên file gì lạ vậy em?

      @phuocht Tên file gì lạ vậy em?
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Jul 30, 2020
    app/controllers/jobs_controller.rb
    1 1 class JobsController < ApplicationController
    2 2 def index
    3
    • Van Hau Le @haulv commented Jul 30, 2020
      Master

      @phuocht remove breakline nhen!

      @phuocht remove breakline nhen!
    • Huỳnh Thiên Phước @phuocht commented Jul 30, 2020
      Master

      dạ ok a

      dạ ok a
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 13 of the diff

      Jul 30, 2020

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4889&start_sha=79e6c57261f9def23f49d3358af37423c0b66a65#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_3_2)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    app/controllers/top_pages_controller.rb 0 → 100644
    1 class TopPagesController < ApplicationController
    2 def index
    3 @total_jobs = Job.all
    • Van Hau Le @haulv commented Jul 30, 2020
      Master

      @phuocht lấy hết job làm gì vậy em?

      @phuocht lấy hết job làm gì vậy em?
    • Huỳnh Thiên Phước @phuocht commented Jul 30, 2020
      Master

      cái đó e lấy tổng job a ơi

      cái đó e lấy tổng job a ơi
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht lấy tổng job có thể count để lấy con số, không cần kéo hết cả jobs lên như vậy?

      @phuocht lấy tổng job có thể count để lấy con số, không cần kéo hết cả jobs lên như vậy?
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 18 of the diff

      Aug 03, 2020

      changed this line in version 18 of the diff

      changed this line in [version 18 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4906&start_sha=7b024ad99fdec0f1145814fd15d491c8c6d7dd73#67830ae7ea757a07c29f13c2a88a2ba8ad0d37b8_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Jul 30, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    app/views/layouts/_show_cities.html.erb 0 → 100644
    1 <% @jobs_of_cities.each do |city, count_job| %>
    • Van Hau Le @haulv commented Jul 30, 2020
      Master

      @phuocht each_with_index. Sao phải dùng thêm biến @index chi vậy?

      @phuocht `each_with_index`. Sao phải dùng thêm biến @index chi vậy?
    • Huỳnh Thiên Phước @phuocht commented Jul 30, 2020
      Master

      e xài bootstrap chia cột nên e sửa lại rồi a

      e xài bootstrap chia cột nên e sửa lại rồi a
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#68c56b09c9b168064b848e666682f27909aef1d0_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • c18c0034 - use bootstrap divide column

    Compare with previous version

    Jul 30, 2020

    added 1 commit

    • c18c0034 - use bootstrap divide column

    Compare with previous version

    added 1 commit * c18c0034 - use bootstrap divide column [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4889&start_sha=79e6c57261f9def23f49d3358af37423c0b66a65)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 67e63523 - Collapse code

    Compare with previous version

    Jul 31, 2020

    added 1 commit

    • 67e63523 - Collapse code

    Compare with previous version

    added 1 commit * 67e63523 - Collapse code [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4891&start_sha=c18c0034d0774f1da98df844fa89161874a70abc)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • c4052114 - fix industry and city

    Compare with previous version

    Jul 31, 2020

    added 1 commit

    • c4052114 - fix industry and city

    Compare with previous version

    added 1 commit * c4052114 - fix industry and city [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4893&start_sha=67e635237286105abdc788ded660983d148f3aee)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 53de3765 - waiting, fix some problems

    Compare with previous version

    Jul 31, 2020

    added 1 commit

    • 53de3765 - waiting, fix some problems

    Compare with previous version

    added 1 commit * 53de3765 - waiting, fix some problems [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4895&start_sha=c4052114a69aeb5cf06a818cec5484da332eb4ec)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 7b024ad9 - Set name variable

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 7b024ad9 - Set name variable

    Compare with previous version

    added 1 commit * 7b024ad9 - Set name variable [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4904&start_sha=53de376588846c8090e9949449b33ec255e26420)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • d58cf3ff - fix association in crawl city_job, industry_job

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • d58cf3ff - fix association in crawl city_job, industry_job

    Compare with previous version

    added 1 commit * d58cf3ff - fix association in crawl city_job, industry_job [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4906&start_sha=7b024ad99fdec0f1145814fd15d491c8c6d7dd73)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    app/controllers/top_pages_controller.rb 0 → 100644
    1 class TopPagesController < ApplicationController
    2 def index
    3 @total_jobs = Job.ids
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht này để làm gì vậy e?

      @phuocht này để làm gì vậy e?
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      dạ tính total jobs a ơi

      dạ tính total jobs a ơi
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 19 of the diff

      Aug 03, 2020

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4911&start_sha=d58cf3ff8f9c854fe42b46f80e7635d05e650962#67830ae7ea757a07c29f13c2a88a2ba8ad0d37b8_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước
    @phuocht started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/src/crontab.rb 0 → 100644
    25 address = page.css('div.content p').children[1]&.text
    26 introduction = page.css('div.main-about-us').text
    27 begin
    28 puts name
    29 Company.find_or_create_by!(name: name,
    30 address: address,
    31 introduction: introduction)
    32 rescue StandardError => e
    33 @mylogger.error e.message
    34 end
    35 end
    36 end
    37
    38 def create_city_rel(row, info_job)
    39 location_rel = row.css('div.map p a').children.map { |name_city| name_city.text.strip }
    40 city_table = City.where(name: location_rel)
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      rename city_table => cities

      rename city_table => cities
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 19 of the diff

      Aug 03, 2020

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4911&start_sha=d58cf3ff8f9c854fe42b46f80e7635d05e650962#ff96edb8f6368223375814f6559b35e1fef3cca9_40_0)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước
    @phuocht started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/src/crontab.rb 0 → 100644
    33 @mylogger.error e.message
    34 end
    35 end
    36 end
    37
    38 def create_city_rel(row, info_job)
    39 location_rel = row.css('div.map p a').children.map { |name_city| name_city.text.strip }
    40 city_table = City.where(name: location_rel)
    41
    42 puts "#{info_job.cities << city_table}"
    43 info_job.cities << city_table
    44 end
    45
    46 def create_industry_rel(row, info_job)
    47 industry_rel = row.css('li a').children.map { |name_industry| name_industry.text.strip }
    48 industry_table = Industry.where(name: industry_rel)
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      rename industry => industries

      rename industry => industries
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 19 of the diff

      Aug 03, 2020

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4911&start_sha=d58cf3ff8f9c854fe42b46f80e7635d05e650962#ff96edb8f6368223375814f6559b35e1fef3cca9_48_0)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước
    @phuocht started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/src/crontab.rb 0 → 100644
    46 def create_industry_rel(row, info_job)
    47 industry_rel = row.css('li a').children.map { |name_industry| name_industry.text.strip }
    48 industry_table = Industry.where(name: industry_rel)
    49
    50 puts "#{info_job.industries << industry_table}"
    51 info_job.industries << industry_table
    52 end
    53
    54 def create_job(title, link_page, row, company_table)
    55 description = link_page.search('div.detail-row').to_s
    56 salary = row.at_xpath('//li[./strong/i[contains(@class, "fa fa-usd")]]/p').text.strip
    57 experience = row.at_xpath('//li[./strong/i[contains(@class, "fa fa-briefcase")]]/p')&.text&.strip
    58 level = row.at_xpath('//li[./strong/i[contains(@class, "mdi mdi-account")]]/p').text.strip
    59 expiration_date = row.at_xpath('//li[./strong/i[contains(@class, "mdi mdi-calendar-check")]]/p').text.strip
    60
    61 info_job = Job.find_or_create_by!(title: title,
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      infor_job => job company_table => company

      infor_job => job company_table => company
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 19 of the diff

      Aug 03, 2020

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4911&start_sha=d58cf3ff8f9c854fe42b46f80e7635d05e650962#ff96edb8f6368223375814f6559b35e1fef3cca9_61_0)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/tasks/crawler_import.rake
    23
    24 def url
    25 'https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-trang-1-vi.html'
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht 'https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-trang-1-vi.html'.freeze

      @phuocht `'https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-trang-1-vi.html'.freeze`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 20 of the diff

      Aug 03, 2020

      changed this line in version 20 of the diff

      changed this line in [version 20 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4915&start_sha=0bdc8e73416de2d7a30882edac1daeae0ebdc2b1#45e7893bb0747bdeb043c90591562045ffd98f61_24_24)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 0bdc8e73 - rename variable, create import csv file

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 0bdc8e73 - rename variable, create import csv file

    Compare with previous version

    added 1 commit * 0bdc8e73 - rename variable, create import csv file [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4911&start_sha=d58cf3ff8f9c854fe42b46f80e7635d05e650962)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • c002193c - change file crawler

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • c002193c - change file crawler

    Compare with previous version

    added 1 commit * c002193c - change file crawler [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4915&start_sha=0bdc8e73416de2d7a30882edac1daeae0ebdc2b1)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    app/controllers/top_pages_controller.rb 0 → 100644
    1 class TopPagesController < ApplicationController
    2 def index
    3 @cities = City.all
    4 @industries = Industry.all
    5 @total_jobs = Job.count
    6 @jobs = Job.limit(5).order(created_at: :desc)
    7 @jobs_of_cities = CityJob.top_city
    8 @jobs_of_industries = IndustryJob.limit(9).group('industry_id').order('Count(*) DESC').count
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht Industry chưa update kìa em

      @phuocht Industry chưa update kìa em
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      à dạ a để e update

      à dạ a để e update
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      e mới fix bên crawler với crontab e push lên luôn mấy cái bên controller h e fix a ^

      e mới fix bên crawler với crontab e push lên luôn mấy cái bên controller h e fix a ^^
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#67830ae7ea757a07c29f13c2a88a2ba8ad0d37b8_8_7)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    lib/src/crontab.rb 0 → 100644
    13 find_job
    14 end
    15
    16 def find_company
    17 info = Nokogiri::HTML(URI.open(@url))
    18 links = info.css('div.caption a.company-name').map { |link| link['href'] }
    19 links.each do |link|
    20 next if link == 'javascript:void(0);'
    21 page = Nokogiri::HTML(URI.open(URI.escape(link)))
    22 name = page.search('p.name')&.text
    23 return if name.blank?
    24
    25 address = page.css('div.content p').children[1]&.text
    26 introduction = page.css('div.main-about-us').text
    27 begin
    28 puts name
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht remove puts

      @phuocht remove puts
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    lib/src/crontab.rb 0 → 100644
    24
    25 address = page.css('div.content p').children[1]&.text
    26 introduction = page.css('div.main-about-us').text
    27 begin
    28 puts name
    29 Company.find_or_create_by!(name: name,
    30 address: address,
    31 introduction: introduction)
    32 rescue StandardError => e
    33 @mylogger.error e.message
    34 end
    35 end
    36 end
    37
    38 def create_city_rel(row, info_job)
    39 location_rel = row.css('div.map p a').children.map { |name_city| name_city.text.strip }
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht chưa rename nè!

      @phuocht chưa rename nè!
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    app/views/layouts/_show_cities.html.erb 0 → 100644
    1 <% @jobs_of_cities.each do |city, count_job| %>
    2 <div class="col-4">
    3 <div class="row-table border border-dark rounded city-list">
    4 <%= link_to '#' do%>
    5 <div class="city-name"><strong><%= City.find(city).name %></strong></div>
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht này cũng chưa fix nè

      @phuocht này cũng chưa fix nè
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      h e mới đang fix trong controller a ơi, e đang tìm cách.

      h e mới đang fix trong controller a ơi, e đang tìm cách.
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#68c56b09c9b168064b848e666682f27909aef1d0_5_4)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/src/csvimporter.rb 0 → 100644
    1 require 'net/ftp'
    2 require 'csv'
    3 require 'zip'
    4
    5 class CSVimporter
    6 def initialize(logger)
    7 @logger = logger
    8 @NAME_DOMAIN = '192.168.1.156'
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht Này em muốn định nghĩa constant phải ko?

      @phuocht Này em muốn định nghĩa constant phải ko?
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      dạ đúng rồi a

      dạ đúng rồi a
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht https://www.rubyguides.com/2017/07/ruby-constants/

      NAME_DOMAIN = '192.168.1.156'.freeze
      USERNAME_FTP = 'training'.freeze
      PASSWORD_FTP = 'training'.freeze

      Vầy là đủ nha em! Lưu ý declare 1 constant là kiểu string thì freeze nó!

      Edited Aug 03, 2020 by Van Hau Le
      @phuocht https://www.rubyguides.com/2017/07/ruby-constants/ ```ruby NAME_DOMAIN = '192.168.1.156'.freeze USERNAME_FTP = 'training'.freeze PASSWORD_FTP = 'training'.freeze ``` Vầy là đủ nha em! Lưu ý declare 1 constant là kiểu string thì freeze nó!
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#413f27e27e4101f73f5dd798599b081c24cd35d6_8_0)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/tasks/crawler_import.rake
    15 task csv_get: :environment do
    16 action.get_file_csv
    17 action.extract_zip('./jobs.zip','.')
    11 desc 'Crontab'
    12 task auto: :environment do
    13 crontab = JobParser.new(logger, url)
    14 csvimporter = CSVimporter.new(logger)
    15 crontab.crawl_all
    16 csvimporter.import
    18 17 end
    19 desc "Import data from CSV"
    20 task data_csv: :environment do
    21 action.import_file_csv
    18
    19 def logger
    20 Logger.new(Rails.root.join('log','my.log'))
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht crawling.log.

      @phuocht crawling.log.
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#45e7893bb0747bdeb043c90591562045ffd98f61_20_19)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/tasks/crawler_import.rake
    8 7 task crawler: :environment do
    9 action.crawl_city
    10 action.crawl_industry
    11 action.crawl_company
    12 action.crawl_job_relationships
    8 action = Crawler.new(logger, url)
    9 action.crawl_city_industry
    13 10 end
    14 desc "get file CSV from server"
    15 task csv_get: :environment do
    16 action.get_file_csv
    17 action.extract_zip('./jobs.zip','.')
    11 desc 'Crontab'
    12 task auto: :environment do
    13 crontab = JobParser.new(logger, url)
    14 csvimporter = CSVimporter.new(logger)
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht CSV là 1 từ, Import là 1 từ => csv_importer = CSVImporter.new(logger)

      Edited Aug 03, 2020 by Van Hau Le
      @phuocht CSV là 1 từ, Import là 1 từ => `csv_importer = CSVImporter.new(logger)`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#45e7893bb0747bdeb043c90591562045ffd98f61_14_13)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/tasks/crawler_import.rake
    10 action.crawl_industry
    11 action.crawl_company
    12 action.crawl_job_relationships
    8 action = Crawler.new(logger, url)
    9 action.crawl_city_industry
    13 10 end
    14 desc "get file CSV from server"
    15 task csv_get: :environment do
    16 action.get_file_csv
    17 action.extract_zip('./jobs.zip','.')
    11 desc 'Crontab'
    12 task auto: :environment do
    13 crontab = JobParser.new(logger, url)
    14 csvimporter = CSVimporter.new(logger)
    15 crontab.crawl_all
    16 csvimporter.import
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht đây nữa

      @phuocht đây nữa
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#45e7893bb0747bdeb043c90591562045ffd98f61_16_15)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    lib/tasks/crawler_import.rake
    3 require 'csv'
    4 require 'zip'
    5 action = Crawler.new
    2 require 'src/jobparser.rb'
    3 require 'src/csvimporter.rb'
    4
    6 5 namespace :import do
    7 desc "crawler data"
    6 desc 'crawler data'
    8 7 task crawler: :environment do
    9 action.crawl_city
    10 action.crawl_industry
    11 action.crawl_company
    12 action.crawl_job_relationships
    8 action = Crawler.new(logger, url)
    9 action.crawl_city_industry
    • Van Hau Le @haulv commented Aug 03, 2020
      Master
      action = Crawler.new(logger, url)
      action.crawl_city_industry

      Nếu chỉ call 1 action, không lấy kết qủa trả về, ko xử lý tiếp theo =>

       Crawler.new(logger, url).crawl_city_industry
      ```ruby action = Crawler.new(logger, url) action.crawl_city_industry ``` Nếu chỉ call 1 action, không lấy kết qủa trả về, ko xử lý tiếp theo => ```ruby Crawler.new(logger, url).crawl_city_industry ```
    • Huỳnh Thiên Phước @phuocht commented Aug 03, 2020
      Master

      dạ ok a để e sửa lại

      dạ ok a để e sửa lại
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#45e7893bb0747bdeb043c90591562045ffd98f61_9_8)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 03, 2020
    Last updated by Huỳnh Thiên Phước Aug 03, 2020
    app/views/layouts/_search_bar.html.erb 0 → 100644
    1 <div class="search-bar">
    2 <div class="row">
    3 <div class="col-sm">
    4 <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
    5 </div>
    6 <div class="col-sm">
    7 <select class="form-control" id="exampleFormControlSelect1">
    8 <%= @cities.each do |city| %>
    9 <option><%= city.name %></option>
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht indent lại code cho ngay ngắn, dễ đọc nè

      <select class="form-control" id="exampleFormControlSelect1">
        <%= @cities.each do |city| %>
          <option><%= city.name %></option>
        <% end %>
      </select>
      @phuocht indent lại code cho ngay ngắn, dễ đọc nè ```ruby <select class="form-control" id="exampleFormControlSelect1"> <%= @cities.each do |city| %> <option><%= city.name %></option> <% end %> </select> ```
    • Van Hau Le @haulv commented Aug 03, 2020
      Master

      @phuocht tương tự bên dưới nhen

      @phuocht tương tự bên dưới nhen
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 21 of the diff

      Aug 03, 2020

      changed this line in version 21 of the diff

      changed this line in [version 21 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1#1513843d02f323509981436ce1a283901f834921_9_2)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 15dba6fe - Fix controller, model of city and industry

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 15dba6fe - Fix controller, model of city and industry

    Compare with previous version

    added 1 commit * 15dba6fe - Fix controller, model of city and industry [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4918&start_sha=c002193c94aaaddc7882678c31ec86257c09a3e1)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • cb3c53c5 - Convert tabsize to space

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • cb3c53c5 - Convert tabsize to space

    Compare with previous version

    added 1 commit * cb3c53c5 - Convert tabsize to space [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4919&start_sha=15dba6fefe5bdb49749fb1fbb1e950b12d845a80)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 450556a1 - Fix constant variables

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 450556a1 - Fix constant variables

    Compare with previous version

    added 1 commit * 450556a1 - Fix constant variables [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4921&start_sha=cb3c53c5e974b30364f900354ba6cf019bcd7cb2)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 2648d287 - Update indentation

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 2648d287 - Update indentation

    Compare with previous version

    added 1 commit * 2648d287 - Update indentation [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4922&start_sha=450556a1d1877db7e4c538cbea1eaa3412135342)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 270b1c6a - push Show Jobs

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • 270b1c6a - push Show Jobs

    Compare with previous version

    added 1 commit * 270b1c6a - push Show Jobs [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4924&start_sha=2648d287205b58d3aa01a977ab8a77599f569aad)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 3352db9d - add freeze in variable constant

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • 3352db9d - add freeze in variable constant

    Compare with previous version

    added 1 commit * 3352db9d - add freeze in variable constant [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4925&start_sha=270b1c6ac68e72667ecf5dbd288326f8405002e6)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 4885e10f - Fix end of line and text indent

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • 4885e10f - Fix end of line and text indent

    Compare with previous version

    added 1 commit * 4885e10f - Fix end of line and text indent [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4927&start_sha=3352db9dfb64181777e94701357edc4a1ec0ba20)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 04, 2020
    Last updated by Huỳnh Thiên Phước Aug 04, 2020
    lib/src/csv_importer.rb 0 → 100644
    1 require 'net/ftp'
    2 require 'csv'
    3 require 'zip'
    4
    5 class CSVImporter
    6 def initialize(logger)
    7 @logger = logger
    8 NAME_DOMAIN = '192.168.1.156'.freeze
    9 USERNAME_FTP = 'training'.freeze
    • Van Hau Le @haulv commented Aug 04, 2020
      Master

      @phuocht FTP_USERNAME, FTP_PASSWORD nha e!

      @phuocht FTP_USERNAME, FTP_PASSWORD nha e!
    • Huỳnh Thiên Phước @phuocht commented Aug 04, 2020
      Master

      dạ ok a để e đổi lại

      dạ ok a để e đổi lại
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 28 of the diff

      Aug 04, 2020

      changed this line in version 28 of the diff

      changed this line in [version 28 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4930&start_sha=4885e10f7746b6be98b6dd39e801a2449ed4a53a#e8867905272eeb32564e6edea21c9cf47955ab21_9_9)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 315635d0 - delete migrate and rename

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • 315635d0 - delete migrate and rename

    Compare with previous version

    added 1 commit * 315635d0 - delete migrate and rename [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4930&start_sha=4885e10f7746b6be98b6dd39e801a2449ed4a53a)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 04, 2020
    Last updated by Huỳnh Thiên Phước Aug 04, 2020
    lib/src/job_parser.rb 0 → 100644
    3 def initialize(logger, url)
    4 @logger = logger
    5 @url = url
    6 end
    7
    8 def crawl_all
    9 find_company
    10 find_job
    11 end
    12
    13 def find_company
    14 info = Nokogiri::HTML(URI.open(@url))
    15 links = info.css('div.caption a.company-name').map { |link| link['href'] }
    16 links.each do |link|
    17 next if link == 'javascript:void(0);'
    18 page = Nokogiri::HTML(URI.open(URI.escape(link)))
    • Van Hau Le @haulv commented Aug 04, 2020
      Master

      @phuocht indent lại code 2 dòng này nhe em!

      @phuocht indent lại code 2 dòng này nhe em!
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 30 of the diff

      Aug 04, 2020

      changed this line in version 30 of the diff

      changed this line in [version 30 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4933&start_sha=f6afc5624c41792b805c1aef631253f4f948382e#31ee7604d40f4076c72b81b6c398b1d8f5b239e0_18_18)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • f6afc562 - rename FTP in csv file

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • f6afc562 - rename FTP in csv file

    Compare with previous version

    added 1 commit * f6afc562 - rename FTP in csv file [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4932&start_sha=315635d01909a67f21b7e4844ebacb070f5463f5)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • c4f83312 - change handle in controller to handle in model

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • c4f83312 - change handle in controller to handle in model

    Compare with previous version

    added 1 commit * c4f83312 - change handle in controller to handle in model [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/1/diffs?diff_id=4933&start_sha=f6afc5624c41792b805c1aef631253f4f948382e)
    Toggle commit list
  • Van Hau Le @haulv

    mentioned in commit 784ae619

    Aug 04, 2020

    mentioned in commit 784ae619

    mentioned in commit 784ae619b6b05df2dfa15beac2d5986c66c2f000
    Toggle commit list
  • Van Hau Le @haulv

    merged

    Aug 04, 2020

    merged

    merged
    Toggle commit list
  • Write
  • Preview
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 sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
3
3 participants
Reference: phuocht/venjob!1
×

Revert this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.