linsc 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/linsc/cross_ref.rb +1 -1
- data/lib/linsc/duck.rb +1 -1
- data/lib/linsc/lin.rb +1 -1
- data/lib/linsc/merger.rb +4 -0
- data/linsc.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c96a4b8e89605a426ca261d1e3ed06c885f85f68
|
4
|
+
data.tar.gz: 2ad5ec02dbc1d0f61a14a2949c35914eb36448d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e4d496facd6efa033c1c01a02a1f70e0f5e484131e9bbc8473ce77717eb072a18a3dd99594480781d8a4e4a11d5376e5713faf5bd193037fc1ba6d0a618e041
|
7
|
+
data.tar.gz: 6b981bb4168a753401d5eca4be3921e1929674bef5babf2505fdda1dc47dc67b6aa14c12e1fd5e76700bc2a022e6157f96228d3aae0e7020e63527ef6cc5e7c4
|
data/lib/linsc/cross_ref.rb
CHANGED
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 =
|
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 =
|
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.
|
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'
|