linkedin-scraper-v2 0.1.8 → 0.1.9
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/bin/linkedin-scraper +1 -1
- metadata +17 -37
- data/.gitignore +0 -23
- data/.rubocop.yml +0 -11
- data/.travis.yml +0 -8
- data/Gemfile +0 -4
- data/LICENSE +0 -22
- data/README.md +0 -272
- data/Rakefile +0 -3
- data/lib/linkedin_scraper.rb +0 -5
- data/lib/linkedin_scraper/profile.rb +0 -252
- data/lib/linkedin_scraper/version.rb +0 -5
- data/linkedin-scraper.gemspec +0 -22
- data/spec/fixtures/jeffweiner08.html +0 -308
- data/spec/linkedin_scraper/profile_spec.rb +0 -110
- data/spec/spec_helper.rb +0 -17
@@ -1,110 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'linkedin_scraper'
|
5
|
-
|
6
|
-
describe Linkedin::Profile do
|
7
|
-
# This is the HTML of https://www.linkedin.com/in/jeffweiner08
|
8
|
-
let(:profile) { Linkedin::Profile.new("file://#{File.absolute_path(File.dirname(__FILE__) + '/../fixtures/jeffweiner08.html')}") }
|
9
|
-
|
10
|
-
describe ".get_profile" do
|
11
|
-
it "creates an new instance of Linkedin::Profile" do
|
12
|
-
expect(profile).to be_instance_of Linkedin::Profile
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "#first_name" do
|
17
|
-
it "returns profile's first name" do
|
18
|
-
expect(profile.first_name).to eq "Jeff"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
describe '#last_name' do
|
23
|
-
it "returns profile's last name" do
|
24
|
-
expect(profile.last_name).to eq "Weiner"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '#title' do
|
29
|
-
it "returns profile's title" do
|
30
|
-
expect(profile.title).to eq "CEO at LinkedIn"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe "#location" do
|
35
|
-
it "returns profile's location" do
|
36
|
-
expect(profile.location).to eq "Mountain View"
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe "#country" do
|
41
|
-
it "returns profile's country or state" do
|
42
|
-
expect(profile.country).to eq "California"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe '#industry' do
|
47
|
-
it "returns list of profile's industries" do
|
48
|
-
expect(profile.industry).to eq "Internet"
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
describe '#skills' do
|
53
|
-
it "returns list of profile's skills" do
|
54
|
-
expect(profile.skills).to include("Product Development")
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe '#websites' do
|
59
|
-
it "returns list of profile's websites" do
|
60
|
-
expect(profile.websites).to include("http://www.linkedin.com/")
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
describe '#groups' do
|
65
|
-
it "returns list of profile's groups" do
|
66
|
-
p profile.groups
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe '#name' do
|
71
|
-
it 'returns the first and last name of the profile' do
|
72
|
-
expect(profile.name).to eq "Jeff Weiner"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
describe '#projects' do
|
77
|
-
it 'returns the array of hashes of recommended visitors' do
|
78
|
-
expect(profile.projects.class).to eq Array
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
describe '#summary' do
|
83
|
-
it 'returns the summary of the profile' do
|
84
|
-
expect(profile.summary).to eq \
|
85
|
-
"Internet executive with over 19 years of experience, " \
|
86
|
-
"including general management of mid to large size organizations, corporate development, " \
|
87
|
-
"product development, business operations, and strategy. " \
|
88
|
-
"Currently CEO at LinkedIn, the web's largest and most powerful network of professionals. " \
|
89
|
-
"Prior to LinkedIn, was an Executive in Residence at Accel Partners and Greylock Partners. " \
|
90
|
-
"Primarily focused on advising the leadership teams of the firm's existing consumer technology portfolio companies " \
|
91
|
-
"while also working closely with the firm’s partners to evaluate new investment opportunities. " \
|
92
|
-
"Previously served in key leadership roles at Yahoo! for over seven years, " \
|
93
|
-
"most recently as the Executive Vice President of Yahoo!'s Network Division managing Yahoo's consumer web product portfolio, " \
|
94
|
-
"including Yahoo's Front Page, Mail, Search, and Media products. Specialties: general management, corporate development, " \
|
95
|
-
"product development, business operations, strategy, product marketing, non-profit governance"
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
describe '#number_of_connections' do
|
100
|
-
it 'returns the number of connections' do
|
101
|
-
expect(profile.number_of_connections).to eq '500+'
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
describe '#recommended_visitors' do
|
106
|
-
it 'returns recommended visitors' do
|
107
|
-
expect(profile.recommended_visitors.class).to eq Array
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
$LOAD_PATH << File.join(File.dirname(__FILE__), '../lib')
|
2
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
3
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
4
|
-
# Require this file using `require "spec_helper"` to ensure that it is only
|
5
|
-
# loaded once.
|
6
|
-
#
|
7
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
8
|
-
RSpec.configure do |config|
|
9
|
-
config.run_all_when_everything_filtered = true
|
10
|
-
config.filter_run :focus
|
11
|
-
|
12
|
-
# Run specs in random order to surface order dependencies. If you find an
|
13
|
-
# order dependency and want to debug it, you can fix the order by providing
|
14
|
-
# the seed, which is printed after each run.
|
15
|
-
# --seed 1234
|
16
|
-
config.order = 'random'
|
17
|
-
end
|