authorizme 1.1.1 → 1.1.2
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.
data/CHANGELOG.md
CHANGED
@@ -29,7 +29,7 @@ module Authorizme
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def set_facebook
|
32
|
-
options = {client_id: Authorizme::facebook_client_id, client_secret: Authorizme::facebook_client_secret}
|
32
|
+
options = {client_id: Authorizme::facebook_client_id, client_secret: Authorizme::facebook_client_secret, image_size: Authorizme::facebook_image_size}
|
33
33
|
@facebook = Authorizme::Provider::Facebook.new(options)
|
34
34
|
end
|
35
35
|
|
data/lib/authorizme.rb
CHANGED
@@ -42,6 +42,9 @@ module Authorizme
|
|
42
42
|
|
43
43
|
mattr_accessor :facebook_perms
|
44
44
|
@@facebook_perms = "email,read_stream,offline_access"
|
45
|
+
|
46
|
+
mattr_accessor :facebook_image_size
|
47
|
+
@@facebook_image_size = {width: 200, height: 200}
|
45
48
|
|
46
49
|
# Atributes for twitter.com API
|
47
50
|
mattr_accessor :twitter_consumer_key
|
@@ -26,7 +26,13 @@ module Authorizme
|
|
26
26
|
def get_user
|
27
27
|
user_json = get_user_json
|
28
28
|
if user_json
|
29
|
-
|
29
|
+
if @options[:image_size]
|
30
|
+
width = @options[:image_size][:width]
|
31
|
+
height = @options[:image_size][:height]
|
32
|
+
image_url = "https://graph.facebook.com/#{user_json.id}/picture?width=#{width}&height=#{height}"
|
33
|
+
else
|
34
|
+
image_url = "https://graph.facebook.com/#{user_json.id}/picture?type=large"
|
35
|
+
end
|
30
36
|
attributes = {first_name: user_json.first_name, last_name: user_json.last_name, image_url: image_url, email: user_json.email}
|
31
37
|
return attributes
|
32
38
|
else
|
data/lib/authorizme/version.rb
CHANGED
@@ -16,6 +16,7 @@ Authorizme.setup do |config|
|
|
16
16
|
# config.facebook_client_id = ""
|
17
17
|
# config.facebook_client_secret = ""
|
18
18
|
# config.facebook_perms = "email,user_photos,friends_photos,publish_stream,read_stream,offline_access"
|
19
|
+
# config.facebook_image_size = {width: 200, height: 200}
|
19
20
|
#
|
20
21
|
|
21
22
|
# === Twitter.com consumer key and consumer secret
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authorizme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-03-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -335,7 +335,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
335
335
|
version: '0'
|
336
336
|
segments:
|
337
337
|
- 0
|
338
|
-
hash:
|
338
|
+
hash: -448164070235002767
|
339
339
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
340
340
|
none: false
|
341
341
|
requirements:
|
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
segments:
|
346
346
|
- 0
|
347
|
-
hash:
|
347
|
+
hash: -448164070235002767
|
348
348
|
requirements: []
|
349
349
|
rubyforge_project: authorizme
|
350
350
|
rubygems_version: 1.8.25
|