cas_client 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ module CASClient
27
27
  end
28
28
 
29
29
  def cas_fetch_user(uuid)
30
- res = fetch("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{uuid}")
30
+ res = fetch("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{CGI.escape(uuid)}")
31
31
  Yajl::Parser.new(:symbolize_keys => true).parse(res.body)
32
32
  rescue CASClient::UUIDNotFound
33
33
  end
@@ -38,7 +38,6 @@ module CASClient
38
38
 
39
39
  def fetch(uri_string, limit = 10)
40
40
  raise StandardError, 'HTTP redirect too deep' if limit == 0
41
- uri_string = CGI.escape(uri_string)
42
41
  url = URI.parse(uri_string)
43
42
  handle_response(make_request(url, Net::HTTP::Get.new(url.path)), limit)
44
43
  end
@@ -102,25 +101,24 @@ module CASClient
102
101
  else
103
102
  _user_identifier = self.send(self.class.cas_map[:uuid])
104
103
  end
105
- uri_string = CGI.escape("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{_user_identifier}")
104
+ uri_string = "#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{CGI.escape(_user_identifier)}"
106
105
  url = URI.parse(uri_string)
107
106
  res = handle_response(make_request(url, Net::HTTP::Put.new(url.path)))
108
107
  Yajl::Parser.new(:symbolize_keys => true).parse(res.body)
109
108
  end
110
109
 
111
110
  def cas_retrieve_attributes
112
- res = fetch("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{self.send(self.class.cas_map[:uuid])}")
111
+ res = fetch("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{CGI.escape(self.send(self.class.cas_map[:uuid]))}")
113
112
  Yajl::Parser.new(:symbolize_keys => true).parse(res.body)
114
113
  end
115
114
 
116
115
  def cas_reset_password
117
- res = fetch("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{self.send(self.class.cas_map[:uuid])}/reset_password")
116
+ res = fetch("#{::CAS_SERVER["internal_cas_domain"]}/api/users/#{CGI.escape(self.send(self.class.cas_map[:uuid]))}/reset_password")
118
117
  res.body
119
118
  end
120
119
 
121
120
  def fetch(uri_string, limit = 10)
122
121
  raise StandardError, 'HTTP redirect too deep' if limit == 0
123
- uri_string = CGI.escape(uri_string)
124
122
  url = URI.parse(uri_string)
125
123
  handle_response(make_request(url, Net::HTTP::Get.new(url.path)), limit)
126
124
  end
@@ -1,3 +1,3 @@
1
1
  module CASClient
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Moran