socialmux 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/socialmux/auth_mapper/base.rb +9 -0
- data/lib/socialmux/auth_mapper/facebook.rb +10 -0
- data/lib/socialmux/auth_mapper/github.rb +3 -0
- data/lib/socialmux/auth_mapper/google_oauth2.rb +10 -0
- data/lib/socialmux/auth_mapper/twitter.rb +3 -0
- data/lib/socialmux/gender.rb +5 -0
- data/lib/socialmux/version.rb +1 -1
- data/spec/fixtures/facebook_response.json +1 -1
- data/spec/fixtures/github_response.json +1 -1
- data/spec/fixtures/google_response.json +1 -1
- data/spec/fixtures/linkedin_response.json +1 -1
- data/spec/fixtures/twitter_response.json +2 -2
- data/spec/lib/auth_mapper/facebook_spec.rb +2 -0
- data/spec/lib/auth_mapper/github_spec.rb +2 -0
- data/spec/lib/auth_mapper/google_oauth2_spec.rb +2 -0
- data/spec/lib/auth_mapper/linkedin_spec.rb +2 -0
- data/spec/lib/auth_mapper/twitter_spec.rb +2 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2faf70f83ed7c597f3ae72bce7d908dc6d911cc5
|
4
|
+
data.tar.gz: 82e42fd5ce81f56eeedbdcf431506aacaf78947e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25153356f1813ea2b7fed1028f0fdbe30154a9e3113c85e505b40374f879a40ecbee1547f9da55bad9192f385bb56cf47ede471fa6a59859131fb53acc5ba89a
|
7
|
+
data.tar.gz: 84733413ac3b3d3c8e8d69087b0c06fb9100ada27754c1e9d9fd0d83a1a0cca80b6f81ffbb35f65fd1a4dd5c5d317ccb36ec25b711cb5baf318d67b3f7d79f88
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'hashie'
|
2
2
|
require 'active_support/core_ext/module/delegation'
|
3
|
+
require 'socialmux/gender'
|
3
4
|
|
4
5
|
module Socialmux
|
5
6
|
module AuthMapper
|
@@ -19,6 +20,14 @@ module Socialmux
|
|
19
20
|
def initialize(data)
|
20
21
|
@data = Hashie::Mash.new(data)
|
21
22
|
end
|
23
|
+
|
24
|
+
def url
|
25
|
+
info.urls.values.first
|
26
|
+
end
|
27
|
+
|
28
|
+
def gender
|
29
|
+
nil
|
30
|
+
end
|
22
31
|
end
|
23
32
|
end
|
24
33
|
end
|
data/lib/socialmux/version.rb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"verified": true
|
16
16
|
},
|
17
17
|
"credentials": {
|
18
|
-
"token": "
|
18
|
+
"token": "XXX",
|
19
19
|
"expires_at": 1380465613,
|
20
20
|
"expires": true
|
21
21
|
},
|
@@ -20,7 +20,7 @@
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
"credentials": {
|
23
|
-
"token": "
|
23
|
+
"token": "XXX",
|
24
24
|
"expires": false
|
25
25
|
},
|
26
26
|
"extra": {
|
@@ -12,6 +12,8 @@ module Socialmux::AuthMapper
|
|
12
12
|
its(:last_name) { should eq "Verna" }
|
13
13
|
its(:email) { should eq "stefano.verna@welaika.com" }
|
14
14
|
its(:image) { should eq "http://graph.facebook.com/771417286/picture?type=square" }
|
15
|
+
its(:url) { should eq "https://www.facebook.com/stefano.verna" }
|
16
|
+
its(:gender) { should eq Gender::MALE }
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
@@ -12,6 +12,8 @@ module Socialmux::AuthMapper
|
|
12
12
|
its(:last_name) { should eq "Verna" }
|
13
13
|
its(:email) { should eq "stefano.verna@gmail.com" }
|
14
14
|
its(:image) { should eq "https://secure.gravatar.com/avatar/f1b1c16a5b246b3b7cff8d8a07aa9725?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" }
|
15
|
+
its(:url) { should eq "https://github.com/stefanoverna" }
|
16
|
+
its(:gender) { should be_nil }
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
@@ -12,6 +12,8 @@ module Socialmux::AuthMapper
|
|
12
12
|
its(:last_name) { should eq "Verna" }
|
13
13
|
its(:email) { should eq "stefano.verna@gmail.com" }
|
14
14
|
its(:image) { should eq "https://lh3.googleusercontent.com/-Mk9Xg5Qy_vc/AAAAAAAAAAI/AAAAAAAAAK4/h0ffVEFGrTo/photo.jpg" }
|
15
|
+
its(:url) { should eq "https://plus.google.com/106136318376168001814" }
|
16
|
+
its(:gender) { should eq Gender::MALE }
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
@@ -13,6 +13,8 @@ module Socialmux::AuthMapper
|
|
13
13
|
its(:email) { should eq "stefano.verna@gmail.com" }
|
14
14
|
its(:image) { should eq "http://m.c.lnkd.licdn.com/mpr/mprx/0_dCvykIIfOoeQZqWUdXQ_keMhpEuE4-4UIhTikeHriWZsFnfR5k5KoHyO-G2vUzJBHTBCwfsBBN4N" }
|
15
15
|
its(:description) { should eq "Software Engineer at weLaika" }
|
16
|
+
its(:url) { should eq "http://www.linkedin.com/in/stefanoverna" }
|
17
|
+
its(:gender) { should be_nil }
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
@@ -15,6 +15,8 @@ module Socialmux::AuthMapper
|
|
15
15
|
its(:email) { should be nil }
|
16
16
|
its(:image) { should eq "http://a0.twimg.com/profile_images/3060238387/a9b2a4cd85377cf0c12b22fedcac80b3_normal.png" }
|
17
17
|
its(:description) { should eq "28 years, 2 babies, Rails and iOS developer, cofounder of @weLaika. Tweet me anytime! ♥" }
|
18
|
+
its(:url) { should eq "https://twitter.com/steffoz" }
|
19
|
+
its(:gender) { should be_nil }
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialmux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/socialmux/auth_mapper/linkedin.rb
|
147
147
|
- lib/socialmux/auth_mapper/twitter.rb
|
148
148
|
- lib/socialmux/event.rb
|
149
|
+
- lib/socialmux/gender.rb
|
149
150
|
- lib/socialmux/result.rb
|
150
151
|
- lib/socialmux/strategy.rb
|
151
152
|
- lib/socialmux/version.rb
|