change version + bug fix with the webservice module

This commit is contained in:
dinedine 2011-01-04 12:49:14 +01:00
parent 5519ca8396
commit 8a3151cf58
3 changed files with 5 additions and 5 deletions

View File

@ -20,10 +20,10 @@ module Locomotive
response = self.get(path, options)
if response.code == 200
if response.respond_to?(:each)
response.collect(&:underscore_keys)
if response.respond_to?(:underscore_keys)
response.underscore_keys
else
response.try(:underscore_keys)
response.collect(&:underscore_keys)
end
else
nil

View File

@ -1,3 +1,3 @@
module Locomotive #:nodoc
VERSION = "1.0.0.0beta"
VERSION = "1.0.0.beta"
end

View File

@ -5,7 +5,7 @@ describe Locomotive::Httparty::Webservice do
context '#consuming' do
before(:each) do
@response = mock('response', :code => 200, :underscore_keys => [])
@response = mock('response', :code => 200, :underscore_keys => {})
end
it 'sets the base uri from a simple url' do