mongo_watchable 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,8 @@ module MongoWatchable
4
4
  watchable.class_eval do
5
5
  MongoWatchable.watchers.each do |watcher|
6
6
  key :"#{watcher.name.underscore}_watcher_ids", Array
7
- key :"#{watcher.name.underscore}_watchers_count", Integer, :default => 0, :index => true
7
+ key :"#{watcher.name.underscore}_watchers_count", Integer, :default => 0
8
+ ensure_index :"#{watcher.name.underscore}_watchers_count"
8
9
 
9
10
  define_method :"#{watcher.name.underscore}_watchers" do
10
11
  MongoWatchable::Proxy.new(self, :"#{watcher.name.underscore}_watcher_ids", :"#{watcher.name.underscore}_watchers_count", watcher)
@@ -15,7 +16,8 @@ module MongoWatchable
15
16
  MongoWatchable.watchers.each do |watcher|
16
17
  watcher.class_eval do
17
18
  key :"#{watchable.name.underscore}_watching_ids", Array
18
- key :"#{watchable.name.underscore}_watchings_count", Integer, :default => 0, :index => true
19
+ key :"#{watchable.name.underscore}_watchings_count", Integer, :default => 0
20
+ ensure_index :"#{watchable.name.underscore}_watchings_count"
19
21
 
20
22
  define_method :"#{watchable.name.underscore}_watchings" do
21
23
  MongoWatchable::Proxy.new(self, :"#{watchable.name.underscore}_watching_ids", :"#{watchable.name.underscore}_watchings_count", watchable)
@@ -4,7 +4,8 @@ module MongoWatchable
4
4
  watcher.class_eval do
5
5
  MongoWatchable.watchables.each do |watchable|
6
6
  key :"#{watchable.name.underscore}_watching_ids", Array
7
- key :"#{watchable.name.underscore}_watchings_count", Integer, :default => 0, :index => true
7
+ key :"#{watchable.name.underscore}_watchings_count", Integer, :default => 0
8
+ ensure_index :"#{watchable.name.underscore}_watchings_count"
8
9
 
9
10
  define_method :"#{watchable.name.underscore}_watchings" do
10
11
  MongoWatchable::Proxy.new(self, :"#{watchable.name.underscore}_watching_ids", :"#{watchable.name.underscore}_watchings_count", watchable)
@@ -15,7 +16,8 @@ module MongoWatchable
15
16
  MongoWatchable.watchables.each do |watchable|
16
17
  watchable.class_eval do
17
18
  key :"#{watcher.name.underscore}_watcher_ids", Array
18
- key :"#{watcher.name.underscore}_watchers_count", Integer, :default => 0, :index => true
19
+ key :"#{watcher.name.underscore}_watchers_count", Integer, :default => 0
20
+ ensure_index :"#{watcher.name.underscore}_watchers_count"
19
21
 
20
22
  define_method :"#{watcher.name.underscore}_watchers" do
21
23
  MongoWatchable::Proxy.new(self, :"#{watcher.name.underscore}_watcher_ids", :"#{watcher.name.underscore}_watchers_count", watcher)
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_watchable
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 17
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 2
9
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Jonathan Bell
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-06-29 00:00:00 -05:00
18
+ date: 2012-11-29 00:00:00 -06:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 39
28
30
  segments:
29
31
  - 2
30
32
  - 10
@@ -64,6 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
66
  requirements:
65
67
  - - ">="
66
68
  - !ruby/object:Gem::Version
69
+ hash: 3
67
70
  segments:
68
71
  - 0
69
72
  version: "0"
@@ -72,6 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
75
  requirements:
73
76
  - - ">="
74
77
  - !ruby/object:Gem::Version
78
+ hash: 3
75
79
  segments:
76
80
  - 0
77
81
  version: "0"