dwolla-ruby 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fa2436e7ea681ce8fea9abe309bccee237536ea
4
- data.tar.gz: c398209cf8011fc35adacf92c7cb69d1b5746217
3
+ metadata.gz: 14d533bc256b6023f513ab20ca894ce2ad0d0e7d
4
+ data.tar.gz: f4b6625811d35cb7abf8fe37293ac132720541b7
5
5
  SHA512:
6
- metadata.gz: bd72ed9f135dec234bc41e405bed7cf0ff47a09e1aa48612d0abdb3eb8ea77b678512865be123af6740a0bd51e16c7cfc1a1751c247d28d98ce483543c6dad94
7
- data.tar.gz: 4513c77af15a22339576046eb1ea7d6346f0fba9f65a97d4e9ea488f879e55b39106be2322b931b447252a8008e43f2ee5b37fa20c694014474818ef70e6a08b
6
+ metadata.gz: 651068aedd00095349efd91a26036c1787b75104802e3885100527e4a237c6b4a492ff1cb1568645a286e311c8d0db02dadf3ac88dbb6aaba5c1b104701828a6
7
+ data.tar.gz: 5860ce246cd7f430ffc214f83bf26bbabdc4b9e7a46d5e7c61d81940e7d6f41f2de95bc8c66e6667425ece56b03ea1db5cf95406a927c951c1b414f7d0f0c4b2
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  Official Ruby wrapper for Dwolla's API
3
3
 
4
4
  ## Version
5
- 2.6.0
5
+ 2.6.1
6
6
 
7
7
  [![Build Status](https://travis-ci.org/Dwolla/dwolla-ruby.svg?branch=master)](https://travis-ci.org/Dwolla/dwolla-ruby)
8
8
 
@@ -33,6 +33,9 @@ This repo includes various usage examples, including:
33
33
 
34
34
  ## Changelog
35
35
 
36
+ 2.6.1
37
+ * Minor refactoring, fixed bug that would cause crashes in certain Ruby version with checking if keys exist in hashes.
38
+
36
39
  2.6.0
37
40
 
38
41
  * **BREAKING CHANGE**: OAuth access tokens now expire. Instead of a string, `Dwolla::OAuth::get_token` now returns a hash with an `access_token`, `refresh_token`, and expiration times in seconds for both. In order to refresh authorization, use `Dwolla::OAuth.refresh_auth`
@@ -272,7 +272,7 @@ module Dwolla
272
272
  end
273
273
 
274
274
  def self.parse_response(resp)
275
- raise APIError.new(resp['Message']) unless resp['Success']
275
+ raise APIError.new(resp['Message']) unless resp.has_key?('Success') and resp['Success'] == true
276
276
 
277
277
  return resp['Response']
278
278
  end
@@ -42,7 +42,7 @@ module Dwolla
42
42
  # TODO: Revisit this to make it more unit test friendly, fails ['error_description'] due to
43
43
  # key not existing, same on L58
44
44
  return "No data received." unless resp.is_a?(Hash)
45
- raise APIError.new(resp['error_description']) unless resp['access_token'] and resp['refresh_token']
45
+ raise APIError.new(resp['error_description']) unless resp.has_key?('access_token') and resp.has_key?('refresh_token')
46
46
 
47
47
  return resp
48
48
  end
@@ -58,7 +58,7 @@ module Dwolla
58
58
  resp = Dwolla.request(:get, token_url, params, {}, false, false, true)
59
59
 
60
60
  return "No data received." unless resp.is_a?(Hash)
61
- raise APIError.new(resp['error_description']) unless resp.has_key['access_token'] and resp['refresh_token']
61
+ raise APIError.new(resp['error_description']) unless resp.has_key?('access_token') and resp.has_key?('refresh_token')
62
62
 
63
63
  return resp
64
64
  end
@@ -87,7 +87,7 @@ module Dwolla
87
87
  resp = Dwolla.request(:post, request_url, params, {}, false, false, true)
88
88
 
89
89
  return "No data received." unless resp.is_a?(Hash)
90
- raise APIError.new(resp['Message']) unless resp['Result'] == 'Success'
90
+ raise APIError.new(resp['Message']) unless resp.has_key?('Result') and resp['Result'] == 'Success'
91
91
 
92
92
  return checkout_url + resp['CheckoutId']
93
93
  end
@@ -1,3 +1,3 @@
1
1
  module Dwolla
2
- VERSION = "2.6.0"
2
+ VERSION = "2.6.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwolla-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Schonfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-06 00:00:00.000000000 Z
11
+ date: 2014-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client