mongoid_store 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ Gemfile.lock
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = MongoidStore
2
2
 
3
- ActiveSupport Mongoid 3 Cache store.
3
+ ActiveSupport Mongoid 3 Cache store, loosly based on Bin by John Nunemaker
4
4
 
5
5
  == Supports
6
6
 
@@ -29,12 +29,12 @@ module ActiveSupport
29
29
  protected
30
30
 
31
31
  def write_entry(key, entry, options)
32
- collection.find(_id: key).upsert(_id: key, value: entry.value, expires_at: entry.expires_at.to_i, created_at: Time.now.utc.to_i)
32
+ collection.find(_id: key).upsert(_id: key, value: entry.raw_value, expires_at: entry.expires_at.to_i, created_at: Time.now.utc.to_i)
33
33
  end
34
34
 
35
35
  def read_entry(key, options = nil)
36
36
  document = collection.find(_id: key, expires_at: {'$gt' => Time.now.utc.to_i}).first
37
- ActiveSupport::Cache::Entry.new(document['value']) if document
37
+ ActiveSupport::Cache::Entry.create(document['value'], document['created_at']) if document
38
38
  end
39
39
 
40
40
  def delete_entry(key, options = nil)
@@ -1,3 +1,3 @@
1
1
  module MongoidStore
2
- Version = '0.0.1'
3
- end
2
+ Version = '0.1.0'
3
+ end
metadata CHANGED
@@ -1,48 +1,48 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Andre Meij
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
16
+ version_requirements: !ruby/object:Gem::Requirement
18
17
  requirements:
19
18
  - - ~>
20
19
  - !ruby/object:Gem::Version
21
20
  version: '3.0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
21
  none: false
22
+ requirement: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.0'
27
+ none: false
28
+ prerelease: false
29
+ type: :runtime
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: activesupport
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
32
+ version_requirements: !ruby/object:Gem::Requirement
34
33
  requirements:
35
34
  - - ~>
36
35
  - !ruby/object:Gem::Version
37
36
  version: '3.2'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
37
  none: false
38
+ requirement: !ruby/object:Gem::Requirement
42
39
  requirements:
43
40
  - - ~>
44
41
  - !ruby/object:Gem::Version
45
42
  version: '3.2'
43
+ none: false
44
+ prerelease: false
45
+ type: :runtime
46
46
  description: ActiveSupport Mongoid 3 Cache store.
47
47
  email:
48
48
  - andre@socialreferral.com
@@ -50,14 +50,11 @@ executables: []
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
- - .DS_Store
53
+ - .gitignore
54
54
  - Gemfile
55
- - Gemfile.lock
56
55
  - LICENSE
57
56
  - README.rdoc
58
57
  - Rakefile
59
- - lib/.DS_Store
60
- - lib/active_support/.DS_Store
61
58
  - lib/active_support/cache/mongoid_store.rb
62
59
  - lib/mongoid_store.rb
63
60
  - lib/mongoid_store/version.rb
@@ -68,27 +65,34 @@ files:
68
65
  - spec/spec.opts
69
66
  homepage: http://github.com/socialreferral/mongoid_store
70
67
  licenses: []
71
- post_install_message:
68
+ post_install_message:
72
69
  rdoc_options: []
73
70
  require_paths:
74
71
  - lib
75
72
  required_ruby_version: !ruby/object:Gem::Requirement
76
- none: false
77
73
  requirements:
78
74
  - - ! '>='
79
75
  - !ruby/object:Gem::Version
80
- version: '0'
81
- required_rubygems_version: !ruby/object:Gem::Requirement
76
+ segments:
77
+ - 0
78
+ version: !binary |-
79
+ MA==
80
+ hash: 2
82
81
  none: false
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ! '>='
85
85
  - !ruby/object:Gem::Version
86
- version: '0'
86
+ segments:
87
+ - 0
88
+ version: !binary |-
89
+ MA==
90
+ hash: 2
91
+ none: false
87
92
  requirements: []
88
- rubyforge_project:
89
- rubygems_version: 1.8.23
90
- signing_key:
93
+ rubyforge_project:
94
+ rubygems_version: 1.8.24
95
+ signing_key:
91
96
  specification_version: 3
92
97
  summary: ActiveSupport Mongoid 3 Cache store.
93
98
  test_files: []
94
- has_rdoc:
data/.DS_Store DELETED
Binary file
data/Gemfile.lock DELETED
@@ -1,46 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- mongoid_store (0.0.1)
5
- activesupport (~> 3.2)
6
- mongoid (~> 3.0)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- activemodel (3.2.8)
12
- activesupport (= 3.2.8)
13
- builder (~> 3.0.0)
14
- activesupport (3.2.8)
15
- i18n (~> 0.6)
16
- multi_json (~> 1.0)
17
- builder (3.0.4)
18
- diff-lcs (1.1.3)
19
- i18n (0.6.1)
20
- mongoid (3.0.10)
21
- activemodel (~> 3.1)
22
- moped (~> 1.1)
23
- origin (~> 1.0)
24
- tzinfo (~> 0.3.22)
25
- moped (1.2.7)
26
- multi_json (1.3.6)
27
- origin (1.0.10)
28
- rake (0.9.2)
29
- rspec (2.6.0)
30
- rspec-core (~> 2.6.0)
31
- rspec-expectations (~> 2.6.0)
32
- rspec-mocks (~> 2.6.0)
33
- rspec-core (2.6.4)
34
- rspec-expectations (2.6.0)
35
- diff-lcs (~> 1.1.2)
36
- rspec-mocks (2.6.0)
37
- tzinfo (0.3.34)
38
-
39
- PLATFORMS
40
- ruby
41
-
42
- DEPENDENCIES
43
- mongoid (~> 3.0)
44
- mongoid_store!
45
- rake
46
- rspec
data/lib/.DS_Store DELETED
Binary file
Binary file