mebla 1.1.11 → 1.1.12

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mebla (1.1.10)
4
+ mebla (1.1.11)
5
5
  mebla
6
6
  mongoid (~> 2.0.1)
7
7
  slingshot-rb (= 0.0.8)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.11
1
+ 1.1.12
@@ -30,7 +30,7 @@ module Mebla
30
30
  if model_class.embedded?
31
31
  model_class_collection = model_ids.assoc(model_class)
32
32
  # collect parent ids
33
- # {class => {parent_id => [ids]}}
33
+ # [class, [parent_id, ids]]
34
34
  parent_id = hit['_source']['_parent']
35
35
 
36
36
  model_class_collection << [parent_id]
@@ -38,7 +38,7 @@ module Mebla
38
38
  model_class_collection.assoc(parent_id) << hit['_source']['id']
39
39
  else
40
40
  # collect ids
41
- # {class => [ids]}
41
+ # [class, ids]
42
42
  model_ids.assoc(model_class) << hit['_source']['id']
43
43
  end
44
44
  end
@@ -52,7 +52,9 @@ module Mebla
52
52
 
53
53
  unless model_class.embedded?
54
54
  # Retrieve the results from the database
55
- @entries += model_class.any_in(:_id => ids).entries
55
+ ids.each do |id|
56
+ @entries << model_class.find(id)
57
+ end
56
58
  else
57
59
  # Get the parent
58
60
  parent_class = model_class.embedded_parent
@@ -65,7 +67,9 @@ module Mebla
65
67
  parent = parent_class.find parent_id
66
68
 
67
69
  # Retrieve the results from the database
68
- @entries += parent.send(access_method.to_sym).any_in(:_id => entries_ids).entries
70
+ entries_ids.each do |entry_id|
71
+ @entries << parent.send(access_method.to_sym).find(entry_id)
72
+ end
69
73
  end
70
74
  end
71
75
  end
data/mebla.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mebla}
8
- s.version = "1.1.11"
8
+ s.version = "1.1.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Omar Mekky"]
12
- s.date = %q{2011-06-23}
12
+ s.date = %q{2011-07-07}
13
13
  s.description = %q{
14
14
  An elasticsearch wrapper for mongoid odm based on slingshot. Makes integration between ElasticSearch full-text
15
15
  search engine and Mongoid documents seemless and simple.
@@ -207,6 +207,16 @@ Gem::Specification.new do |s|
207
207
  s.add_development_dependency(%q<mongoid-rspec>, ["= 1.4.1"])
208
208
  s.add_development_dependency(%q<database_cleaner>, ["= 0.6.4"])
209
209
  s.add_development_dependency(%q<bluecloth>, ["~> 2.1.0"])
210
+ s.add_development_dependency(%q<bson>, ["~> 1.3.0"])
211
+ s.add_development_dependency(%q<bson_ext>, ["~> 1.3.0"])
212
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
213
+ s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
214
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
215
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
216
+ s.add_development_dependency(%q<rcov>, [">= 0"])
217
+ s.add_development_dependency(%q<mongoid-rspec>, ["= 1.4.1"])
218
+ s.add_development_dependency(%q<database_cleaner>, ["= 0.6.4"])
219
+ s.add_development_dependency(%q<bluecloth>, ["~> 2.1.0"])
210
220
  s.add_runtime_dependency(%q<slingshot-rb>, ["= 0.0.8"])
211
221
  s.add_runtime_dependency(%q<mongoid>, ["~> 2.0.1"])
212
222
  s.add_development_dependency(%q<bson>, ["~> 1.3.0"])
@@ -347,6 +357,16 @@ Gem::Specification.new do |s|
347
357
  s.add_dependency(%q<mongoid-rspec>, ["= 1.4.1"])
348
358
  s.add_dependency(%q<database_cleaner>, ["= 0.6.4"])
349
359
  s.add_dependency(%q<bluecloth>, ["~> 2.1.0"])
360
+ s.add_dependency(%q<bson>, ["~> 1.3.0"])
361
+ s.add_dependency(%q<bson_ext>, ["~> 1.3.0"])
362
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
363
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
364
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
365
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
366
+ s.add_dependency(%q<rcov>, [">= 0"])
367
+ s.add_dependency(%q<mongoid-rspec>, ["= 1.4.1"])
368
+ s.add_dependency(%q<database_cleaner>, ["= 0.6.4"])
369
+ s.add_dependency(%q<bluecloth>, ["~> 2.1.0"])
350
370
  s.add_dependency(%q<slingshot-rb>, ["= 0.0.8"])
351
371
  s.add_dependency(%q<mongoid>, ["~> 2.0.1"])
352
372
  s.add_dependency(%q<bson>, ["~> 1.3.0"])
@@ -488,6 +508,16 @@ Gem::Specification.new do |s|
488
508
  s.add_dependency(%q<mongoid-rspec>, ["= 1.4.1"])
489
509
  s.add_dependency(%q<database_cleaner>, ["= 0.6.4"])
490
510
  s.add_dependency(%q<bluecloth>, ["~> 2.1.0"])
511
+ s.add_dependency(%q<bson>, ["~> 1.3.0"])
512
+ s.add_dependency(%q<bson_ext>, ["~> 1.3.0"])
513
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
514
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
515
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
516
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
517
+ s.add_dependency(%q<rcov>, [">= 0"])
518
+ s.add_dependency(%q<mongoid-rspec>, ["= 1.4.1"])
519
+ s.add_dependency(%q<database_cleaner>, ["= 0.6.4"])
520
+ s.add_dependency(%q<bluecloth>, ["~> 2.1.0"])
491
521
  s.add_dependency(%q<slingshot-rb>, ["= 0.0.8"])
492
522
  s.add_dependency(%q<mongoid>, ["~> 2.0.1"])
493
523
  s.add_dependency(%q<bson>, ["~> 1.3.0"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mebla
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 11
10
- version: 1.1.11
9
+ - 12
10
+ version: 1.1.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Omar Mekky
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-23 00:00:00 +02:00
18
+ date: 2011-07-07 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -2024,8 +2024,166 @@ dependencies:
2024
2024
  version_requirements: *id127
2025
2025
  - !ruby/object:Gem::Dependency
2026
2026
  prerelease: false
2027
- type: :runtime
2027
+ type: :development
2028
2028
  requirement: &id128 !ruby/object:Gem::Requirement
2029
+ none: false
2030
+ requirements:
2031
+ - - ~>
2032
+ - !ruby/object:Gem::Version
2033
+ hash: 27
2034
+ segments:
2035
+ - 1
2036
+ - 3
2037
+ - 0
2038
+ version: 1.3.0
2039
+ name: bson
2040
+ version_requirements: *id128
2041
+ - !ruby/object:Gem::Dependency
2042
+ prerelease: false
2043
+ type: :development
2044
+ requirement: &id129 !ruby/object:Gem::Requirement
2045
+ none: false
2046
+ requirements:
2047
+ - - ~>
2048
+ - !ruby/object:Gem::Version
2049
+ hash: 27
2050
+ segments:
2051
+ - 1
2052
+ - 3
2053
+ - 0
2054
+ version: 1.3.0
2055
+ name: bson_ext
2056
+ version_requirements: *id129
2057
+ - !ruby/object:Gem::Dependency
2058
+ prerelease: false
2059
+ type: :development
2060
+ requirement: &id130 !ruby/object:Gem::Requirement
2061
+ none: false
2062
+ requirements:
2063
+ - - ~>
2064
+ - !ruby/object:Gem::Version
2065
+ hash: 3
2066
+ segments:
2067
+ - 2
2068
+ - 3
2069
+ - 0
2070
+ version: 2.3.0
2071
+ name: rspec
2072
+ version_requirements: *id130
2073
+ - !ruby/object:Gem::Dependency
2074
+ prerelease: false
2075
+ type: :development
2076
+ requirement: &id131 !ruby/object:Gem::Requirement
2077
+ none: false
2078
+ requirements:
2079
+ - - ~>
2080
+ - !ruby/object:Gem::Version
2081
+ hash: 7
2082
+ segments:
2083
+ - 0
2084
+ - 6
2085
+ - 0
2086
+ version: 0.6.0
2087
+ name: yard
2088
+ version_requirements: *id131
2089
+ - !ruby/object:Gem::Dependency
2090
+ prerelease: false
2091
+ type: :development
2092
+ requirement: &id132 !ruby/object:Gem::Requirement
2093
+ none: false
2094
+ requirements:
2095
+ - - ~>
2096
+ - !ruby/object:Gem::Version
2097
+ hash: 23
2098
+ segments:
2099
+ - 1
2100
+ - 0
2101
+ - 0
2102
+ version: 1.0.0
2103
+ name: bundler
2104
+ version_requirements: *id132
2105
+ - !ruby/object:Gem::Dependency
2106
+ prerelease: false
2107
+ type: :development
2108
+ requirement: &id133 !ruby/object:Gem::Requirement
2109
+ none: false
2110
+ requirements:
2111
+ - - ~>
2112
+ - !ruby/object:Gem::Version
2113
+ hash: 7
2114
+ segments:
2115
+ - 1
2116
+ - 5
2117
+ - 2
2118
+ version: 1.5.2
2119
+ name: jeweler
2120
+ version_requirements: *id133
2121
+ - !ruby/object:Gem::Dependency
2122
+ prerelease: false
2123
+ type: :development
2124
+ requirement: &id134 !ruby/object:Gem::Requirement
2125
+ none: false
2126
+ requirements:
2127
+ - - ">="
2128
+ - !ruby/object:Gem::Version
2129
+ hash: 3
2130
+ segments:
2131
+ - 0
2132
+ version: "0"
2133
+ name: rcov
2134
+ version_requirements: *id134
2135
+ - !ruby/object:Gem::Dependency
2136
+ prerelease: false
2137
+ type: :development
2138
+ requirement: &id135 !ruby/object:Gem::Requirement
2139
+ none: false
2140
+ requirements:
2141
+ - - "="
2142
+ - !ruby/object:Gem::Version
2143
+ hash: 5
2144
+ segments:
2145
+ - 1
2146
+ - 4
2147
+ - 1
2148
+ version: 1.4.1
2149
+ name: mongoid-rspec
2150
+ version_requirements: *id135
2151
+ - !ruby/object:Gem::Dependency
2152
+ prerelease: false
2153
+ type: :development
2154
+ requirement: &id136 !ruby/object:Gem::Requirement
2155
+ none: false
2156
+ requirements:
2157
+ - - "="
2158
+ - !ruby/object:Gem::Version
2159
+ hash: 15
2160
+ segments:
2161
+ - 0
2162
+ - 6
2163
+ - 4
2164
+ version: 0.6.4
2165
+ name: database_cleaner
2166
+ version_requirements: *id136
2167
+ - !ruby/object:Gem::Dependency
2168
+ prerelease: false
2169
+ type: :development
2170
+ requirement: &id137 !ruby/object:Gem::Requirement
2171
+ none: false
2172
+ requirements:
2173
+ - - ~>
2174
+ - !ruby/object:Gem::Version
2175
+ hash: 11
2176
+ segments:
2177
+ - 2
2178
+ - 1
2179
+ - 0
2180
+ version: 2.1.0
2181
+ name: bluecloth
2182
+ version_requirements: *id137
2183
+ - !ruby/object:Gem::Dependency
2184
+ prerelease: false
2185
+ type: :runtime
2186
+ requirement: &id138 !ruby/object:Gem::Requirement
2029
2187
  none: false
2030
2188
  requirements:
2031
2189
  - - "="
@@ -2037,11 +2195,11 @@ dependencies:
2037
2195
  - 8
2038
2196
  version: 0.0.8
2039
2197
  name: slingshot-rb
2040
- version_requirements: *id128
2198
+ version_requirements: *id138
2041
2199
  - !ruby/object:Gem::Dependency
2042
2200
  prerelease: false
2043
2201
  type: :runtime
2044
- requirement: &id129 !ruby/object:Gem::Requirement
2202
+ requirement: &id139 !ruby/object:Gem::Requirement
2045
2203
  none: false
2046
2204
  requirements:
2047
2205
  - - ~>
@@ -2053,11 +2211,11 @@ dependencies:
2053
2211
  - 1
2054
2212
  version: 2.0.1
2055
2213
  name: mongoid
2056
- version_requirements: *id129
2214
+ version_requirements: *id139
2057
2215
  - !ruby/object:Gem::Dependency
2058
2216
  prerelease: false
2059
2217
  type: :development
2060
- requirement: &id130 !ruby/object:Gem::Requirement
2218
+ requirement: &id140 !ruby/object:Gem::Requirement
2061
2219
  none: false
2062
2220
  requirements:
2063
2221
  - - ~>
@@ -2069,11 +2227,11 @@ dependencies:
2069
2227
  - 0
2070
2228
  version: 1.3.0
2071
2229
  name: bson
2072
- version_requirements: *id130
2230
+ version_requirements: *id140
2073
2231
  - !ruby/object:Gem::Dependency
2074
2232
  prerelease: false
2075
2233
  type: :development
2076
- requirement: &id131 !ruby/object:Gem::Requirement
2234
+ requirement: &id141 !ruby/object:Gem::Requirement
2077
2235
  none: false
2078
2236
  requirements:
2079
2237
  - - ~>
@@ -2085,11 +2243,11 @@ dependencies:
2085
2243
  - 0
2086
2244
  version: 1.3.0
2087
2245
  name: bson_ext
2088
- version_requirements: *id131
2246
+ version_requirements: *id141
2089
2247
  - !ruby/object:Gem::Dependency
2090
2248
  prerelease: false
2091
2249
  type: :development
2092
- requirement: &id132 !ruby/object:Gem::Requirement
2250
+ requirement: &id142 !ruby/object:Gem::Requirement
2093
2251
  none: false
2094
2252
  requirements:
2095
2253
  - - ~>
@@ -2101,11 +2259,11 @@ dependencies:
2101
2259
  - 0
2102
2260
  version: 2.3.0
2103
2261
  name: rspec
2104
- version_requirements: *id132
2262
+ version_requirements: *id142
2105
2263
  - !ruby/object:Gem::Dependency
2106
2264
  prerelease: false
2107
2265
  type: :development
2108
- requirement: &id133 !ruby/object:Gem::Requirement
2266
+ requirement: &id143 !ruby/object:Gem::Requirement
2109
2267
  none: false
2110
2268
  requirements:
2111
2269
  - - ~>
@@ -2117,11 +2275,11 @@ dependencies:
2117
2275
  - 0
2118
2276
  version: 0.6.0
2119
2277
  name: yard
2120
- version_requirements: *id133
2278
+ version_requirements: *id143
2121
2279
  - !ruby/object:Gem::Dependency
2122
2280
  prerelease: false
2123
2281
  type: :development
2124
- requirement: &id134 !ruby/object:Gem::Requirement
2282
+ requirement: &id144 !ruby/object:Gem::Requirement
2125
2283
  none: false
2126
2284
  requirements:
2127
2285
  - - ~>
@@ -2133,11 +2291,11 @@ dependencies:
2133
2291
  - 0
2134
2292
  version: 1.0.0
2135
2293
  name: bundler
2136
- version_requirements: *id134
2294
+ version_requirements: *id144
2137
2295
  - !ruby/object:Gem::Dependency
2138
2296
  prerelease: false
2139
2297
  type: :development
2140
- requirement: &id135 !ruby/object:Gem::Requirement
2298
+ requirement: &id145 !ruby/object:Gem::Requirement
2141
2299
  none: false
2142
2300
  requirements:
2143
2301
  - - ~>
@@ -2149,11 +2307,11 @@ dependencies:
2149
2307
  - 2
2150
2308
  version: 1.5.2
2151
2309
  name: jeweler
2152
- version_requirements: *id135
2310
+ version_requirements: *id145
2153
2311
  - !ruby/object:Gem::Dependency
2154
2312
  prerelease: false
2155
2313
  type: :development
2156
- requirement: &id136 !ruby/object:Gem::Requirement
2314
+ requirement: &id146 !ruby/object:Gem::Requirement
2157
2315
  none: false
2158
2316
  requirements:
2159
2317
  - - ">="
@@ -2163,11 +2321,11 @@ dependencies:
2163
2321
  - 0
2164
2322
  version: "0"
2165
2323
  name: rcov
2166
- version_requirements: *id136
2324
+ version_requirements: *id146
2167
2325
  - !ruby/object:Gem::Dependency
2168
2326
  prerelease: false
2169
2327
  type: :development
2170
- requirement: &id137 !ruby/object:Gem::Requirement
2328
+ requirement: &id147 !ruby/object:Gem::Requirement
2171
2329
  none: false
2172
2330
  requirements:
2173
2331
  - - "="
@@ -2179,11 +2337,11 @@ dependencies:
2179
2337
  - 1
2180
2338
  version: 1.4.1
2181
2339
  name: mongoid-rspec
2182
- version_requirements: *id137
2340
+ version_requirements: *id147
2183
2341
  - !ruby/object:Gem::Dependency
2184
2342
  prerelease: false
2185
2343
  type: :development
2186
- requirement: &id138 !ruby/object:Gem::Requirement
2344
+ requirement: &id148 !ruby/object:Gem::Requirement
2187
2345
  none: false
2188
2346
  requirements:
2189
2347
  - - "="
@@ -2195,11 +2353,11 @@ dependencies:
2195
2353
  - 4
2196
2354
  version: 0.6.4
2197
2355
  name: database_cleaner
2198
- version_requirements: *id138
2356
+ version_requirements: *id148
2199
2357
  - !ruby/object:Gem::Dependency
2200
2358
  prerelease: false
2201
2359
  type: :development
2202
- requirement: &id139 !ruby/object:Gem::Requirement
2360
+ requirement: &id149 !ruby/object:Gem::Requirement
2203
2361
  none: false
2204
2362
  requirements:
2205
2363
  - - ~>
@@ -2211,7 +2369,7 @@ dependencies:
2211
2369
  - 0
2212
2370
  version: 2.1.0
2213
2371
  name: bluecloth
2214
- version_requirements: *id139
2372
+ version_requirements: *id149
2215
2373
  description: "\n An elasticsearch wrapper for mongoid odm based on slingshot. Makes integration between ElasticSearch full-text \n search engine and Mongoid documents seemless and simple.\n "
2216
2374
  email: omar.mekky@mashsolvents.com
2217
2375
  executables: []