rack-cas 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3076f3d20f3e71e2c90c63458d41fc3482eb0fa
|
4
|
+
data.tar.gz: c07eeff7e19dcfba99c703edc5a29b75170d40ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f92192f7bef81d6318b7c5b954ced519cb31cc506da25f6aacaa9b49949400c304981100ebbe208100dfcc5dfe3864e128e7d6d3a3a95b9122f1af92a1990b8d
|
7
|
+
data.tar.gz: 94a9951855d0920c658406bee68236299808f8166e12d6b587e79c183e9dfbdcb8ecb564c61e77616575618113e8e0f868a7784bbbb812c6929c9686bbc9f167
|
@@ -21,6 +21,6 @@ class CasSessionStoreMigrationGenerator < Rails::Generators::Base
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def create_migration_file
|
24
|
-
migration_template 'migration.rb', 'db/migrate/create_rack_cas_sessions'
|
24
|
+
migration_template 'migration.rb', 'db/migrate/create_rack_cas_sessions.rb'
|
25
25
|
end
|
26
|
-
end
|
26
|
+
end
|
@@ -5,7 +5,13 @@ module RackCAS
|
|
5
5
|
include Mongoid::Timestamps
|
6
6
|
|
7
7
|
field :_id, type: String
|
8
|
-
|
8
|
+
if defined? Moped::BSON
|
9
|
+
# Mongoid < 4
|
10
|
+
field :data, type: Moped::BSON::Binary, default: Moped::BSON::Binary.new(:generic, Marshal.dump({}))
|
11
|
+
else
|
12
|
+
# Mongoid 4
|
13
|
+
field :data, type: BSON::Binary, default: BSON::Binary.new(Marshal.dump({}))
|
14
|
+
end
|
9
15
|
field :cas_ticket, type: String
|
10
16
|
end
|
11
17
|
|
@@ -44,17 +50,26 @@ module RackCAS
|
|
44
50
|
|
45
51
|
def destroy_session(env, sid, options)
|
46
52
|
session = Session.where(_id: sid).delete
|
47
|
-
|
53
|
+
|
48
54
|
options[:drop] ? nil : generate_sid
|
49
55
|
end
|
50
56
|
|
51
57
|
def pack(data)
|
52
|
-
Moped::BSON
|
58
|
+
if defined? Moped::BSON
|
59
|
+
Moped::BSON::Binary.new(:generic, Marshal.dump(data))
|
60
|
+
else
|
61
|
+
BSON::Binary.new(Marshal.dump(data))
|
62
|
+
end
|
53
63
|
end
|
54
64
|
|
55
65
|
def unpack(packed)
|
56
66
|
return nil unless packed
|
57
|
-
|
67
|
+
|
68
|
+
if defined? Moped::BSON
|
69
|
+
Marshal.load(StringIO.new(packed.to_s))
|
70
|
+
else
|
71
|
+
Marshal.load(packed.data)
|
72
|
+
end
|
58
73
|
end
|
59
74
|
end
|
60
75
|
end
|
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.9.
|
4
|
+
version: 0.9.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: 2014-
|
11
|
+
date: 2014-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -147,3 +147,4 @@ signing_key:
|
|
147
147
|
specification_version: 4
|
148
148
|
summary: Rack-based CAS client
|
149
149
|
test_files: []
|
150
|
+
has_rdoc:
|