gravatarnize 1.0.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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGEyZmRiMjcyNDQwMDYxNGQyOWU1MzE4MzAyMGExZDQ0YWU1MjViZg==
5
+ data.tar.gz: !binary |-
6
+ Y2ZhZDRkYzc3OTIwODkwZWE1NTEwMzQ3ZmI4M2FiMTg3MDc0NjIwMA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ M2EzNzM0YTMwZjkzNzY2MmJmNTY5YjUzMTgxZjI0ZDdlMTcwYmM5ZTY5MjE3
10
+ NTRkZjgzYWVlNjc5MTY5NjA2MGRhMWNhODMyMDIxNzdiN2MwMWJjZGU1MmFl
11
+ MmVjZjllZmQ4NWE4MjI3OWRkOTk3MjBmMjMyZjE0ZGNhMWM2NTA=
12
+ data.tar.gz: !binary |-
13
+ YzJiODdjMTQ2OTMwNjVlNThjNmRlNzhmN2FiMWE5ZTI2ZWZjNjA3ZDRlYzIx
14
+ ZWU4NWE2NWQ5YTExYmM3YTMxYTc4NTBlNDU0YjQ0MGQwMTkwNjU1NTUwMDY3
15
+ NTY3ZWNhZDZmNmYxNDQyNjY0OWExZDk5OWI2MWY2ZjYzOTYxMzM=
data/README.md ADDED
File without changes
@@ -0,0 +1,16 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "gravatarnize"
6
+ s.version = '1.0.0'
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Mateus Prado"]
9
+ s.email = ["mateus@mateusprado.com"]
10
+ s.homepage = "http://www.mateusprado.com"
11
+ s.description = %Q{Gravatar and nothing else.}
12
+ s.summary = s.description
13
+
14
+ s.files = Dir["./**/*"].reject {|file| file =~ /\.git|pkg/}
15
+ s.require_paths = ["lib"]
16
+ end
@@ -0,0 +1,10 @@
1
+ module Gravatarnize
2
+ class Avatar
3
+ class << self
4
+ def get_by_email(email)
5
+ hash = Gravatarnize::Hash.build(email)
6
+ "http://www.gravatar.com/avatar/#{hash}"
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'digest/md5'
2
+ module Gravatarnize
3
+ class Hash
4
+ class << self
5
+ def build(email)
6
+ Digest::MD5.hexdigest("#{email}")
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,2 @@
1
+ require 'gravatarnize/avatar'
2
+ require 'gravatarnize/hash'
@@ -0,0 +1,6 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+
3
+ require 'gravatarnize'
4
+ avatar = Gravatarnize::Avatar.get_by_email("mateus@mateusprado.com")
5
+ puts avatar
6
+
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gravatarnize
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Mateus Prado
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Gravatar and nothing else.
14
+ email:
15
+ - mateus@mateusprado.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ./gravatarnize.gemspec
21
+ - ./lib/gravatarnize/avatar.rb
22
+ - ./lib/gravatarnize/hash.rb
23
+ - ./lib/gravatarnize.rb
24
+ - ./README.md
25
+ - ./spec/gravatarnize-spec.rb
26
+ homepage: http://www.mateusprado.com
27
+ licenses: []
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.0.3
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Gravatar and nothing else.
49
+ test_files: []