openid_store_mongoid 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -48,11 +48,18 @@ module OpenID
48
48
 
49
49
  def cleanup_nonces
50
50
  now = Time.now.to_i
51
- OpenIDStoreMongoid::Nonce.destroy_all(:conditions => { :timestamp.gt => (now + OpenID::Nonce.skew), :timestamp.lt => (now - OpenID::Nonce.skew) })
51
+ count = 0
52
+ # Some weird bug with .destroy_all(:conditions => {:timestamp.gt => (now + OpenID::Nonce.skew), :timestamp.lt => (now - OpenID::Nonce.skew)})
53
+ OpenIDStoreMongoid::Nonce.where(:timestamp.gt => (now + OpenID::Nonce.skew)).and(:timestamp.lt => (now - OpenID::Nonce.skew)).each do |nonce|
54
+ nonce.destroy
55
+ count += 1
56
+ end
57
+ count
52
58
  end
53
59
 
54
60
  def cleanup_associations
55
61
  count = 0
62
+ # Not sure how to do this in Mongo, maybe someone can show me?
56
63
  OpenIDStoreMongoid::Association.all(:conditions => { :issued.gt => 0 }).each do |association|
57
64
  if association.lifetime + association.issued > Time.now.to_i
58
65
  association.destroy
@@ -1,3 +1,3 @@
1
1
  module OpenIDStoreMongoid
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openid_store_mongoid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dylan Egan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-05 00:00:00 -07:00
18
+ date: 2010-06-13 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -80,14 +80,15 @@ dependencies:
80
80
  version_requirements: &id004 !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
- - - ~>
83
+ - - "="
84
84
  - !ruby/object:Gem::Version
85
- hash: 51
85
+ hash: 299253606
86
86
  segments:
87
- - 1
88
- - 9
87
+ - 2
88
+ - 0
89
89
  - 0
90
- version: 1.9.0
90
+ - beta6
91
+ version: 2.0.0.beta6
91
92
  requirement: *id004
92
93
  description: |-
93
94
  Why does a squirrel swim on its back?