mongo_doc_rails2 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. data/.document +5 -0
  2. data/.gitignore +8 -0
  3. data/HISTORY.md +11 -0
  4. data/LICENSE +20 -0
  5. data/README.textile +185 -0
  6. data/Rakefile +188 -0
  7. data/TODO +40 -0
  8. data/VERSION +1 -0
  9. data/data/.gitignore +2 -0
  10. data/examples/simple_document.rb +46 -0
  11. data/examples/simple_object.rb +34 -0
  12. data/features/collections.feature +9 -0
  13. data/features/embed_hash.feature +16 -0
  14. data/features/finders.feature +76 -0
  15. data/features/indexes.feature +28 -0
  16. data/features/mongodb.yml +7 -0
  17. data/features/mongodoc_base.feature +128 -0
  18. data/features/new_record.feature +36 -0
  19. data/features/partial_updates.feature +95 -0
  20. data/features/removing_documents.feature +68 -0
  21. data/features/saving_an_object.feature +15 -0
  22. data/features/scopes.feature +66 -0
  23. data/features/step_definitions/collection_steps.rb +17 -0
  24. data/features/step_definitions/document_steps.rb +149 -0
  25. data/features/step_definitions/documents.rb +40 -0
  26. data/features/step_definitions/embed_hash_steps.rb +6 -0
  27. data/features/step_definitions/finder_steps.rb +15 -0
  28. data/features/step_definitions/index_steps.rb +10 -0
  29. data/features/step_definitions/json_steps.rb +9 -0
  30. data/features/step_definitions/object_steps.rb +50 -0
  31. data/features/step_definitions/objects.rb +24 -0
  32. data/features/step_definitions/partial_update_steps.rb +31 -0
  33. data/features/step_definitions/query_steps.rb +66 -0
  34. data/features/step_definitions/removing_documents_steps.rb +14 -0
  35. data/features/step_definitions/scope_steps.rb +18 -0
  36. data/features/step_definitions/string_casting_steps.rb +29 -0
  37. data/features/step_definitions/util_steps.rb +7 -0
  38. data/features/string_casting.feature +10 -0
  39. data/features/support/support.rb +10 -0
  40. data/features/using_criteria.feature +142 -0
  41. data/lib/mongo_doc.rb +12 -0
  42. data/lib/mongo_doc/associations.rb +109 -0
  43. data/lib/mongo_doc/associations/collection_proxy.rb +121 -0
  44. data/lib/mongo_doc/associations/document_proxy.rb +65 -0
  45. data/lib/mongo_doc/associations/hash_proxy.rb +102 -0
  46. data/lib/mongo_doc/associations/proxy_base.rb +48 -0
  47. data/lib/mongo_doc/attributes.rb +84 -0
  48. data/lib/mongo_doc/bson.rb +31 -0
  49. data/lib/mongo_doc/collection.rb +82 -0
  50. data/lib/mongo_doc/connection.rb +88 -0
  51. data/lib/mongo_doc/contexts.rb +31 -0
  52. data/lib/mongo_doc/contexts/ids.rb +41 -0
  53. data/lib/mongo_doc/contexts/mongo.rb +272 -0
  54. data/lib/mongo_doc/criteria.rb +70 -0
  55. data/lib/mongo_doc/cursor.rb +32 -0
  56. data/lib/mongo_doc/document.rb +205 -0
  57. data/lib/mongo_doc/ext.rb +16 -0
  58. data/lib/mongo_doc/ext/array.rb +5 -0
  59. data/lib/mongo_doc/ext/binary.rb +7 -0
  60. data/lib/mongo_doc/ext/boolean_class.rb +17 -0
  61. data/lib/mongo_doc/ext/date.rb +19 -0
  62. data/lib/mongo_doc/ext/date_time.rb +17 -0
  63. data/lib/mongo_doc/ext/dbref.rb +7 -0
  64. data/lib/mongo_doc/ext/hash.rb +7 -0
  65. data/lib/mongo_doc/ext/min_max_keys.rb +13 -0
  66. data/lib/mongo_doc/ext/nil_class.rb +5 -0
  67. data/lib/mongo_doc/ext/numeric.rb +17 -0
  68. data/lib/mongo_doc/ext/object.rb +19 -0
  69. data/lib/mongo_doc/ext/object_id.rb +7 -0
  70. data/lib/mongo_doc/ext/regexp.rb +5 -0
  71. data/lib/mongo_doc/ext/string.rb +5 -0
  72. data/lib/mongo_doc/ext/symbol.rb +5 -0
  73. data/lib/mongo_doc/ext/time.rb +9 -0
  74. data/lib/mongo_doc/finders.rb +38 -0
  75. data/lib/mongo_doc/index.rb +46 -0
  76. data/lib/mongo_doc/matchers.rb +35 -0
  77. data/lib/mongo_doc/root.rb +26 -0
  78. data/lib/mongo_doc/scope.rb +64 -0
  79. data/lib/mongo_doc/validations.rb +12 -0
  80. data/lib/mongo_doc/validations/macros.rb +11 -0
  81. data/lib/mongo_doc/validations/validates_embedded.rb +13 -0
  82. data/lib/mongoid/contexts/enumerable.rb +151 -0
  83. data/lib/mongoid/contexts/paging.rb +42 -0
  84. data/lib/mongoid/criteria.rb +239 -0
  85. data/lib/mongoid/criterion/complex.rb +21 -0
  86. data/lib/mongoid/criterion/exclusion.rb +65 -0
  87. data/lib/mongoid/criterion/inclusion.rb +93 -0
  88. data/lib/mongoid/criterion/optional.rb +136 -0
  89. data/lib/mongoid/extensions/hash/criteria_helpers.rb +20 -0
  90. data/lib/mongoid/extensions/symbol/inflections.rb +36 -0
  91. data/lib/mongoid/matchers/all.rb +11 -0
  92. data/lib/mongoid/matchers/default.rb +26 -0
  93. data/lib/mongoid/matchers/exists.rb +13 -0
  94. data/lib/mongoid/matchers/gt.rb +11 -0
  95. data/lib/mongoid/matchers/gte.rb +11 -0
  96. data/lib/mongoid/matchers/in.rb +11 -0
  97. data/lib/mongoid/matchers/lt.rb +11 -0
  98. data/lib/mongoid/matchers/lte.rb +11 -0
  99. data/lib/mongoid/matchers/ne.rb +11 -0
  100. data/lib/mongoid/matchers/nin.rb +11 -0
  101. data/lib/mongoid/matchers/size.rb +11 -0
  102. data/mongo_doc_rails2.gemspec +237 -0
  103. data/mongod.example.yml +2 -0
  104. data/mongodb.example.yml +14 -0
  105. data/perf/mongo_doc_object.rb +83 -0
  106. data/perf/mongo_document.rb +84 -0
  107. data/perf/ruby_driver.rb +49 -0
  108. data/script/console +8 -0
  109. data/spec/array_including_argument_matcher.rb +62 -0
  110. data/spec/associations/collection_proxy_spec.rb +233 -0
  111. data/spec/associations/document_proxy_spec.rb +45 -0
  112. data/spec/associations/hash_proxy_spec.rb +181 -0
  113. data/spec/associations/proxy_base_spec.rb +92 -0
  114. data/spec/associations_spec.rb +218 -0
  115. data/spec/attributes_accessor_spec.rb +33 -0
  116. data/spec/attributes_spec.rb +145 -0
  117. data/spec/bson_matchers.rb +54 -0
  118. data/spec/bson_spec.rb +196 -0
  119. data/spec/collection_spec.rb +169 -0
  120. data/spec/connection_spec.rb +147 -0
  121. data/spec/contexts/ids_spec.rb +49 -0
  122. data/spec/contexts/mongo_spec.rb +235 -0
  123. data/spec/contexts_spec.rb +56 -0
  124. data/spec/criteria_spec.rb +69 -0
  125. data/spec/cursor_spec.rb +91 -0
  126. data/spec/document_ext.rb +9 -0
  127. data/spec/document_spec.rb +553 -0
  128. data/spec/embedded_save_spec.rb +73 -0
  129. data/spec/ext_spec.rb +89 -0
  130. data/spec/finders_spec.rb +61 -0
  131. data/spec/hash_matchers.rb +27 -0
  132. data/spec/index_spec.rb +79 -0
  133. data/spec/matchers_spec.rb +342 -0
  134. data/spec/mongodb.yml +6 -0
  135. data/spec/mongodb_pairs.yml +8 -0
  136. data/spec/new_record_spec.rb +128 -0
  137. data/spec/root_spec.rb +41 -0
  138. data/spec/scope_spec.rb +79 -0
  139. data/spec/spec.opts +2 -0
  140. data/spec/spec_helper.rb +14 -0
  141. data/spec/validations_spec.rb +30 -0
  142. metadata +346 -0
