aadlani/nanoc-toolbox — Issue #1: The gem is not compatible with ruby 1.8
Author: aadlani
Created: 2011-11-14 18:47:23+00:00
State: open

There is an issue with the `Nanoc::Toolbox::Helpers::Gravatar` module that generate the error `undefined method <=> for :default_icon:Symbol` when the helper tries to build options parameters.

**Failing specs:**

```spec

Failures:

1) Nanoc::Toolbox::Helpers::Gravatar.gravatar_url when parameters passed in the options should sort the url parameters
Failure/Error: @gravatar.gravatar_url(@email, :size => 45, :default_icon => 'monsterid', :rating => 'x').should == @secure_host[false] + '?default_icon=monsterid&rating=x&size=45'
NoMethodError:
undefined method `<=>' for :default_icon:Symbol
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `<=>'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `sort'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `build_options_parameters'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:79:in `gravatar_url'
# ./spec/helpers/gravatar_spec.rb:54

2) Nanoc::Toolbox::Helpers::Gravatar.gravatar_url when parameters passed in the options accepts well formed option and render them
Failure/Error: @gravatar.gravatar_url(@email, :size => 45, :rating => 'x').should == @secure_host[false] + '?rating=x&size=45'
NoMethodError:
undefined method `<=>' for :rating:Symbol
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `<=>'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `sort'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `build_options_parameters'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:79:in `gravatar_url'
# ./spec/helpers/gravatar_spec.rb:58

3) Nanoc::Toolbox::Helpers::Gravatar#gravatar_image converts an email to an html tag with options for the gravatar
Failure/Error: @gravatar.gravatar_image(@email, :size => 45, :default_icon => 'monsterid', :rating => 'xss').should == %[]
NoMethodError:
undefined method `<=>' for :default_icon:Symbol
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `<=>'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `sort'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `build_options_parameters'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:79:in `gravatar_url'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:47:in `gravatar_image'
# ./spec/helpers/gravatar_spec.rb:74

4) Nanoc::Toolbox::Helpers::Gravatar#gravatar_image converts an email to an html tag with options for the gravatar and for the img
Failure/Error: @gravatar.gravatar_image(@email, :height => 10, :size => 45, :default_icon => 'monsterid', :rating => 'xss').should == %[]
NoMethodError:
undefined method `<=>' for :default_icon:Symbol
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `<=>'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `sort'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:107:in `build_options_parameters'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:79:in `gravatar_url'
# ./lib/nanoc/toolbox/helpers/gravatar.rb:47:in `gravatar_image'
# ./spec/helpers/gravatar_spec.rb:82
```