gravy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in gravy.gemspec
4
+ gemspec
@@ -0,0 +1,17 @@
1
+ # Gravy
2
+
3
+ Gravy is a very simple rails engine that makes the already easy usage of gravatar dead simple.
4
+
5
+ ## Usage
6
+
7
+ In your Gemfile:
8
+
9
+ `gem "gravy"`
10
+
11
+ In your Rails app:
12
+
13
+ `Gravy::Avatar("foo@bar.com")`
14
+
15
+ This will return the image url for the gravatar associated with that email address.
16
+
17
+
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "gravy/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "gravy"
7
+ s.version = Gravy::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Oemuer Oezkir"]
10
+ s.email = ["oemuer.oezkir@gmail.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{Use Gravatar in your rails app}
13
+ s.description = %q{A very simple rails engine for the Gravatar service}
14
+
15
+ s.rubyforge_project = "gravy"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ end
@@ -0,0 +1,3 @@
1
+ module Gravy
2
+ require "gravy/avatar" if defined?(Rails)
3
+ end
@@ -0,0 +1,10 @@
1
+ module Gravy
2
+
3
+ def Avatar(email)
4
+ gravatar_id = Digest::MD5.hexdigest(email.downcase)
5
+ "http://gravatar.com/avatar/#{gravatar_id}.png"
6
+ end
7
+
8
+ module_function :Avatar
9
+
10
+ end
@@ -0,0 +1,3 @@
1
+ module Gravy
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gravy
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Oemuer Oezkir
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-02-26 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: A very simple rails engine for the Gravatar service
22
+ email:
23
+ - oemuer.oezkir@gmail.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - .gitignore
32
+ - Gemfile
33
+ - README.md
34
+ - Rakefile
35
+ - gravy.gemspec
36
+ - lib/gravy.rb
37
+ - lib/gravy/avatar.rb
38
+ - lib/gravy/version.rb
39
+ has_rdoc: true
40
+ homepage: ""
41
+ licenses: []
42
+
43
+ post_install_message:
44
+ rdoc_options: []
45
+
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ requirements: []
65
+
66
+ rubyforge_project: gravy
67
+ rubygems_version: 1.3.7
68
+ signing_key:
69
+ specification_version: 3
70
+ summary: Use Gravatar in your rails app
71
+ test_files: []
72
+