rack-cas 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +1 -0
- data/lib/rack-cas/session_store/active_record.rb +6 -2
- data/lib/rack-cas/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: 1cf9f06c6db0201c3d5bcadb8158c390622630cf
|
4
|
+
data.tar.gz: 1fc8eb9bbf210d5de67d3e68d4b4f99a0f2118ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253fa6cc882ad0f229f5ae470e422111949bd8255490c9db21f24a491df6d8f234915309b0fe59057ec727e3a15d9759d44bbcfe14455b3cbc4db026536d84f5
|
7
|
+
data.tar.gz: 1741c9fe41dc735907fc1a5483687302a9cee328c3787b483e440720d5f5c07f54c9a86589d4e9a2d10a6da6351d1faf1788d09f89da182156590f593f4a77e8
|
data/README.markdown
CHANGED
@@ -30,7 +30,11 @@ module RackCAS
|
|
30
30
|
def set_session(env, sid, session_data, options)
|
31
31
|
cas_ticket = (session_data['cas']['ticket'] unless session_data['cas'].nil?)
|
32
32
|
|
33
|
-
session =
|
33
|
+
session = if ActiveRecord.version >= Gem::Version.new('4.0.0')
|
34
|
+
Session.where(session_id: sid).first_or_initialize
|
35
|
+
else
|
36
|
+
Session.find_or_initialize_by_session_id(sid)
|
37
|
+
end
|
34
38
|
success = session.update_attributes(data: pack(session_data), cas_ticket: cas_ticket)
|
35
39
|
|
36
40
|
success ? session.session_id : false
|
@@ -38,7 +42,7 @@ module RackCAS
|
|
38
42
|
|
39
43
|
def destroy_session(env, sid, options)
|
40
44
|
session = Session.where(session_id: sid).delete_all
|
41
|
-
|
45
|
+
|
42
46
|
options[:drop] ? nil : generate_sid
|
43
47
|
end
|
44
48
|
|
data/lib/rack-cas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-cas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|