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: be59f7030ccb7a62223fbddaa9529f50765ba0b0
4
- data.tar.gz: 8e1a4ea3773a8b7306f328a5406a61c01404812d
3
+ metadata.gz: d3076f3d20f3e71e2c90c63458d41fc3482eb0fa
4
+ data.tar.gz: c07eeff7e19dcfba99c703edc5a29b75170d40ed
5
5
  SHA512:
6
- metadata.gz: 78f0a1a537f74cf2b9af832e8fa5262b8f9738a82b2d2d556f720f151cfb1bb61612d03bca63240e77ce21715e517c072cd632d60266fa4a9a7ee79c1c4722de
7
- data.tar.gz: bb51611875bb791f5589b3ea2f0277afb9ac1d65ea3ff2f417b9e72fe9d3289b04184155c7b0e0ca7c92b9ac7b2334a5acb2d842f68bbb7317606ce4a057fce2
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
- field :data, type: Moped::BSON::Binary, :default => Moped::BSON::Binary.new(:generic,Marshal.dump({}))
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::Binary.new(:generic,Marshal.dump(data))
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
- Marshal.load(StringIO.new(packed.to_s))
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
@@ -1,3 +1,3 @@
1
1
  module RackCAS
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
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.0
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-03-12 00:00:00.000000000 Z
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: