gravtastic 2.1.1 → 2.1.3

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 CHANGED
@@ -104,8 +104,9 @@ Fork the project, submit a pull request and I'll get to it straight away. Or you
104
104
  ## Thanks
105
105
 
106
106
  * [Xavier Shay](http://rhnh.net) and others for [Enki](http://enkiblog.com) (the reason this was originally written)
107
- * [Matthew Moore](http://www.matthewpaulmoore.com/) for helpful suggestions and for submitting it to the official list of Gravatar implementations.
108
- * [Vincent Charles](http://vincentcharles.com/) For some documentation in a previous version.
107
+ * [Matthew Moore](http://www.matthewpaulmoore.com)
108
+ * [Vincent Charles](http://vincentcharles.com)
109
+ * [Paul Farnell](http://litmusapp.com/blog)
109
110
 
110
111
  ## License
111
112
 
@@ -71,8 +71,8 @@ module Gravtastic
71
71
 
72
72
  def url_params_from_hash(hash)
73
73
  '?' + hash.map do |key, val|
74
- [self.class.gravatar_options(key.to_sym) || key.to_s, CGI::escape(val.to_s) ].join('=')
75
- end.sort.join('&')
74
+ [self.class.gravatar_options[key.to_sym] || key.to_s, CGI::escape(val.to_s) ].join('=')
75
+ end.sort.join('&')
76
76
  end
77
77
 
78
78
  def gravatar_hostname(secure)
@@ -1,5 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper'
2
- require 'gravtastic'
2
+ require File.dirname(__FILE__) + '/../lib/gravtastic'
3
3
 
4
4
  describe Gravtastic do
5
5
 
@@ -65,9 +65,13 @@ describe Gravtastic do
65
65
  @user.gravatar_url(:rating => 'R').should == 'http://gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af.png?r=R'
66
66
  end
67
67
 
68
+ it "abides to some new fancy feature" do
69
+ @user.gravatar_url(:extreme => true).should == 'http://gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af.png?extreme=true&r=PG'
70
+ end
71
+
68
72
  it "makes a URL from the defaults" do
69
73
  stub(@user.class).gravatar_defaults{ {:size => 20, :rating => 'R18', :secure => true, :filetype => :png} }
70
- @user.gravatar_url.should == 'https://secure.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af.png?r=R18&s=20'
74
+ @user.gravatar_url.should == 'https://secure.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af.png?r=R18&s=20'
71
75
  end
72
76
 
73
77
  end
@@ -1,9 +1,6 @@
1
1
  $TESTING=true
2
2
  $:.push File.join(File.dirname(__FILE__), '..', 'lib')
3
3
 
4
- require 'rubygems'
5
- require 'spec'
6
-
7
4
  def reload_gravtastic!
8
5
  Object.class_eval { remove_const :Gravtastic } if defined? Gravtastic
9
6
  require File.join(File.dirname(__FILE__),'../lib/gravtastic')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gravtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Lloyd