dwolla-ruby 2.4.1 → 2.4.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2NiYzA1ZmVmMzllNmZkMzIwOGZiM2ZlM2ZhODUxZWE4YjEzY2ZkZQ==
4
+ MDFlZTc3ODI4YmRhYmNlODZmMTE3YzI5Y2RkYzMzY2IxNzRmYjc4ZQ==
5
5
  data.tar.gz: !binary |-
6
- NjhjMWY4ZGRkMmQxNmQ0NDFkOTY5M2NmODIyZGNmZWNiMzY2OTk4ZQ==
6
+ YmIyNzNlOTI0YjI5Y2E1MmQ3NjUwNTU0OTY3OTE0ODllYjIyYjc0Ng==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- M2E0ZjFlZTc2NTczNWJmNTBmMDZiMDcwMTgwMmZlZDY3YzlkMzI2YjNkYWJi
10
- YjI0ZDU4MDVmYmZmZTdhZDc4NGIxMTc2ZWM4YWZkMWQxODY4YTdhM2NhMjIw
11
- MzZmNGNlZDM3YmFhOTgxNjc5NGY0ZmVkZjZmNmJlMTZlNjhlZTQ=
9
+ OGU5YjQ0NmZhZTlmZTBkOTlhYTIwOTU3YmI5MmIxYzFlODlkOWQzYjhlNjll
10
+ OTcyNGQwYTVlMGFhY2MzYjAwMWMzODQyMWFhMDNmNDliN2M5YmE0OGYyY2Zl
11
+ NDU3ZGVhNTJhOTk0YTliM2M0MzM0OGQ2NjRjNDZmNjQ5ZjlhMjI=
12
12
  data.tar.gz: !binary |-
13
- ZWVjNWMxMTQxMTRiNGIyNjQ5MGQ3NDliYmE4OWM0YjA2OTZlMjc5YjY3ZDgw
14
- MjZkZTAyYjNmMTFmOTZiMTYwYThiYTMyYTBiYzczZTJkMTVkYTc3OGRmZjUy
15
- NzE4NTkyYTgwNjI4ZGFkYWNmNTlmN2EyN2UwOTNjMWJkMzY1MDc=
13
+ ZGUzMjNlZTRjMjI2YWQ2MmJiYjAwN2FkNTAzYmY2Zjg0ZmM2Mjc1NmU1YzNj
14
+ ODU3ODhmMzNlZTFjMjQ1MzBkNTNlNDllZTQ0YmU4NDk3MmFhMmRlMzNkNTkx
15
+ YzBlYWVkMWRlZWEzZWE4MTFkZTA1MTlkNjQyOTA1Zjk5MWExYzQ=
data/README.md CHANGED
@@ -32,6 +32,10 @@ This repo includes various usage examples, including:
32
32
 
33
33
  ## Changelog
34
34
 
35
+ 2.4.2
36
+
37
+ * Fix OAuth token override
38
+
35
39
  2.4.1
36
40
 
37
41
  * Show raw response on debug mode
data/lib/dwolla.rb CHANGED
@@ -109,19 +109,21 @@ module Dwolla
109
109
  end
110
110
 
111
111
  def self.request(method, url, params={}, headers={}, oauth=true, parse_response=true, custom_url=false)
112
- # if oauth is nil, assume default
113
- if oauth.nil?
114
- oauth = true
115
- elsif not oauth.is_a?(TrueClass)
116
- params[:oauth_token] = oauth
117
- end
112
+ # if oauth is nil, assume default [true]
113
+ oauth = true if oauth.nil?
118
114
 
119
115
  # figure out which auth to use
120
116
  if oauth and not params[:oauth_token]
121
- raise AuthenticationError.new('No OAuth Token Provided.') unless token
122
- params = {
123
- :oauth_token => token
124
- }.merge(params)
117
+ if not oauth.is_a?(TrueClass) # was token passed in the oauth param?
118
+ params = {
119
+ :oauth_token => oauth
120
+ }.merge(params)
121
+ else
122
+ raise AuthenticationError.new('No OAuth Token Provided.') unless token
123
+ params = {
124
+ :oauth_token => token
125
+ }.merge(params)
126
+ end
125
127
  elsif oauth and params[:oauth_token]
126
128
  raise AuthenticationError.new('No OAuth Token Provided.') unless params[:oauth_token]
127
129
  else not oauth
@@ -1,3 +1,3 @@
1
1
  module Dwolla
2
- VERSION = "2.4.1"
2
+ VERSION = "2.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwolla-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Schonfeld