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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWEwM2I0ZmE3ZGUzNGI4OGM4MTAxMTAwZDRlMTAxMWNkMTY5NDQ4Ng==
4
+ Mzk1MTg5YzRkMzFmZTc0Mjg1NjBhZDE4NDJhZjQyODRhY2EwZDFkNA==
5
5
  data.tar.gz: !binary |-
6
- MWEzMWMxYWFkZjczYWZkMmMzNzUzZDI5MjVlNjE3NWFlMDQ0NjhlOA==
6
+ YWNjOGNkMmMyMzM0ODhjNTkxMWM5OTE0MzFkNDFlZDY0NjU3NGRmOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWI1OWNiNzY3YWQxMjI4YmE5Mzk1ZmEzNmJhYWI5MTIxYmI0MjNmZTI1YWRm
10
- OTZjYTU4MDIyODYyYjAwM2E4OWZlOTFlNjdjOTZiYzg5Mjk2ZDk4NTZkMzlm
11
- ZTA0NWI4MzljNzYxNTJlMmFhZDI4M2RjOGIzZTg2NzUyNDU0Nzc=
9
+ ZDgxOWE5Y2IyYWRiNjYxOWVjMTkxZDY0Yzg2YzhlZTAyODkzNGIzNWE3NDE3
10
+ MmU0YzRjZTM1ZDViMzc0MTAyZDY4YmU4NGNhMzBiNWY5MTQzZmY5YThhMzM1
11
+ YWVlY2E1MjZjMDk1YjE4YjMzZjJlY2FlYzI2MGNjMDU5ZWFmN2I=
12
12
  data.tar.gz: !binary |-
13
- ZGExYmVmOTU0ZDY3OTBiZWE0NGEzOTc3YTE5NDQxZTM4ZGY2OGNlMzYxNjk2
14
- OTIyYWUyZjFiNmRlZjVmZjlhMjk2Mzg4ZDY0YjQ5ZDBhY2Q5NGY3NTcxYTAz
15
- MDgxYmM1MjY3OGFlNGE4NWEyNjJlMDdmOGQ0ZDMwOTdlY2Y1NGY=
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}", send_sms: true, phone: phone)["error"] == nil
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}", send_sms: send_sms, reset: true)
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: {token: "user-authful-token", email: "john.doe@gmail.com", qr_code: "qr-code"}.to_json}
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.15
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 00:00:00.000000000 Z
12
+ date: 2014-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client