motion-gravatar 0.0.1 → 0.0.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/README.md +18 -2
- data/lib/motion-gravatar/motion-gravatar.rb +2 -3
- data/motion-gravatar.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -4,12 +4,28 @@ Generate the URL for a user's Gravatar image by providing an email address, imag
|
|
4
4
|
|
5
5
|
# Install
|
6
6
|
|
7
|
-
|
7
|
+
Use Bundler to manage gems in RubyMotion.
|
8
|
+
|
9
|
+
**Rakefile**
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
$:.unshift("/Library/RubyMotion/lib")
|
13
|
+
require 'motion/project'
|
14
|
+
require 'bundler'
|
15
|
+
Bundler.require
|
16
|
+
|
17
|
+
Motion::Project::App.setup do |app|
|
18
|
+
# Use `rake config' to see complete project settings.
|
19
|
+
app.name = 'Testing'
|
20
|
+
end
|
21
|
+
```
|
22
|
+
|
23
|
+
**Gemfile**
|
8
24
|
|
9
25
|
```ruby
|
10
26
|
source :rubygems
|
11
27
|
|
12
|
-
gem 'motion-gravatar'
|
28
|
+
gem 'motion-gravatar'
|
13
29
|
```
|
14
30
|
|
15
31
|
Run `bundle install`.
|
@@ -3,11 +3,10 @@ class Gravatar
|
|
3
3
|
|
4
4
|
# Generate the URL for a user's Gravatar image by providing an email address, image size, and optional default image URL.
|
5
5
|
# @param [String] email
|
6
|
-
# @param [Integer] size Between 1 and 512.
|
6
|
+
# @param [Integer] size Between 1 and 512.
|
7
7
|
# @param [String] defaultURL (optional)
|
8
8
|
# @return [NSURL]
|
9
|
-
def self.getURL(email, size=
|
10
|
-
size = 80 if size.nil?
|
9
|
+
def self.getURL(email, size=80, defaultURL=nil)
|
11
10
|
GravatarHelper.getGravatarURL(email, size:size, defaultURL:defaultURL)
|
12
11
|
end
|
13
12
|
|
data/motion-gravatar.gemspec
CHANGED