faces 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -2
- data/VERSION +1 -1
- data/faces.gemspec +2 -2
- data/lib/faces.rb +4 -2
- metadata +3 -3
data/README.markdown
CHANGED
@@ -77,8 +77,10 @@ Faces has a hierarchy system for configuration. We start of with a universal con
|
|
77
77
|
Faces by default sets a whole bunch of values for provider & universal configurations, but we highly recommend you change them to suit your needs. I've listed the universal ones below and provider specific configuration options with their provider documentations.
|
78
78
|
|
79
79
|
* ::Faces::Configuration::UNIVERSAL
|
80
|
-
* Fallback avatar url (
|
81
|
-
* :default =>
|
80
|
+
* Fallback avatar url (hash)
|
81
|
+
* :default => {
|
82
|
+
50 => 'http://www.gravatar.com/avatar/?d=identicon'
|
83
|
+
}
|
82
84
|
* Max dimension constraints for width/height of avatar (integer)
|
83
85
|
* :size => 50
|
84
86
|
* Universally assigned classes to all avatars (string)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.3
|
data/faces.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{faces}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nick Pellant"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-14}
|
13
13
|
s.description = %q{Avatars made super simple.}
|
14
14
|
s.email = %q{nick@silentale.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/faces.rb
CHANGED
@@ -57,12 +57,14 @@ module Faces
|
|
57
57
|
end
|
58
58
|
# Returns the default avatar in an <img /> HTML tag
|
59
59
|
def avatar_default_html(configuration = {})
|
60
|
-
|
60
|
+
default = configuration[:default].present? ? configuration[:default] : ::Faces::Configuration::UNIVERSAL[:default]
|
61
|
+
url = configuration[:size].present? ? default[configuration[:size]] : default::Faces::Configuration::UNIVERSAL[:size]
|
61
62
|
generate_html(url, configuration)
|
62
63
|
end
|
63
64
|
# Returns the default avatar as a url
|
64
65
|
def avatar_default_url(configuration = {})
|
65
|
-
configuration[:default].present? ? configuration[:default] : ::Faces::Configuration::UNIVERSAL[:default]
|
66
|
+
default = configuration[:default].present? ? configuration[:default] : ::Faces::Configuration::UNIVERSAL[:default]
|
67
|
+
url = configuration[:size].present? ? default[configuration[:size]] : default::Faces::Configuration::UNIVERSAL[:size]
|
66
68
|
end
|
67
69
|
# Returns true if provider exists, false if not
|
68
70
|
def provider_exists?(provider)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 3
|
9
|
+
version: 0.6.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Pellant
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-14 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|