vaulted_billing 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,9 +9,9 @@ module VaultedBilling
9
9
 
10
10
  module ClassMethods
11
11
  def from_querystring(string)
12
- ::Hash[string.split(/&/).
12
+ ::Hash[*(string.split(/&/).
13
13
  collect { |i| i.split(/=/) }.
14
- collect { |e| e.size == 1 ? (e << '') : e }]
14
+ collect { |e| e.size == 1 ? (e << '') : e }.flatten)]
15
15
  end
16
16
  end
17
17
  end
@@ -154,7 +154,7 @@ module VaultedBilling
154
154
  end
155
155
 
156
156
  def after_post(response)
157
- VaultedBilling.logger.debug { "Response code %s (HTTP %d), %s" % [response.message, response.code, response.body.inspect] } if VaultedBilling.logger?
157
+ VaultedBilling.logger.info { "Response code %s (HTTP %d), %s" % [response.message, response.code, response.body.inspect] } if VaultedBilling.logger?
158
158
  response.body = Hash.from_xml(response.body)
159
159
  response.success = response.body[response.body.keys.first]['messages']['resultCode'] == 'Ok'
160
160
  end
@@ -116,7 +116,7 @@ module VaultedBilling
116
116
  end
117
117
 
118
118
  def after_post(response)
119
- VaultedBilling.logger.debug { "Response code %s (HTTP %d), %s" % [response.message, response.code, response.body.inspect] } if VaultedBilling.logger?
119
+ VaultedBilling.logger.info { "Response code %s (HTTP %d), %s" % [response.message, response.code, response.body.inspect] } if VaultedBilling.logger?
120
120
  response.body = Hash.from_querystring(response.body)
121
121
  response.success = response.body['response'] == '1'
122
122
  end
@@ -24,8 +24,8 @@ module VaultedBilling
24
24
  def initialize(http_response)
25
25
  if http_response
26
26
  self.raw_response = http_response
27
- # self.code = http_response.code
28
- # self.message = http_response.message
27
+ self.code = http_response.code
28
+ self.message = http_response.message
29
29
  self.body = http_response.body
30
30
  self.success = ((http_response.code =~ /^2\d{2}/) == 0)
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module VaultedBilling
2
- Version = '0.0.3'
2
+ Version = '0.0.4'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathaniel Bibler
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-26 00:00:00 -04:00
17
+ date: 2010-08-30 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency