mongoid_sessions 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 1.0.1
@@ -10,17 +10,19 @@ module Mongoid
10
10
  field :session_id
11
11
  field :raw_data
12
12
 
13
+ store_in :collection => :sessions, :database => 'mongoid_session_store'
14
+
13
15
  def self.find_by_session_id(session_id)
14
16
  where(:session_id => session_id).last
15
17
  end
16
18
 
17
19
  def data
18
- self.raw_data.present? && Marshal.load(ActiveSupport::Base64.decode64(self.raw_data)) || {}
20
+ self.raw_data.present? && Marshal.load(Base64.decode64(self.raw_data)) || {}
19
21
  end
20
22
 
21
23
  def data=(raw)
22
24
  raw ||= {}
23
- self.raw_data = ActiveSupport::Base64.encode64(Marshal.dump(raw))
25
+ self.raw_data = Base64.encode64(Marshal.dump(raw))
24
26
  end
25
27
 
26
28
  def loaded?
@@ -1,3 +1,3 @@
1
1
  module MongoidSessions
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -1,2 +1,3 @@
1
1
  require 'mongoid/session_store/session'
2
- require 'action_dispatch/session/mongoid_session_store'
2
+ require 'action_dispatch/session/mongoid_session_store'
3
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_sessions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: