linsc 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a7c54e13a9f1ade26f5330d410af6e23d6fcb72
4
- data.tar.gz: b5f5b89e4169506b415f8a3fceeaff678a0615ca
3
+ metadata.gz: c96a4b8e89605a426ca261d1e3ed06c885f85f68
4
+ data.tar.gz: 2ad5ec02dbc1d0f61a14a2949c35914eb36448d6
5
5
  SHA512:
6
- metadata.gz: e79102d02acfcec2064b49611aa352b193d89bb90b93ff126995ea0e5a5e5584da6d3624208ce7bafcd223f82ea6c5baed1964d2cd1fa204dfdee0e326e19015
7
- data.tar.gz: 48b1af2a42a580a5ad495abe53dd6f550057c7280c6942bde0126fe6226d792dbdcba62016054f9bfdbf2639e0bf57086a478f67a04fa2dec2d3a16a5f0aa7a7
6
+ metadata.gz: 2e4d496facd6efa033c1c01a02a1f70e0f5e484131e9bbc8473ce77717eb072a18a3dd99594480781d8a4e4a11d5376e5713faf5bd193037fc1ba6d0a618e041
7
+ data.tar.gz: 6b981bb4168a753401d5eca4be3921e1929674bef5babf2505fdda1dc47dc67b6aa14c12e1fd5e76700bc2a022e6157f96228d3aae0e7020e63527ef6cc5e7c4
@@ -26,7 +26,7 @@ class CrossRef
26
26
  @headers << static_key
27
27
  end
28
28
  end if @static_values
29
- @child_length = %x(wc -l "#{@child_path}").split[0].to_i - 1
29
+ @child_length = CSV.read(@child_path).length - 1
30
30
  if File.exist?(@output_path)
31
31
  File.delete(@output_path)
32
32
  end
data/lib/linsc/duck.rb CHANGED
@@ -25,7 +25,7 @@ class DuckScraper
25
25
  @headers = get_headers(@input_file)
26
26
  @headers << "Linkedin Import Status" unless @headers.include?("Linkedin Import Status")
27
27
  @headers << "Urls" unless @headers.include?("Urls")
28
- @input_length = %x(wc -l "#{@input_file}").split[0].to_i - 1
28
+ @input_length = CSV.read(@input_file).length - 1
29
29
  if File.exist?(@output_file)
30
30
  @start = CSV.read(@output_file, headers: true).length
31
31
  puts "resuming from row #{@start}"
data/lib/linsc/lin.rb CHANGED
@@ -79,7 +79,7 @@ class LinScraper
79
79
  @headers.delete('Urls')
80
80
  @employment_headers = ["Contact ID", "Employer Name", "Job Title", "Start Date", "End Date", "Location", "LIN ID"]
81
81
  @education_headers = ["Contact ID", "School Name", "Major", "Graduation Year", "LIN ID"]
82
- @input_length = %x(wc -l "#{@input_file}").split[0].to_i - 1
82
+ @input_length = CSV.read(@input_file).length - 1
83
83
  I18n.available_locales = [:en]
84
84
  if (@output_update && File.exist?(@output_update)) || (@output_insert && File.exist?(@output_insert))
85
85
  if @output_update
data/lib/linsc/merger.rb CHANGED
@@ -8,6 +8,10 @@ class Merger
8
8
  @input_dir, @output_path, @mapping = input_dir, output_path, mapping
9
9
  recruiter_file = Pathname.new(File.dirname __dir__).realdirpath + '../data/recruiters.txt'
10
10
  @recruiters = recruiter_file.read.split(",").collect{|r| r.strip}
11
+ unless @recruiters && @recruiters.length > 0
12
+ puts "recruiters.txt is empty! refer to the docs for instructions on filling it"
13
+ exit
14
+ end
11
15
  @lin_files = @input_dir.children.select{|fn| fn.basename.to_s.match(/^LIN.+\.csv/)}
12
16
  if mapping
13
17
  @headers = mapping.values
data/linsc.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "linsc"
7
- spec.version = "0.0.6"
7
+ spec.version = "0.0.7"
8
8
  spec.authors = ["Dan Molloy"]
9
9
  spec.email = ["danieljmolloy1@gmail.com"]
10
10
  spec.date = '2016-03-31'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linsc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Molloy