authful 0.5.15 → 0.5.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/authful/api.rb +2 -2
- data/spec/lib/authful/api_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Mzk1MTg5YzRkMzFmZTc0Mjg1NjBhZDE4NDJhZjQyODRhY2EwZDFkNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWNjOGNkMmMyMzM0ODhjNTkxMWM5OTE0MzFkNDFlZDY0NjU3NGRmOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDgxOWE5Y2IyYWRiNjYxOWVjMTkxZDY0Yzg2YzhlZTAyODkzNGIzNWE3NDE3
|
10
|
+
MmU0YzRjZTM1ZDViMzc0MTAyZDY4YmU4NGNhMzBiNWY5MTQzZmY5YThhMzM1
|
11
|
+
YWVlY2E1MjZjMDk1YjE4YjMzZjJlY2FlYzI2MGNjMDU5ZWFmN2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTNiZDlmZDQyZjRjNDFiYjVjYmZlMGFkYjEzMDc4MDIzNzI0NmI1MTUxZjZi
|
14
|
+
NGQzYzI1MzcxY2UwYzM4YzBhZDgyYmJiZTM1NWJhMGMzYzI5ZjhmMDUyYTlh
|
15
|
+
Zjc3MGExYjQxODY1NzNiMmEwYjU2OTE0NTNlMGJmMTZjNWYyYjU=
|
data/lib/authful/api.rb
CHANGED
@@ -19,11 +19,11 @@ module Authful
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def set_phone(token, phone)
|
22
|
-
Authful.send_request(:patch, "/api/users/#{token}",
|
22
|
+
Authful.send_request(:patch, "/api/users/#{token}/phone", phone: phone)["error"] == nil
|
23
23
|
end
|
24
24
|
|
25
25
|
def reset(token, send_sms = false)
|
26
|
-
res = Authful.send_request(:patch, "/api/users/#{token}"
|
26
|
+
res = Authful.send_request(:patch, "/api/users/#{token}/reset")
|
27
27
|
return Authful::Response.new(token: res["token"], qr_code: res["qr_code"], error: res["error"])
|
28
28
|
end
|
29
29
|
|
@@ -67,7 +67,7 @@ describe Authful do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
it "resets secret for user" do
|
70
|
-
FakeWeb.register_uri :patch, "https://my-endpoint.dev/authful/api/users/user-authful-token", {body: {token: "user-authful-token", email: "john.doe@gmail.com", qr_code: "qr-code"}.to_json}
|
70
|
+
FakeWeb.register_uri :patch, "https://my-endpoint.dev/authful/api/users/user-authful-token/reset", {body: {token: "user-authful-token", email: "john.doe@gmail.com", qr_code: "qr-code"}.to_json}
|
71
71
|
|
72
72
|
res = Authful.reset("user-authful-token")
|
73
73
|
res.token.should eq('user-authful-token')
|
@@ -75,7 +75,7 @@ describe Authful do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
it "sets phone number for user" do
|
78
|
-
FakeWeb.register_uri :patch, "https://my-endpoint.dev/authful/api/users/user-authful-token", {body: {
|
78
|
+
FakeWeb.register_uri :patch, "https://my-endpoint.dev/authful/api/users/user-authful-token/phone", {body: {ok: 1}.to_json}
|
79
79
|
|
80
80
|
res = Authful.set_phone("user-authful-token", "12005551212").should eq(true)
|
81
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Wyrosdick
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|