change version + bug fix with the webservice module
This commit is contained in:
parent
5519ca8396
commit
8a3151cf58
@ -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
|
||||
|
@ -1,3 +1,3 @@
|
||||
module Locomotive #:nodoc
|
||||
VERSION = "1.0.0.0beta"
|
||||
VERSION = "1.0.0.beta"
|
||||
end
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user