heroku/databasedotcom — pull request #40 by jfernandez (2011-12-05 19:21:41+00:00)
Title: Prevent calling strftime on a String value when trying to coerce a date field

In 1.2.6, let's say you try to do this:

opportunity = Opportunity.new
opportunity["CloseDate"] = "2011-01-01"
opportunity.save

This will cause the following error:

undefined method `strftime' for "2011-01-01":String (NoMethodError)
/data/hudson/jobs/RPM_External_Tests/workspace/vendor/bundle/ruby/1.8/gems/databasedotcom-1.2.6/lib/databasedotcom/client.rb:503:in `coerced_json'
/data/hudson/jobs/RPM_External_Tests/workspace/vendor/bundle/ruby/1.8/gems/databasedotcom-1.2.6/lib/databasedotcom/client.rb:496:in `each'
/data/hudson/jobs/RPM_External_Tests/workspace/vendor/bundle/ruby/1.8/gems/databasedotcom-1.2.6/lib/databasedotcom/client.rb:496:in `coerced_json'
/data/hudson/jobs/RPM_External_Tests/workspace/vendor/bundle/ruby/1.8/gems/databasedotcom-1.2.6/lib/databasedotcom/client.rb:233:in `create'
/data/hudson/jobs/RPM_External_Tests/workspace/vendor/bundle/ruby/1.8/gems/databasedotcom-1.2.6/lib/databasedotcom/sobject/sobject.rb:98:in `save'

This change will prevent us from tying to coerce a String using strftime. I understand that this only happens when you don't enter a Date object as a value, so feel free to pass on pull request :)