cloudsponge 0.9.4 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cloudsponge.rb CHANGED
@@ -5,5 +5,5 @@ require File.expand_path(File.dirname(__FILE__) + '/cloudsponge/cs_exception')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/cloudsponge/utility')
6
6
 
7
7
  module Cloudsponge
8
- VERSION = '0.9.4'
8
+ VERSION = '0.9.6'
9
9
  end
@@ -28,11 +28,11 @@ module Cloudsponge
28
28
  end
29
29
 
30
30
  def email
31
- get_first_value(self.emails)
31
+ Contact.get_first_value(self.emails)
32
32
  end
33
33
 
34
34
  def phone
35
- get_first_value(self.phones)
35
+ Contact.get_first_value(self.phones)
36
36
  end
37
37
 
38
38
  def add_array_value(collection, value, type = nil)
@@ -31,7 +31,7 @@ module Cloudsponge
31
31
  def self.decode_response(response)
32
32
  if response.code_type == Net::HTTPOK
33
33
  # decode the response into an asscoiative array
34
- resp = decode_response(response.body, 'json')
34
+ resp = decode_response_body(response.body, 'json')
35
35
  raise CsException.new(resp['error']['message'], response['code']) if resp['error']
36
36
  else
37
37
  raise CsException.new(response.body, response.code)
@@ -39,7 +39,7 @@ module Cloudsponge
39
39
  resp
40
40
  end
41
41
 
42
- def self.decode_response(response, format = 'json')
42
+ def self.decode_response_body(response, format = 'json')
43
43
  # TODO: account for systems that use a different JSON parser. Look for json gem...
44
44
  # TODO: implement alternate formats: XML
45
45
  object = {'error' => {'message' => 'failed to parse data.', 'code' => 1}}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 4
9
- version: 0.9.4
8
+ - 6
9
+ version: 0.9.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Graeme Rouse
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-03 00:00:00 -07:00
17
+ date: 2010-05-04 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20