elasticsearch-persistence 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE.txt +10 -19
  3. data/README.md +432 -14
  4. data/Rakefile +56 -0
  5. data/elasticsearch-persistence.gemspec +45 -17
  6. data/examples/sinatra/.gitignore +7 -0
  7. data/examples/sinatra/Gemfile +28 -0
  8. data/examples/sinatra/README.markdown +36 -0
  9. data/examples/sinatra/application.rb +238 -0
  10. data/examples/sinatra/config.ru +7 -0
  11. data/examples/sinatra/test.rb +118 -0
  12. data/lib/elasticsearch/persistence.rb +88 -2
  13. data/lib/elasticsearch/persistence/client.rb +51 -0
  14. data/lib/elasticsearch/persistence/repository.rb +75 -0
  15. data/lib/elasticsearch/persistence/repository/class.rb +71 -0
  16. data/lib/elasticsearch/persistence/repository/find.rb +73 -0
  17. data/lib/elasticsearch/persistence/repository/naming.rb +115 -0
  18. data/lib/elasticsearch/persistence/repository/response/results.rb +90 -0
  19. data/lib/elasticsearch/persistence/repository/search.rb +60 -0
  20. data/lib/elasticsearch/persistence/repository/serialize.rb +31 -0
  21. data/lib/elasticsearch/persistence/repository/store.rb +95 -0
  22. data/lib/elasticsearch/persistence/version.rb +1 -1
  23. data/test/integration/repository/custom_class_test.rb +85 -0
  24. data/test/integration/repository/customized_class_test.rb +82 -0
  25. data/test/integration/repository/default_class_test.rb +108 -0
  26. data/test/integration/repository/virtus_model_test.rb +114 -0
  27. data/test/test_helper.rb +46 -0
  28. data/test/unit/persistence_test.rb +32 -0
  29. data/test/unit/repository_class_test.rb +51 -0
  30. data/test/unit/repository_client_test.rb +32 -0
  31. data/test/unit/repository_find_test.rb +375 -0
  32. data/test/unit/repository_indexing_test.rb +37 -0
  33. data/test/unit/repository_module_test.rb +144 -0
  34. data/test/unit/repository_naming_test.rb +146 -0
  35. data/test/unit/repository_response_results_test.rb +98 -0
  36. data/test/unit/repository_search_test.rb +97 -0
  37. data/test/unit/repository_serialize_test.rb +57 -0
  38. data/test/unit/repository_store_test.rb +287 -0
  39. metadata +288 -20
metadata CHANGED
@@ -1,36 +1,88 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-persistence
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
5
- prerelease:
4
+ version: 0.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Karel Minarik
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-25 00:00:00.000000000 Z
11
+ date: 2014-05-31 00:00:00.000000000 Z
13
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: elasticsearch
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>'
18
+ - !ruby/object:Gem::Version
19
+ version: '0.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>'
25
+ - !ruby/object:Gem::Version
26
+ version: '0.4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: elasticsearch-model
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>'
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>'
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: hashie
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
14
69
  - !ruby/object:Gem::Dependency
15
70
  name: bundler
16
71
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
72
  requirements:
19
73
  - - ~>
20
74
  - !ruby/object:Gem::Version
21
- version: '1.3'
75
+ version: '1.5'
22
76
  type: :development
23
77
  prerelease: false
24
78
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
79
  requirements:
27
80
  - - ~>
28
81
  - !ruby/object:Gem::Version
29
- version: '1.3'
82
+ version: '1.5'
30
83
  - !ruby/object:Gem::Dependency
31
84
  name: rake
32
85
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
86
  requirements:
35
87
  - - ! '>='
36
88
  - !ruby/object:Gem::Version
@@ -38,17 +90,186 @@ dependencies:
38
90
  type: :development
39
91
  prerelease: false
40
92
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
93
  requirements:
43
94
  - - ! '>='
44
95
  - !ruby/object:Gem::Version
45
96
  version: '0'
46
- description: Elasticsearch persistence (WIP)
97
+ - !ruby/object:Gem::Dependency
98
+ name: oj
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: virtus
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: elasticsearch-extensions
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: shoulda-context
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ! '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: mocha
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: turn
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ! '>='
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: yard
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ! '>='
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ! '>='
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: ruby-prof
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ! '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ! '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: pry
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ! '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ! '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: ci_reporter
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ! '>='
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: simplecov
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ! '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ! '>='
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: cane
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ! '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - ! '>='
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
265
+ description: Persistence layer for Ruby models and Elasticsearch.
47
266
  email:
