dwolla_v2 0.1.0 → 0.1.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: 12cdebfad904523e346289a3e5dad7372c765a4a
4
- data.tar.gz: 9238497f4896c30556a6e276eef2b7174e6d0455
3
+ metadata.gz: 90224d12fc784f80e84f67ddd69e4e3455b461f0
4
+ data.tar.gz: 36373860f61fe49874233842df9e508f495c7053
5
5
  SHA512:
6
- metadata.gz: 69d58601f8b95ecbcb187f3cd85f3a4e7fb7ac03f4abde266adbb868055c801cc04725de4d3101ada58de9d536028de8a2a44936d09c70ffdac84540cd059725
7
- data.tar.gz: 400ec01a2cc61f0496ba3f307aa62280a9172a6652b00392de2f7e5ee40242a22ee7bcc7e8153972556980d0af9cf4c5092e7056bb0a29b7d8a8ef217c61c3f4
6
+ metadata.gz: 2e09500f5d74772db3f3c4b2f3accd698510ca650c5aedb02b8227d0337e8353f2236f524012fd3a23e90528610b9c5e33ac81fbb3a348d9a7ca6ff6bae8646a
7
+ data.tar.gz: e79bcc5f12c33735d6fb6317b6500dcc9c58d30a95e8d86f8a9f7e5da5051a717defa8d6e03f28be7a3836942d3018e654925e76543db1751cfe80bf01dc6e84
data/README.md CHANGED
@@ -162,3 +162,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Dwolla
162
162
  ## License
163
163
 
164
164
  The gem is available as open source under the terms of the [MIT License](https://github.com/Dwolla/dwolla-v2-ruby).
165
+
166
+ ## Changelog
167
+
168
+ - **0.1.1** - Handle 500 errors with HTML response bodies when requesting tokens
@@ -46,7 +46,7 @@ module DwollaV2
46
46
  def self.request_token client, params
47
47
  res = client.conn.post client.token_url, params
48
48
  res_body = Util.deep_symbolize_keys res.body
49
- if res_body[:error]
49
+ if res.status >= 400 || (res_body.is_a?(Hash) && res_body.has_key?(:error))
50
50
  Error.raise! res_body
51
51
  else
52
52
  token = Token.new client, res_body
@@ -1,3 +1,3 @@
1
1
  module DwollaV2
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwolla_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ausman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler