cas_client 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cas_client/errors.rb +3 -0
- data/lib/cas_client/user_api.rb +3 -2
- data/lib/cas_client/version.rb +1 -1
- metadata +4 -4
data/lib/cas_client/errors.rb
CHANGED
data/lib/cas_client/user_api.rb
CHANGED
@@ -140,7 +140,8 @@ module CASClient
|
|
140
140
|
when Net::HTTPNotFound
|
141
141
|
raise CASClient::UUIDNotFound
|
142
142
|
when Net::HTTPForbidden
|
143
|
-
|
143
|
+
response_body = Yajl::Parser.new(:symbolize_keys => true).parse(res.body)
|
144
|
+
case response_body[:errors].first
|
144
145
|
when "Email is required to reset password"
|
145
146
|
raise CASClient::EmailMissing, "Email is required to reset password"
|
146
147
|
when "Email has already been taken"
|
@@ -152,7 +153,7 @@ module CASClient
|
|
152
153
|
when "Password doesn't match confirmation"
|
153
154
|
raise CASClient::PasswordMismatch, "Password and confirmation do not match"
|
154
155
|
else
|
155
|
-
|
156
|
+
raise CASClient::RequestError, response_body.inspect
|
156
157
|
end
|
157
158
|
else
|
158
159
|
res.error!
|
data/lib/cas_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cas_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Moran
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-01 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|