escobar 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/escobar/client.rb +1 -0
- data/lib/escobar/heroku/client.rb +4 -1
- data/lib/escobar/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: 3f24c13a04bc730c447ff8984760ec43d9b1ced6
|
4
|
+
data.tar.gz: fe2bf88e8beaeebf544c7f1c487d8068c734485e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70ca836c946229e2a1e0f6665bb0402264035fbe27488b9cdc98ef0fc45d8092bc3c90637d6c9680fd6874a221d07e480ddf2d3d8156e2371637c766984878e3
|
7
|
+
data.tar.gz: 0f8777f8c6aab0bb64f1b2f6ea175ae6cb6857473e51a235e592a2137d680f4bb487d87587f77dff8008ffd612fdc307f80054ef23f1f66cb54b7475d1108630
|
data/lib/escobar/client.rb
CHANGED
@@ -60,7 +60,7 @@ module Escobar
|
|
60
60
|
request.url path
|
61
61
|
request_defaults(request)
|
62
62
|
if second_factor
|
63
|
-
request.headers["Heroku-Two-Factor-Code"] = second_factor
|
63
|
+
request.headers["Heroku-Two-Factor-Code"] = second_factor.to_s
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -83,6 +83,9 @@ module Escobar
|
|
83
83
|
def raise_on_status(resp)
|
84
84
|
case resp.status
|
85
85
|
when 401
|
86
|
+
body = JSON.parse(resp.body)
|
87
|
+
raise Escobar::Client::Error::SecondFactor.from_response(resp) \
|
88
|
+
if body["id"] == "two_factor"
|
86
89
|
raise Escobar::Client::Error::Unauthorized.from_response(resp)
|
87
90
|
end
|
88
91
|
end
|
data/lib/escobar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escobar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Donohoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|