rb-gravatar 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/rb-gravatar.rb +9 -11
  3. metadata +6 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3d771d980e83228dc6dcde938624cb4582cc4698
4
- data.tar.gz: 29f2858a6553c3a019d14f4784333c4104ff16dd
2
+ SHA256:
3
+ metadata.gz: 6376f1a3deb7e4e7f6297e8e3d460dc3a180ed6acad590215a49e4f266d065c3
4
+ data.tar.gz: 39b3b1ec81689c28675d846dc7ed3e0387e6667a4d1f7f30ee7518bd1e142dfa
5
5
  SHA512:
6
- metadata.gz: eab5c7ec50f2493e79644381ee3efa726cf2a38fb16c36912c981e7d19391a6123a5f52604e26dff620ed73aec455c49c434685b9d44abb95b7fb6174cc75de5
7
- data.tar.gz: b91d83ed6d753da425cd0ebcec39b4d97bbf952092cd4d196c923974c5bf98aa26f4df23a9f9483c7f9e4e8402af934cc985f289b46aa105f379ca9703ace307
6
+ metadata.gz: ccd846d20a1861e97b1a306f928d2a4ec83aeb9118e5ebf147cd0949d9c4bc72421aa4842cc8086357076c94015ed00b1761f2c9f7dfdb05614b12cc6a9d5edf
7
+ data.tar.gz: 4a7ea41d52a464193fa091db91f32c84f9bbd547cfe347e5acdf95027a2eeec502416122222ab804f4a049640ad91d2f4c111c332ec16563014e894a72e9a585
@@ -10,14 +10,16 @@ class Gravatar
10
10
 
11
11
  parts = []
12
12
  parts << "//www.gravatar.com/avatar/"
13
- parts << "#{Digest::MD5.hexdigest(email_address.downcase.strip)}"
14
- parts << "?s=#{size}"
13
+ parts << Digest::MD5.hexdigest(email_address.downcase.strip)
14
+ parts << "?s="
15
+ parts << size
15
16
 
16
17
  if !default.nil?
17
- parts << "&d=#{CGI.escape(default)}"
18
+ parts << "&d="
19
+ parts << CGI.escape(default)
18
20
  end
19
21
 
20
- parts.join
22
+ parts.join
21
23
  end
22
24
 
23
25
  # Generate and return only the Gravatar URI
@@ -31,15 +33,11 @@ class Gravatar
31
33
 
32
34
  # Generate and return the full img tag for the Gravatar URI
33
35
  def self.tag(email_address, size = 64, default = nil, alt_text = nil)
34
- begin
35
- return "<img src='#{Gravatar.construct_resource(email_address, size, default)}' class='gravatar' alt='#{alt_text}' />"
36
- rescue Exception => e
37
- nil
38
- end
36
+ return "<img src='#{Gravatar.construct_resource(email_address, size, default)}' class='gravatar' alt='#{alt_text}' />"
39
37
  end
40
38
 
41
39
  # Output the DNS preload tags
42
- def self.prefetch_dns()
40
+ def self.prefetch_dns
43
41
  '<link rel="dns-prefetch" href="//gravatar.com">'
44
42
  end
45
- end
43
+ end
metadata CHANGED
@@ -1,25 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-gravatar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Nieuwoudt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-02 00:00:00.000000000 Z
11
+ date: 2020-07-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple up to date gem for creating Gravatar image URL's and tags
14
- email: sean@wixelhq.com
14
+ email: sean@isean.co.za
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/rb-gravatar.rb
20
- homepage: http://github.com/Wixel/ruby-gravatar
20
+ homepage: http://github.com/sn/ruby-gravatar
21
21
  licenses:
22
- - MIT
22
+ - GPL-3.0
23
23
  metadata: {}
24
24
  post_install_message:
25
25
  rdoc_options: []
@@ -36,8 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []
39
- rubyforge_project:
40
- rubygems_version: 2.2.0
39
+ rubygems_version: 3.1.4
41
40
  signing_key:
42
41
  specification_version: 4
43
42
  summary: rb-gravatar