socialmux 0.0.4 → 0.0.5
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 +1 -1
- data/lib/socialmux/auth_mapper/guess_name.rb +1 -1
- data/lib/socialmux/auth_mapper/instagram.rb +20 -0
- data/lib/socialmux/auth_mapper.rb +1 -0
- data/lib/socialmux/version.rb +1 -1
- data/spec/fixtures/google_response.json +1 -4
- data/spec/fixtures/instagram_response.json +17 -0
- data/spec/lib/auth_mapper/google_oauth2_spec.rb +1 -3
- data/spec/lib/auth_mapper/instagram_spec.rb +22 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa22bc43651260b9bf9d759aa142da59a9fa4fd1
|
4
|
+
data.tar.gz: 754b6ce65db9e047bee072c3bb8ee7bf25e80692
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e1577953efccd53c0c0122168b226710ca7b179a0c988d9bac85d3ffa87ebc9d936f9f58e7350042a509da824c391e510bb508e94b4b3c268c9aaa0ead9b06a
|
7
|
+
data.tar.gz: 68c73b80c685a3b2a3e7d0fac80f43c726d78dea0bbed58d5d4a8b7cab80006dd4f55934b6dc9fed80977488a41ff98e356168267a0a32704fb92efce1f1710b
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Socialmux
|
2
|
+
module AuthMapper
|
3
|
+
class Instagram < GuessName
|
4
|
+
def url
|
5
|
+
"http://instagram.com/#{nickname}"
|
6
|
+
end
|
7
|
+
|
8
|
+
def description
|
9
|
+
info.bio
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def nickname
|
15
|
+
info["nickname"]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
data/lib/socialmux/version.rb
CHANGED
@@ -6,10 +6,7 @@
|
|
6
6
|
"email": "stefano.verna@gmail.com",
|
7
7
|
"first_name": "Stefano",
|
8
8
|
"last_name": "Verna",
|
9
|
-
"image": "https://lh3.googleusercontent.com/-Mk9Xg5Qy_vc/AAAAAAAAAAI/AAAAAAAAAK4/h0ffVEFGrTo/photo.jpg"
|
10
|
-
"urls": {
|
11
|
-
"Google": "https://plus.google.com/106136318376168001814"
|
12
|
-
}
|
9
|
+
"image": "https://lh3.googleusercontent.com/-Mk9Xg5Qy_vc/AAAAAAAAAAI/AAAAAAAAAK4/h0ffVEFGrTo/photo.jpg"
|
13
10
|
},
|
14
11
|
"credentials": {
|
15
12
|
"token": "XXX",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"provider": "instagram",
|
3
|
+
"uid": "15075543",
|
4
|
+
"info": {
|
5
|
+
"nickname": "steffoz",
|
6
|
+
"name": "Stefano Verna",
|
7
|
+
"image": "http://images.ak.instagram.com/profiles/anonymousUser.jpg",
|
8
|
+
"bio": "Foobar",
|
9
|
+
"website": "http://google.com"
|
10
|
+
},
|
11
|
+
"credentials": {
|
12
|
+
"token": "XXX",
|
13
|
+
"expires": false
|
14
|
+
},
|
15
|
+
"extra": {}
|
16
|
+
}
|
17
|
+
|
@@ -12,10 +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
|
15
|
+
its(:url) { should be_nil }
|
16
16
|
its(:gender) { should eq Gender::MALE }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module Socialmux::AuthMapper
|
6
|
+
describe Twitter do
|
7
|
+
subject do
|
8
|
+
Instagram.new(read_json('instagram_response'))
|
9
|
+
end
|
10
|
+
|
11
|
+
its(:uid) { should eq "15075543" }
|
12
|
+
its(:provider) { should eq "instagram" }
|
13
|
+
its(:first_name) { should eq "Stefano" }
|
14
|
+
its(:last_name) { should eq "Verna" }
|
15
|
+
its(:email) { should be nil }
|
16
|
+
its(:image) { should eq "http://images.ak.instagram.com/profiles/anonymousUser.jpg" }
|
17
|
+
its(:description) { should eq "Foobar" }
|
18
|
+
its(:url) { should eq "http://instagram.com/steffoz" }
|
19
|
+
its(:gender) { should be_nil }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08
|
11
|
+
date: 2013-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/socialmux/auth_mapper/github.rb
|
144
144
|
- lib/socialmux/auth_mapper/google_oauth2.rb
|
145
145
|
- lib/socialmux/auth_mapper/guess_name.rb
|
146
|
+
- lib/socialmux/auth_mapper/instagram.rb
|
146
147
|
- lib/socialmux/auth_mapper/linkedin.rb
|
147
148
|
- lib/socialmux/auth_mapper/twitter.rb
|
148
149
|
- lib/socialmux/event.rb
|
@@ -154,12 +155,14 @@ files:
|
|
154
155
|
- spec/fixtures/facebook_response.json
|
155
156
|
- spec/fixtures/github_response.json
|
156
157
|
- spec/fixtures/google_response.json
|
158
|
+
- spec/fixtures/instagram_response.json
|
157
159
|
- spec/fixtures/linkedin_response.json
|
158
160
|
- spec/fixtures/twitter_response.json
|
159
161
|
- spec/lib/.gitkeep
|
160
162
|
- spec/lib/auth_mapper/facebook_spec.rb
|
161
163
|
- spec/lib/auth_mapper/github_spec.rb
|
162
164
|
- spec/lib/auth_mapper/google_oauth2_spec.rb
|
165
|
+
- spec/lib/auth_mapper/instagram_spec.rb
|
163
166
|
- spec/lib/auth_mapper/linkedin_spec.rb
|
164
167
|
- spec/lib/auth_mapper/twitter_spec.rb
|
165
168
|
- spec/lib/auth_mapper_spec.rb
|
@@ -188,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
191
|
version: '0'
|
189
192
|
requirements: []
|
190
193
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.0.
|
194
|
+
rubygems_version: 2.0.3
|
192
195
|
signing_key:
|
193
196
|
specification_version: 4
|
194
197
|
summary: Socialmux implements a strategy to add multiple social providers to the same
|
@@ -197,12 +200,14 @@ test_files:
|
|
197
200
|
- spec/fixtures/facebook_response.json
|
198
201
|
- spec/fixtures/github_response.json
|
199
202
|
- spec/fixtures/google_response.json
|
203
|
+
- spec/fixtures/instagram_response.json
|
200
204
|
- spec/fixtures/linkedin_response.json
|
201
205
|
- spec/fixtures/twitter_response.json
|
202
206
|
- spec/lib/.gitkeep
|
203
207
|
- spec/lib/auth_mapper/facebook_spec.rb
|
204
208
|
- spec/lib/auth_mapper/github_spec.rb
|
205
209
|
- spec/lib/auth_mapper/google_oauth2_spec.rb
|
210
|
+
- spec/lib/auth_mapper/instagram_spec.rb
|
206
211
|
- spec/lib/auth_mapper/linkedin_spec.rb
|
207
212
|
- spec/lib/auth_mapper/twitter_spec.rb
|
208
213
|
- spec/lib/auth_mapper_spec.rb
|
@@ -211,3 +216,4 @@ test_files:
|
|
211
216
|
- spec/spec_helper.rb
|
212
217
|
- spec/support/fixture_helpers.rb
|
213
218
|
- spec/support/rspec_config.rb
|
219
|
+
has_rdoc:
|