linkedin-topcompanies 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/js/linkedin.js +6 -6
- data/lib/linkedin-topcompanies.rb +2 -1
- data/lib/linkedin-topcompanies/version.rb +1 -1
- metadata +2 -2
data/js/linkedin.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
var casper = require('casper').create();
|
2
2
|
var system = require('system');
|
3
3
|
|
4
|
-
if (system.args.length <
|
5
|
-
console.info("usage: casperjs linkedin.js
|
4
|
+
if (system.args.length < 4) {
|
5
|
+
console.info("usage: casperjs linkedin.js jspath");
|
6
6
|
phantom.exit();
|
7
7
|
}
|
8
8
|
|
9
9
|
// keywords is the keyword to search for (EPIC)
|
10
10
|
// postalcode is the postal code to narrow results for (97005)
|
11
11
|
// industry is the name of the industry (Hospital & Health Care)
|
12
|
-
var keywords = system.
|
13
|
-
var postalcode = system.
|
14
|
-
var industry = system.
|
15
|
-
var jsPath = system.args[
|
12
|
+
var keywords = system.env['KEYWORDS'];
|
13
|
+
var postalcode = system.env['POSTALCODE'];
|
14
|
+
var industry = system.env['INDUSTRY'];
|
15
|
+
var jsPath = system.args[4];
|
16
16
|
|
17
17
|
var linkedin_user = system.env['LINKEDIN_USER'];
|
18
18
|
var linkedin_password = system.env['LINKEDIN_PASSWORD'];
|
@@ -21,8 +21,9 @@ module Linkedin
|
|
21
21
|
path = File.expand_path("../js", File.dirname(__FILE__))
|
22
22
|
script = File.join(path, "linkedin.js")
|
23
23
|
credentials = "LINKEDIN_USER='#{linkedin_user}' LINKEDIN_PASSWORD='#{linkedin_password}'"
|
24
|
+
parameters = "KEYWORDS='#{keywords}' POSTALCODE='#{postalcode}' INDUSTRY='#{industry}'"
|
24
25
|
|
25
|
-
command = %Q(#{credentials} casperjs #{script} "#{
|
26
|
+
command = %Q(#{credentials} casperjs #{script} "#{path}")
|
26
27
|
result = `#{command}`
|
27
28
|
|
28
29
|
if $?.exitstatus == 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkedin-topcompanies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: casperjs
|