linkedin 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +0 -2
- data/.travis.yml +0 -2
- data/lib/linked_in/api/query_methods.rb +4 -0
- data/lib/linked_in/version.rb +1 -1
- data/linkedin.gemspec +1 -1
- data/spec/cases/api_spec.rb +10 -0
- data/spec/fixtures/cassette_library/LinkedIn_Api/Company_API.yml +4 -4
- metadata +25 -24
data/.rspec
CHANGED
data/.travis.yml
CHANGED
@@ -54,6 +54,10 @@ module LinkedIn
|
|
54
54
|
path += "id=#{options[:id]}"
|
55
55
|
elsif options[:url]
|
56
56
|
path += "url=#{CGI.escape(options[:url])}"
|
57
|
+
elsif options[:name]
|
58
|
+
path += "universal-name=#{CGI.escape(options[:name])}"
|
59
|
+
elsif options[:domain]
|
60
|
+
path += "email-domain=#{CGI.escape(options[:domain])}"
|
57
61
|
else
|
58
62
|
path += "~"
|
59
63
|
end
|
data/lib/linked_in/version.rb
CHANGED
data/linkedin.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require File.expand_path('../lib/linked_in/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.add_dependency 'hashie', '~> 1.
|
5
|
+
gem.add_dependency 'hashie', '~> 1.2.0'
|
6
6
|
gem.add_dependency 'multi_json', '~> 1.0.3'
|
7
7
|
gem.add_dependency 'oauth', '~> 0.4.5'
|
8
8
|
gem.add_development_dependency 'json', '~> 1.6'
|
data/spec/cases/api_spec.rb
CHANGED
@@ -60,6 +60,16 @@ describe LinkedIn::Api do
|
|
60
60
|
client.company(:id => 1586).should be_an_instance_of(LinkedIn::Mash)
|
61
61
|
end
|
62
62
|
|
63
|
+
it "should be able to view a company by universal name" do
|
64
|
+
stub_request(:get, "https://api.linkedin.com/v1/companies/universal-name=acme").to_return(:body => "{}")
|
65
|
+
client.company(:name => 'acme').should be_an_instance_of(LinkedIn::Mash)
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should be able to view a company by e-mail domain" do
|
69
|
+
stub_request(:get, "https://api.linkedin.com/v1/companies/email-domain=acme.com").to_return(:body => "{}")
|
70
|
+
client.company(:domain => 'acme.com').should be_an_instance_of(LinkedIn::Mash)
|
71
|
+
end
|
72
|
+
|
63
73
|
it "should load correct company data" do
|
64
74
|
client.company(:id => 1586).name.should == "Amazon"
|
65
75
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
5
|
uri: https://api.linkedin.com:443/v1/companies/id=1586
|
6
|
-
body: !!null
|
6
|
+
body: !!null
|
7
7
|
headers:
|
8
8
|
x-li-format:
|
9
9
|
- json
|
@@ -37,7 +37,7 @@
|
|
37
37
|
request: !ruby/struct:VCR::Request
|
38
38
|
method: :get
|
39
39
|
uri: https://api.linkedin.com:443/v1/companies/id=1586:(id,name,industry,locations:(address:(city,state,country-code),is-headquarters),employee-count-range)
|
40
|
-
body: !!null
|
40
|
+
body: !!null
|
41
41
|
headers:
|
42
42
|
x-li-format:
|
43
43
|
- json
|
@@ -66,8 +66,8 @@
|
|
66
66
|
date:
|
67
67
|
- Thu, 20 Oct 2011 16:57:24 GMT
|
68
68
|
body: ! "{\n \"employeeCountRange\": {\n \"code\": \"I\",\n \"name\": \"10001+\"\n
|
69
|
-
|
69
|
+
},\n \"id\": 1586,\n \"industry\": \"Internet\",\n \"locations\": {\n \"_total\":
|
70
70
|
1,\n \"values\": [{\n \"address\": {\n \"city\": \"Seattle\",\n
|
71
|
-
|
71
|
+
\"countryCode\": \"us\",\n \"state\": \"WA\"\n },\n \"isHeadquarters\":
|
72
72
|
true\n }]\n },\n \"name\": \"Amazon\"\n}"
|
73
73
|
http_version: '1.1'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkedin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-10
|
13
|
+
date: 2011-11-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: hashie
|
17
|
-
requirement: &
|
17
|
+
requirement: &70116712939340 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70116712939340
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: multi_json
|
28
|
-
requirement: &
|
28
|
+
requirement: &70116712934780 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 1.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70116712934780
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: oauth
|
39
|
-
requirement: &
|
39
|
+
requirement: &70116712932800 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 0.4.5
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70116712932800
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: json
|
50
|
-
requirement: &
|
50
|
+
requirement: &70116700088200 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '1.6'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70116700088200
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rake
|
61
|
-
requirement: &
|
61
|
+
requirement: &70116700085800 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0.9'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70116700085800
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rdoc
|
72
|
-
requirement: &
|
72
|
+
requirement: &70116700083960 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '3.8'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70116700083960
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec
|
83
|
-
requirement: &
|
83
|
+
requirement: &70116700195080 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ~>
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '2.6'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70116700195080
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: simplecov
|
94
|
-
requirement: &
|
94
|
+
requirement: &70116700206120 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ~>
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0.5'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70116700206120
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: vcr
|
105
|
-
requirement: &
|
105
|
+
requirement: &70116700203880 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '1.10'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70116700203880
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: webmock
|
116
|
-
requirement: &
|
116
|
+
requirement: &70116700202900 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ~>
|
@@ -121,7 +121,7 @@ dependencies:
|
|
121
121
|
version: '1.7'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70116700202900
|
125
125
|
description: Ruby wrapper for the LinkedIn API
|
126
126
|
email:
|
127
127
|
- wynn.netherland@gmail.com
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubyforge_project:
|
191
|
-
rubygems_version: 1.8.
|
191
|
+
rubygems_version: 1.8.10
|
192
192
|
signing_key:
|
193
193
|
specification_version: 3
|
194
194
|
summary: Ruby wrapper for the LinkedIn API
|
@@ -203,3 +203,4 @@ test_files:
|
|
203
203
|
- spec/fixtures/cassette_library/LinkedIn_Client/_request_token/with_a_callback_url.yml
|
204
204
|
- spec/fixtures/cassette_library/LinkedIn_Client/_request_token/with_default_options.yml
|
205
205
|
- spec/helper.rb
|
206
|
+
has_rdoc:
|