@@ -0,0 +1,136 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Criterion #:nodoc:
4
+ module Optional
5
+ # Tells the criteria that the cursor that gets returned needs to be
6
+ # cached. This is so multiple iterations don't hit the database multiple
7
+ # times, however this is not advisable when working with large data sets
8
+ # as the entire results will get stored in memory.
9
+ #
10
+ # Example:
11
+ #
12
+ # <tt>criteria.cache</tt>
13
+ def cache
14
+ @options.merge!(:cache => true); self
15
+ end
16
+
17
+ # Will return true if the cache option has been set.
18
+ #
19
+ # Example:
20
+ #
21
+ # <tt>criteria.cached?</tt>
22
+ def cached?
23
+ @options[:cache] == true
24
+ end
25
+
26
+ # Flags the criteria to execute against a read-only slave in the pool
27
+ # instead of master.
28
+ #
29
+ # Example:
30
+ #
31
+ # <tt>criteria.enslave</tt>
32
+ def enslave
33
+ @options.merge!(:enslave => true); self
34
+ end
35
+
36
+ # Will return true if the criteria is enslaved.
37
+ #
38
+ # Example:
39
+ #
40
+ # <tt>criteria.enslaved?</tt>
41
+ def enslaved?
42
+ @options[:enslave] == true
43
+ end
44
+
45
+ # Adds a criterion to the +Criteria+ that specifies additional options
46
+ # to be passed to the Ruby driver, in the exact format for the driver.
47
+ #
48
+ # Options:
49
+ #
50
+ # extras: A +Hash+ that gets set to the driver options.
51
+ #
52
+ # Example:
53
+ #
54
+ # <tt>criteria.extras(:limit => 20, :skip => 40)</tt>
55
+ #
56
+ # Returns: <tt>self</tt>
57
+ def extras(extras)
58
+ @options.merge!(extras); filter_options; self
59
+ end
60
+
61
+ # Adds a criterion to the +Criteria+ that specifies an id that must be matched.
62
+ #
63
+ # Options:
64
+ #
65
+ # object_id: A +String+ representation of a <tt>BSON::ObjectID</tt>
66
+ #
67
+ # Example:
68
+ #
69
+ # <tt>criteria.id("4ab2bc4b8ad548971900005c")</tt>
70
+ #
71
+ # Returns: <tt>self</tt>
72
+ def id(*args)
73
+ (args.flatten.size > 1) ? self.in(:_id => args.flatten) : (@selector[:_id] = args.first)
74
+ self
75
+ end
76
+
77
+ # Adds a criterion to the +Criteria+ that specifies the maximum number of
78
+ # results to return. This is mostly used in conjunction with <tt>skip()</tt>
79
+ # to handle paginated results.
80
+ #
81
+ # Options:
82
+ #
83
+ # value: An +Integer+ specifying the max number of results. Defaults to 20.
84
+ #
85
+ # Example:
86
+ #
87
+ # <tt>criteria.limit(100)</tt>
88
+ #
89
+ # Returns: <tt>self</tt>
90
+ def limit(value = 20)
91
+ @options[:limit] = value; self
92
+ end
93
+
94
+ # Returns the offset option. If a per_page option is in the list then it
95
+ # will replace it with a skip parameter and return the same value. Defaults
96
+ # to 20 if nothing was provided.
97
+ def offset(*args)
98
+ args.size > 0 ? skip(args.first) : @options[:skip]
99
+ end
100
+
101
+ # Adds a criterion to the +Criteria+ that specifies the sort order of
102
+ # the returned documents in the database. Similar to a SQL "ORDER BY".
103
+ #
104
+ # Options:
105
+ #
106
+ # params: An +Array+ of [field, direction] sorting pairs.
107
+ #
108
+ # Example:
109
+ #
110
+ # <tt>criteria.order_by([[:field1, :asc], [:field2, :desc]])</tt>
111
+ #
112
+ # Returns: <tt>self</tt>
113
+ def order_by(params = [])
114
+ @options[:sort] = params; self
115
+ end
116
+
117
+ # Adds a criterion to the +Criteria+ that specifies how many results to skip
118
+ # when returning Documents. This is mostly used in conjunction with
119
+ # <tt>limit()</tt> to handle paginated results, and is similar to the
120
+ # traditional "offset" parameter.
121
+ #
122
+ # Options:
123
+ #
124
+ # value: An +Integer+ specifying the number of results to skip. Defaults to 0.
125
+ #
126
+ # Example:
127
+ #
128
+ # <tt>criteria.skip(20)</tt>
129
+ #
130
+ # Returns: <tt>self</tt>
131
+ def skip(value = 0)
132
+ @options[:skip] = value; self
133
+ end
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Extensions #:nodoc:
4
+ module Hash #:nodoc:
5
+ module CriteriaHelpers #:nodoc:
6
+ def expand_complex_criteria
7
+ hsh = {}
8
+ self.each_pair do |k,v|
9
+ if k.class == Mongoid::Criterion::Complex
10
+ hsh[k.key] = {"$#{k.operator}" => v}
11
+ else
12
+ hsh[k] = v
13
+ end
14
+ end
15
+ hsh
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,36 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Extensions #:nodoc:
4
+ module Symbol #:nodoc:
5
+ module Inflections #:nodoc:
6
+
7
+ REVERSALS = {
8
+ :asc => :desc,
9
+ :ascending => :descending,
10
+ :desc => :asc,
11
+ :descending => :ascending
12
+ }
13
+
14
+ def invert
15
+ REVERSALS[self]
16
+ end
17
+
18
+ def singular?
19
+ to_s.singular?
20
+ end
21
+
22
+ def plural?
23
+ to_s.plural?
24
+ end
25
+
26
+ ["gt", "lt", "gte", "lte", "ne", "in", "nin", "mod", "all", "size", "exists"].each do |oper|
27
+ class_eval <<-OPERATORS
28
+ def #{oper}
29
+ Criterion::Complex.new(:key => self, :operator => "#{oper}")
30
+ end
31
+ OPERATORS
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class All < Default
5
+ # Return true if the attribute and first value in the hash are equal.
6
+ def matches?(value)
7
+ @attribute == value.values.first
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Default
5
+ # Creating a new matcher only requires the value.
6
+ def initialize(attribute)
7
+ @attribute = attribute
8
+ end
9
+ # Return true if the attribute and value are equal.
10
+ def matches?(value)
11
+ @attribute == value
12
+ end
13
+
14
+ protected
15
+ # Return the first value in the hash.
16
+ def first(value)
17
+ value.values.first
18
+ end
19
+
20
+ # If object exists then compare, else return false
21
+ def determine(value, operator)
22
+ @attribute ? @attribute.send(operator, first(value)) : false
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Exists < Default
5
+ # Return true if the attribute exists and checking for existence or
6
+ # return true if the attribute does not exist and checking for
7
+ # non-existence.
8
+ def matches?(value)
9
+ @attribute.nil? != value.values.first
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Gt < Default
5
+ # Return true if the attribute is greater than the value.
6
+ def matches?(value)
7
+ determine(value, :>)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Gte < Default
5
+ # Return true if the attribute is greater than or equal to the value.
6
+ def matches?(value)
7
+ determine(value, :>=)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class In < Default
5
+ # Return true if the attribute is in the values.
6
+ def matches?(value)
7
+ value.values.first.include?(@attribute)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Lt < Default
5
+ # Return true if the attribute is less than the value.
6
+ def matches?(value)
7
+ determine(value, :<)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Lte < Default
5
+ # Return true if the attribute is less than or equal to the value.
6
+ def matches?(value)
7
+ determine(value, :<=)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Ne < Default
5
+ # Return true if the attribute and first value are not equal.
6
+ def matches?(value)
7
+ @attribute != value.values.first
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Nin < Default
5
+ # Return true if the attribute is not in the value list.
6
+ def matches?(value)
7
+ !value.values.first.include?(@attribute)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Matchers #:nodoc:
4
+ class Size < Default
5
+ # Return true if the attribute size is equal to the first value.
6
+ def matches?(value)
7
+ @attribute.size == value.values.first
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,237 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{mongo_doc_rails2}
8
+ s.version = "0.6.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Les Hill"]
12
+ s.date = %q{2010-05-10}
13
+ s.description = %q{ODM for MongoDB - for Rails 2.3.x}
14
+ s.email = %q{leshill@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.textile",
18
+ "TODO"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".gitignore",
23
+ "HISTORY.md",
24
+ "LICENSE",
25
+ "README.textile",
26
+ "Rakefile",
27
+ "TODO",
28
+ "VERSION",
29
+ "data/.gitignore",
30
+ "examples/simple_document.rb",
31
+ "examples/simple_object.rb",
32
+ "features/collections.feature",
33
+ "features/embed_hash.feature",
34
+ "features/finders.feature",
35
+ "features/indexes.feature",
36
+ "features/mongodb.yml",
37
+ "features/mongodoc_base.feature",
38
+ "features/new_record.feature",
39
+ "features/partial_updates.feature",
40
+ "features/removing_documents.feature",
41
+ "features/saving_an_object.feature",
42
+ "features/scopes.feature",
43
+ "features/step_definitions/collection_steps.rb",
44
+ "features/step_definitions/document_steps.rb",
45
+ "features/step_definitions/documents.rb",
46
+ "features/step_definitions/embed_hash_steps.rb",
47
+ "features/step_definitions/finder_steps.rb",
48
+ "features/step_definitions/index_steps.rb",
49
+ "features/step_definitions/json_steps.rb",
50
+ "features/step_definitions/object_steps.rb",
51
+ "features/step_definitions/objects.rb",
52
+ "features/step_definitions/partial_update_steps.rb",
53
+ "features/step_definitions/query_steps.rb",
54
+ "features/step_definitions/removing_documents_steps.rb",
55
+ "features/step_definitions/scope_steps.rb",
56
+ "features/step_definitions/string_casting_steps.rb",
57
+ "features/step_definitions/util_steps.rb",
58
+ "features/string_casting.feature",
59
+ "features/support/support.rb",
60
+ "features/using_criteria.feature",
61
+ "lib/mongo_doc.rb",
62
+ "lib/mongo_doc/associations.rb",
63
+ "lib/mongo_doc/associations/collection_proxy.rb",
64
+ "lib/mongo_doc/associations/document_proxy.rb",
65
+ "lib/mongo_doc/associations/hash_proxy.rb",
66
+ "lib/mongo_doc/associations/proxy_base.rb",
67
+ "lib/mongo_doc/attributes.rb",
68
+ "lib/mongo_doc/bson.rb",
69
+ "lib/mongo_doc/collection.rb",
70
+ "lib/mongo_doc/connection.rb",
71
+ "lib/mongo_doc/contexts.rb",
72
+ "lib/mongo_doc/contexts/ids.rb",
73
+ "lib/mongo_doc/contexts/mongo.rb",
74
+ "lib/mongo_doc/criteria.rb",
75
+ "lib/mongo_doc/cursor.rb",
76
+ "lib/mongo_doc/document.rb",
77
+ "lib/mongo_doc/ext.rb",
78
+ "lib/mongo_doc/ext/array.rb",
79
+ "lib/mongo_doc/ext/binary.rb",
80
+ "lib/mongo_doc/ext/boolean_class.rb",
81
+ "lib/mongo_doc/ext/date.rb",
82
+ "lib/mongo_doc/ext/date_time.rb",
83
+ "lib/mongo_doc/ext/dbref.rb",
84
+ "lib/mongo_doc/ext/hash.rb",
85
+ "lib/mongo_doc/ext/min_max_keys.rb",
86
+ "lib/mongo_doc/ext/nil_class.rb",
87
+ "lib/mongo_doc/ext/numeric.rb",
88
+ "lib/mongo_doc/ext/object.rb",
89
+ "lib/mongo_doc/ext/object_id.rb",
90
+ "lib/mongo_doc/ext/regexp.rb",
91
+ "lib/mongo_doc/ext/string.rb",
92
+ "lib/mongo_doc/ext/symbol.rb",
93
+ "lib/mongo_doc/ext/time.rb",
94
+ "lib/mongo_doc/finders.rb",
95
+ "lib/mongo_doc/index.rb",
96
+ "lib/mongo_doc/matchers.rb",
97
+ "lib/mongo_doc/root.rb",
98
+ "lib/mongo_doc/scope.rb",
99
+ "lib/mongo_doc/validations.rb",
100
+ "lib/mongo_doc/validations/macros.rb",
101
+ "lib/mongo_doc/validations/validates_embedded.rb",
102
+ "lib/mongoid/contexts/enumerable.rb",
103
+ "lib/mongoid/contexts/paging.rb",
104
+ "lib/mongoid/criteria.rb",
105
+ "lib/mongoid/criterion/complex.rb",
106
+ "lib/mongoid/criterion/exclusion.rb",
107
+ "lib/mongoid/criterion/inclusion.rb",
108
+ "lib/mongoid/criterion/optional.rb",
109
+ "lib/mongoid/extensions/hash/criteria_helpers.rb",
110
+ "lib/mongoid/extensions/symbol/inflections.rb",
111
+ "lib/mongoid/matchers/all.rb",
112
+ "lib/mongoid/matchers/default.rb",
113
+ "lib/mongoid/matchers/exists.rb",
114
+ "lib/mongoid/matchers/gt.rb",
115
+ "lib/mongoid/matchers/gte.rb",
116
+ "lib/mongoid/matchers/in.rb",
117
+ "lib/mongoid/matchers/lt.rb",
118
+ "lib/mongoid/matchers/lte.rb",
119
+ "lib/mongoid/matchers/ne.rb",
120
+ "lib/mongoid/matchers/nin.rb",
121
+ "lib/mongoid/matchers/size.rb",
122
+ "mongo_doc_rails2.gemspec",
123
+ "mongod.example.yml",
124
+ "mongodb.example.yml",
125
+ "perf/mongo_doc_object.rb",
126
+ "perf/mongo_document.rb",
127
+ "perf/ruby_driver.rb",
128
+ "script/console",
129
+ "spec/array_including_argument_matcher.rb",
130
+ "spec/associations/collection_proxy_spec.rb",
131
+ "spec/associations/document_proxy_spec.rb",
132
+ "spec/associations/hash_proxy_spec.rb",
133
+ "spec/associations/proxy_base_spec.rb",
134
+ "spec/associations_spec.rb",
135
+ "spec/attributes_accessor_spec.rb",
136
+ "spec/attributes_spec.rb",
137
+ "spec/bson_matchers.rb",
138
+ "spec/bson_spec.rb",
139
+ "spec/collection_spec.rb",
140
+ "spec/connection_spec.rb",
141
+ "spec/contexts/ids_spec.rb",
142
+ "spec/contexts/mongo_spec.rb",
143
+ "spec/contexts_spec.rb",
144
+ "spec/criteria_spec.rb",
145
+ "spec/cursor_spec.rb",
146
+ "spec/document_ext.rb",
147
+ "spec/document_spec.rb",
148
+ "spec/embedded_save_spec.rb",
149
+ "spec/ext_spec.rb",
150
+ "spec/finders_spec.rb",
151
+ "spec/hash_matchers.rb",
152
+ "spec/index_spec.rb",
153
+ "spec/matchers_spec.rb",
154
+ "spec/mongodb.yml",
155
+ "spec/mongodb_pairs.yml",
156
+ "spec/new_record_spec.rb",
157
+ "spec/root_spec.rb",
158
+ "spec/scope_spec.rb",
159
+ "spec/spec.opts",
160
+ "spec/spec_helper.rb",
161
+ "spec/validations_spec.rb"
162
+ ]
163
+ s.homepage = %q{http://github.com/leshill/mongodoc}
164
+ s.rdoc_options = ["--charset=UTF-8"]
165
+ s.require_paths = ["lib"]
166
+ s.rubygems_version = %q{1.3.6}
167
+ s.summary = %q{ODM for MongoDB - for Rails 2.3.x}
168
+ s.test_files = [
169
+ "spec/array_including_argument_matcher.rb",
170
+ "spec/associations/collection_proxy_spec.rb",
171
+ "spec/associations/document_proxy_spec.rb",
172
+ "spec/associations/hash_proxy_spec.rb",
173
+ "spec/associations/proxy_base_spec.rb",
174
+ "spec/associations_spec.rb",
175
+ "spec/attributes_accessor_spec.rb",
176
+ "spec/attributes_spec.rb",
177
+ "spec/bson_matchers.rb",
178
+ "spec/bson_spec.rb",
179
+ "spec/collection_spec.rb",
180
+ "spec/connection_spec.rb",
181
+ "spec/contexts/ids_spec.rb",
182
+ "spec/contexts/mongo_spec.rb",
183
+ "spec/contexts_spec.rb",
184
+ "spec/criteria_spec.rb",
185
+ "spec/cursor_spec.rb",
186
+ "spec/document_ext.rb",
187
+ "spec/document_spec.rb",
188
+ "spec/embedded_save_spec.rb",
189
+ "spec/ext_spec.rb",
190
+ "spec/finders_spec.rb",
191
+ "spec/hash_matchers.rb",
192
+ "spec/index_spec.rb",
193
+ "spec/matchers_spec.rb",
194
+ "spec/new_record_spec.rb",
195
+ "spec/root_spec.rb",
196
+ "spec/scope_spec.rb",
197
+ "spec/spec_helper.rb",
198
+ "spec/validations_spec.rb",
199
+ "examples/simple_document.rb",
200
+ "examples/simple_object.rb"
201
+ ]
202
+
203
+ if s.respond_to? :specification_version then
204
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
205
+ s.specification_version = 3
206
+
207
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
208
+ s.add_runtime_dependency(%q<activesupport>, [">= 2.3.4"])
209
+ s.add_runtime_dependency(%q<mongo>, ["= 1.0.1"])
210
+ s.add_runtime_dependency(%q<bson>, ["= 1.0.1"])
211
+ s.add_runtime_dependency(%q<bson_ext>, ["= 1.0.1"])
212
+ s.add_runtime_dependency(%q<durran-validatable>, ["= 2.0.1"])
213
+ s.add_runtime_dependency(%q<leshill-will_paginate>, ["= 2.3.11"])
214
+ s.add_development_dependency(%q<rspec>, ["= 1.3.0"])
215
+ s.add_development_dependency(%q<cucumber>, [">= 0.6.2"])
216
+ else
217
+ s.add_dependency(%q<activesupport>, [">= 2.3.4"])
218
+ s.add_dependency(%q<mongo>, ["= 1.0.1"])
219
+ s.add_dependency(%q<bson>, ["= 1.0.1"])
220
+ s.add_dependency(%q<bson_ext>, ["= 1.0.1"])
221
+ s.add_dependency(%q<durran-validatable>, ["= 2.0.1"])
222
+ s.add_dependency(%q<leshill-will_paginate>, ["= 2.3.11"])
223
+ s.add_dependency(%q<rspec>, ["= 1.3.0"])
224
+ s.add_dependency(%q<cucumber>, [">= 0.6.2"])
225
+ end
226
+ else
227
+ s.add_dependency(%q<activesupport>, [">= 2.3.4"])
228
+ s.add_dependency(%q<mongo>, ["= 1.0.1"])
229
+ s.add_dependency(%q<bson>, ["= 1.0.1"])
230
+ s.add_dependency(%q<bson_ext>, ["= 1.0.1"])
231
+ s.add_dependency(%q<durran-validatable>, ["= 2.0.1"])
232
+ s.add_dependency(%q<leshill-will_paginate>, ["= 2.3.11"])
233
+ s.add_dependency(%q<rspec>, ["= 1.3.0"])
234
+ s.add_dependency(%q<cucumber>, [">= 0.6.2"])
235
+ end
236
+ end
237
+