gravatarnize 1.0.1 → 1.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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzZlODY3YTdhM2ViZWZhNTI4MzY1MTYxOTE2NDhlN2E3NThhZjEzYg==
4
+ OWU5MTEzZWYzZmUxYmRhZDg1ZjVlN2U5YmNiY2QwNGU3NTVlYmFkYQ==
5
5
  data.tar.gz: !binary |-
6
- NWQ5MzI1ZDY4OGMxYTkyYWY0OTA4MWM2NGY2NGQ5ODFlNzczOTQ4YQ==
6
+ MGI0ZDVkZTMzMDAzOTdhNGMyMjg1YWU5OTU4MGQ3Y2M0Nzc0YTNmMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YmUyZTYzMTA0Yzc1ZWY2Njc4ZGIyMTQ0MTY5MzNjMTM4NWY5NDcwZjE3MDBl
10
- MTQ4N2E2YWM5ZGYyNzQ4YjMxYTMxMjEyZWQ5ZTlmYzliOTZiY2IzNDJhYTJl
11
- YjNjMWFiY2QyYzhmZGJmNjQzNzM1OTkyYjU1ZjZiMDg1MTA1YzU=
9
+ M2RhM2Y0MTJkMjAzZjkwZWRmZTliMWE2OWY4NDY5Njc2OWNhMDVkNmY0MTM5
10
+ ZWIzMTk3NWFkNTg0MWMwYjJkNmUwMTVjOGJhNDU1NDIxY2M5ZjRhMTc3OWQx
11
+ ZDA1ZWQ3ODMxODdhMDUxNmYwY2IxNjI4OWNjNjU5NmQzMzYyMmM=
12
12
  data.tar.gz: !binary |-
13
- ODM4YWI5Zjc2NDlkNzJkYWJjZDRjNjc0YjA5NjU2YmM5YjEwOGEyZDI2NWYy
14
- YmIyYjczMzIwZGE2NTNiOTljZTUwNTM0ZWNkYWI1MWI4YjhhZTM4MmEyMmM3
15
- MGVlYzhiODYyZTViMzZjNWExY2VhMThmMzRkOTcwNjgwZjFlN2E=
13
+ NDUwNDA3NzZlOWUwZDE5Nzg3NzMwY2E4MGI3Y2I0MmE2NmEzZDcxY2VlZDMx
14
+ MmRmYjRjMzVhNWE4YWIxOWI2ZjE0MTMwMzliZjA0ZDM5YzQyMTYwODhlMGFj
15
+ NjQ3ODdkOGE3NTFiMTZjMGEyOGVlYzU3NzI3NWI0YTBlZjg4NDM=
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
  ### How to?
3
3
  gem install gravatarnize
4
4
 
5
- require 'gravatarnize'
5
+ require 'gravatarnize'
6
+
6
7
  Gravatarnize::Avatar.get_by_email("email@domain.com")
7
8
 
9
+ To supply query parameters, simply pass a hash as the second argument:
10
+
11
+ Gravatarnize::Avatar.get_by_email("email@domain.com", s: '40')
data/gravatarnize.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "gravatarnize"
6
- s.version = '1.0.1'
6
+ s.version = '1.0.2'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Mateus Prado"]
9
9
  s.email = ["mateus@mateusprado.com"]
@@ -1,10 +1,13 @@
1
1
  module Gravatarnize
2
2
  class Avatar
3
3
  class << self
4
- def get_by_email(email)
4
+ def get_by_email(email, opts = {})
5
+ url_params = []
6
+ opts.each_pair { |key, value| url_params << "#{key}=#{value}"} unless opts.empty?
7
+
5
8
  hash = Gravatarnize::Hash.build(email)
6
- "http://www.gravatar.com/avatar/#{hash}"
9
+ "http://www.gravatar.com/avatar/#{hash}?#{url_params.join("&")}"
7
10
  end
8
11
  end
9
12
  end
10
- end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gravatarnize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateus Prado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-05 00:00:00.000000000 Z
11
+ date: 2013-10-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gravatar and nothing else.
14
14
  email:
@@ -17,7 +17,6 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - ./gravatarnize-1.0.0.gem
21
20
  - ./gravatarnize.gemspec
22
21
  - ./lib/gravatarnize/avatar.rb
23
22
  - ./lib/gravatarnize/hash.rb
Binary file