48
267
  - karel.minarik@elasticsearch.org
49
268
  executables: []
50
269
  extensions: []
51
- extra_rdoc_files: []
270
+ extra_rdoc_files:
271
+ - README.md
272
+ - LICENSE.txt
52
273
  files:
53
274
  - .gitignore
54
275
  - Gemfile
@@ -56,32 +277,79 @@ files:
56
277
  - README.md
57
278
  - Rakefile
58
279
  - elasticsearch-persistence.gemspec
280
+ - examples/sinatra/.gitignore
281
+ - examples/sinatra/Gemfile
282
+ - examples/sinatra/README.markdown
283
+ - examples/sinatra/application.rb
284
+ - examples/sinatra/config.ru
285
+ - examples/sinatra/test.rb
59
286
  - lib/elasticsearch/persistence.rb
287
+ - lib/elasticsearch/persistence/client.rb
288
+ - lib/elasticsearch/persistence/repository.rb
289
+ - lib/elasticsearch/persistence/repository/class.rb
290
+ - lib/elasticsearch/persistence/repository/find.rb
291
+ - lib/elasticsearch/persistence/repository/naming.rb
292
+ - lib/elasticsearch/persistence/repository/response/results.rb
293
+ - lib/elasticsearch/persistence/repository/search.rb
294
+ - lib/elasticsearch/persistence/repository/serialize.rb
295
+ - lib/elasticsearch/persistence/repository/store.rb
60
296
  - lib/elasticsearch/persistence/version.rb
61
- homepage: ''
297
+ - test/integration/repository/custom_class_test.rb
298
+ - test/integration/repository/customized_class_test.rb
299
+ - test/integration/repository/default_class_test.rb
300
+ - test/integration/repository/virtus_model_test.rb
301
+ - test/test_helper.rb
302
+ - test/unit/persistence_test.rb
303
+ - test/unit/repository_class_test.rb
304
+ - test/unit/repository_client_test.rb
305
+ - test/unit/repository_find_test.rb
306
+ - test/unit/repository_indexing_test.rb
307
+ - test/unit/repository_module_test.rb
308
+ - test/unit/repository_naming_test.rb
309
+ - test/unit/repository_response_results_test.rb
310
+ - test/unit/repository_search_test.rb
311
+ - test/unit/repository_serialize_test.rb
312
+ - test/unit/repository_store_test.rb
313
+ homepage: https://github.com/elasticsearch/elasticsearch-rails/
62
314
  licenses:
63
315
  - Apache 2
316
+ metadata: {}
64
317
  post_install_message:
65
- rdoc_options: []
318
+ rdoc_options:
319
+ - --charset=UTF-8
66
320
  require_paths:
67
321
  - lib
68
322
  required_ruby_version: !ruby/object:Gem::Requirement
69
- none: false
70
323
  requirements:
71
324
  - - ! '>='
72
325
  - !ruby/object:Gem::Version
73
- version: '0'
326
+ version: 1.9.3
74
327
  required_rubygems_version: !ruby/object:Gem::Requirement
75
- none: false
76
328
  requirements:
77
329
  - - ! '>='
78
330
  - !ruby/object:Gem::Version
79
331
  version: '0'
80
332
  requirements: []
81
333
  rubyforge_project:
82
- rubygems_version: 1.8.23
334
+ rubygems_version: 2.2.2
83
335
  signing_key:
84
- specification_version: 3
85
- summary: Elasticsearch persistence (WIP)
86
- test_files: []
336
+ specification_version: 4
337
+ summary: Persistence layer for Ruby models and Elasticsearch.
338
+ test_files:
339
+ - test/integration/repository/custom_class_test.rb
340
+ - test/integration/repository/customized_class_test.rb
341
+ - test/integration/repository/default_class_test.rb
342
+ - test/integration/repository/virtus_model_test.rb
343
+ - test/test_helper.rb
344
+ - test/unit/persistence_test.rb
345
+ - test/unit/repository_class_test.rb
346
+ - test/unit/repository_client_test.rb
347
+ - test/unit/repository_find_test.rb
348
+ - test/unit/repository_indexing_test.rb
349
+ - test/unit/repository_module_test.rb
350
+ - test/unit/repository_naming_test.rb
351
+ - test/unit/repository_response_results_test.rb
352
+ - test/unit/repository_search_test.rb
353
+ - test/unit/repository_serialize_test.rb
354
+ - test/unit/repository_store_test.rb
87
355
  has_rdoc: