dwolla-ruby 2.6.0 → 2.6.1
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.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/dwolla.rb +1 -1
- data/lib/dwolla/oauth.rb +2 -2
- data/lib/dwolla/offsite_gateway.rb +1 -1
- data/lib/dwolla/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14d533bc256b6023f513ab20ca894ce2ad0d0e7d
|
4
|
+
data.tar.gz: f4b6625811d35cb7abf8fe37293ac132720541b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
5
|
+
2.6.1
|
6
6
|
|
7
7
|
[](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`
|
data/lib/dwolla.rb
CHANGED
@@ -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
|
data/lib/dwolla/oauth.rb
CHANGED
@@ -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
|
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
|
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
|
data/lib/dwolla/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|