mongo_sessions 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -20,6 +20,12 @@ module MongoSessions
20
20
 
21
21
  super
22
22
  end
23
+
24
+ def destroy(env)
25
+ if sid = current_session_id(env)
26
+ collection.remove({'_id' => sid})
27
+ end
28
+ end
23
29
 
24
30
  private
25
31
  def get_session(env, sid)
@@ -30,7 +36,7 @@ module MongoSessions
30
36
 
31
37
  def set_session(env, sid, session_data, options = {})
32
38
  sid ||= generate_sid
33
- collection.update({'_id' => sid}, {'_id' => sid, 't' => Time.now, 's' => pack(session_data)}, {:upsert => true})
39
+ collection.update({'_id' => sid}, {'_id' => sid, 't' => Time.now, 's' => pack(session_data), 'user_id' => session_data['user_id']}, {:upsert => true})
34
40
  sid
35
41
  end
36
42
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongo_sessions}
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mathias Biilmann"]
metadata CHANGED
@@ -1,34 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mongo_sessions
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 3
9
- - 3
10
- version: 0.3.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.4
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Mathias Biilmann
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-06-16 00:00:00 +02:00
19
- default_executable:
12
+ date: 2010-06-16 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
14
  description: Uses the ruby Mongo driver to store sessions in a MongoDB collection
23
15
  email: info@mathias-biilmann.net
24
16
  executables: []
25
-
26
17
  extensions: []
27
-
28
- extra_rdoc_files:
18
+ extra_rdoc_files:
29
19
  - LICENSE
30
20
  - README.rdoc
31
- files:
21
+ files:
32
22
  - .document
33
23
  - .gitignore
34
24
  - LICENSE
@@ -41,40 +31,31 @@ files:
41
31
  - mongo_sessions.gemspec
42
32
  - test/helper.rb
43
33
  - test/test_mongo_store.rb
44
- has_rdoc: true
45
34
  homepage: http://github.com/biilmann/mongo_sessions
46
35
  licenses: []
47
-
48
36
  post_install_message:
49
- rdoc_options:
37
+ rdoc_options:
50
38
  - --charset=UTF-8
51
- require_paths:
39
+ require_paths:
52
40
  - lib
53
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
54
42
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
62
- required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
48
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- hash: 3
68
- segments:
69
- - 0
70
- version: "0"
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
71
53
  requirements: []
72
-
73
54
  rubyforge_project:
74
- rubygems_version: 1.3.7
55
+ rubygems_version: 1.8.4
75
56
  signing_key:
76
57
  specification_version: 3
77
58
  summary: MongoDB Session store for Rails and Rack
78
- test_files:
59
+ test_files:
79
60
  - test/helper.rb
80
61
  - test/test_mongo_store.rb