ey_api_hmac 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ey_api_hmac (0.0.14.pre)
4
+ ey_api_hmac (0.0.15.pre)
5
5
  json
6
6
  rack-client
7
7
 
data/lib/ey_api_hmac.rb CHANGED
@@ -22,7 +22,11 @@ module EY
22
22
  parts << expect["CONTENT_TYPE"]
23
23
  parts << generated_md5(env)
24
24
  parts << expect["HTTP_DATE"]
25
- parts << URI.parse(expect["REQUEST_URI"]).path
25
+ if env["REQUEST_URI"]
26
+ parts << URI.parse(env["REQUEST_URI"]).path
27
+ else
28
+ parts << expect["PATH_INFO"]
29
+ end
26
30
  parts.join("\n")
27
31
  end
28
32
 
@@ -64,7 +64,9 @@ module EY
64
64
  ApiHMAC.sign!(env, @auth_id, @auth_key)
65
65
  tuple = @app.call(env)
66
66
  if tuple.first.to_i == 401
67
- raise AuthFailure, "HMAC Authentication Failed: #{tuple.last}"
67
+ response_body = ""
68
+ tuple.last.each{ |v| response_body << v }
69
+ raise AuthFailure, "HMAC Authentication Failed: #{response_body}"
68
70
  end
69
71
  tuple
70
72
  end
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module ApiHMAC
3
- VERSION = "0.0.14"
3
+ VERSION = "0.0.15"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_api_hmac
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 14
10
- version: 0.0.14
9
+ - 15
10
+ version: 0.0.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jacob Burkhart & Thorben Schr\xC3\xB6der & David Calavera & others"