avataree 0.5.0 → 0.6.0
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/lib/avataree/image.rb +1 -1
- data/lib/avataree/profile.rb +2 -2
- data/lib/avataree/switch.rb +3 -3
- metadata +3 -3
data/lib/avataree/image.rb
CHANGED
data/lib/avataree/profile.rb
CHANGED
|
@@ -26,7 +26,7 @@ require 'open-uri'
|
|
|
26
26
|
|
|
27
27
|
module Avataree
|
|
28
28
|
|
|
29
|
-
module
|
|
29
|
+
module ProfileServices
|
|
30
30
|
|
|
31
31
|
#image path for gravatar if not defined?
|
|
32
32
|
# PROFILE_PATH = "http://www.gravatar.com/" unless const_defined?("PROFILE_PATH")
|
|
@@ -45,7 +45,7 @@ module Avataree
|
|
|
45
45
|
email = make_digest(email)
|
|
46
46
|
email << ".json"
|
|
47
47
|
params = options.to_param unless options.empty?
|
|
48
|
-
resulted_path = services_url
|
|
48
|
+
resulted_path = [services_url, email].join
|
|
49
49
|
path = [resulted_path, params].compact.join("?")
|
|
50
50
|
begin
|
|
51
51
|
JSON.parse(open(path).read)
|
data/lib/avataree/switch.rb
CHANGED
|
@@ -9,13 +9,13 @@ module Avataree
|
|
|
9
9
|
|
|
10
10
|
def enable_for_controller!
|
|
11
11
|
#hook for ActionController
|
|
12
|
-
ActionController::Base.send(:include, Avataree::
|
|
13
|
-
ActionController::Base.send(:include, Avataree::
|
|
12
|
+
ActionController::Base.send(:include, Avataree::ImageServices)
|
|
13
|
+
ActionController::Base.send(:include, Avataree::ProfileServices)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def enable_for_views!
|
|
17
17
|
#hook for ActionView
|
|
18
|
-
ActionView::Base.send(:include, Avataree::
|
|
18
|
+
ActionView::Base.send(:include, Avataree::ImageServices)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: avataree
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 7
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
8
|
+
- 6
|
|
9
9
|
- 0
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.6.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Bagwan Pankaj (a.k.a modulo9)
|