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)
|
response = self.get(path, options)
|
||||||
|
|
||||||
if response.code == 200
|
if response.code == 200
|
||||||
if response.respond_to?(:each)
|
if response.respond_to?(:underscore_keys)
|
||||||
response.collect(&:underscore_keys)
|
response.underscore_keys
|
||||||
else
|
else
|
||||||
response.try(:underscore_keys)
|
response.collect(&:underscore_keys)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module Locomotive #:nodoc
|
module Locomotive #:nodoc
|
||||||
VERSION = "1.0.0.0beta"
|
VERSION = "1.0.0.beta"
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe Locomotive::Httparty::Webservice do
|
||||||
context '#consuming' do
|
context '#consuming' do
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
@response = mock('response', :code => 200, :underscore_keys => [])
|
@response = mock('response', :code => 200, :underscore_keys => {})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets the base uri from a simple url' do
|
it 'sets the base uri from a simple url' do
|
||||||
|
|
Loading…
Reference in New Issue