elastictastic 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. data/LICENSE +19 -0
  2. data/README.md +326 -0
  3. data/lib/elastictastic/association.rb +21 -0
  4. data/lib/elastictastic/bulk_persistence_strategy.rb +70 -0
  5. data/lib/elastictastic/callbacks.rb +30 -0
  6. data/lib/elastictastic/child_collection_proxy.rb +56 -0
  7. data/lib/elastictastic/client.rb +101 -0
  8. data/lib/elastictastic/configuration.rb +35 -0
  9. data/lib/elastictastic/dirty.rb +130 -0
  10. data/lib/elastictastic/discrete_persistence_strategy.rb +52 -0
  11. data/lib/elastictastic/document.rb +98 -0
  12. data/lib/elastictastic/errors.rb +7 -0
  13. data/lib/elastictastic/field.rb +38 -0
  14. data/lib/elastictastic/index.rb +19 -0
  15. data/lib/elastictastic/mass_assignment_security.rb +15 -0
  16. data/lib/elastictastic/middleware.rb +119 -0
  17. data/lib/elastictastic/nested_document.rb +29 -0
  18. data/lib/elastictastic/new_relic_instrumentation.rb +26 -0
  19. data/lib/elastictastic/observer.rb +3 -0
  20. data/lib/elastictastic/observing.rb +21 -0
  21. data/lib/elastictastic/parent_child.rb +115 -0
  22. data/lib/elastictastic/persistence.rb +67 -0
  23. data/lib/elastictastic/properties.rb +236 -0
  24. data/lib/elastictastic/railtie.rb +35 -0
  25. data/lib/elastictastic/resource.rb +4 -0
  26. data/lib/elastictastic/scope.rb +283 -0
  27. data/lib/elastictastic/scope_builder.rb +32 -0
  28. data/lib/elastictastic/scoped.rb +20 -0
  29. data/lib/elastictastic/search.rb +180 -0
  30. data/lib/elastictastic/server_error.rb +15 -0
  31. data/lib/elastictastic/test_helpers.rb +172 -0
  32. data/lib/elastictastic/util.rb +63 -0
  33. data/lib/elastictastic/validations.rb +45 -0
  34. data/lib/elastictastic/version.rb +3 -0
  35. data/lib/elastictastic.rb +82 -0
  36. data/spec/environment.rb +6 -0
  37. data/spec/examples/active_model_lint_spec.rb +20 -0
  38. data/spec/examples/bulk_persistence_strategy_spec.rb +233 -0
  39. data/spec/examples/callbacks_spec.rb +96 -0
  40. data/spec/examples/dirty_spec.rb +238 -0
  41. data/spec/examples/document_spec.rb +600 -0
  42. data/spec/examples/mass_assignment_security_spec.rb +13 -0
  43. data/spec/examples/middleware_spec.rb +92 -0
  44. data/spec/examples/observing_spec.rb +141 -0
  45. data/spec/examples/parent_child_spec.rb +308 -0
  46. data/spec/examples/properties_spec.rb +92 -0
  47. data/spec/examples/scope_spec.rb +491 -0
  48. data/spec/examples/search_spec.rb +382 -0
  49. data/spec/examples/spec_helper.rb +15 -0
  50. data/spec/examples/validation_spec.rb +65 -0
  51. data/spec/models/author.rb +9 -0
  52. data/spec/models/blog.rb +5 -0
  53. data/spec/models/comment.rb +5 -0
  54. data/spec/models/post.rb +41 -0
  55. data/spec/models/post_observer.rb +11 -0
  56. data/spec/support/fakeweb_request_history.rb +13 -0
  57. metadata +227 -0
metadata ADDED
@@ -0,0 +1,227 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: elastictastic
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mat Brown
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-08 00:00:00.000000000 -05:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: &16448500 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '3.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *16448500
26
+ - !ruby/object:Gem::Dependency
27
+ name: activemodel
28
+ requirement: &16609920 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *16609920
37
+ - !ruby/object:Gem::Dependency
38
+ name: hashie
39
+ requirement: &16687040 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *16687040
48
+ - !ruby/object:Gem::Dependency
49
+ name: i18n
50
+ requirement: &16794940 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *16794940
59
+ - !ruby/object:Gem::Dependency
60
+ name: faraday
61
+ requirement: &16921840 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: '0.7'
67
+ type: :runtime
68
+ prerelease: false
69
+ version_requirements: *16921840
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec
72
+ requirement: &17079700 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '2.0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: *17079700
81
+ - !ruby/object:Gem::Dependency
82
+ name: rspec-unit
83
+ requirement: &17284000 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ~>
87
+ - !ruby/object:Gem::Version
88
+ version: '1.1'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *17284000
92
+ - !ruby/object:Gem::Dependency
93
+ name: fakeweb
94
+ requirement: &17697540 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ~>
98
+ - !ruby/object:Gem::Version
99
+ version: '1.3'
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: *17697540
103
+ - !ruby/object:Gem::Dependency
104
+ name: ruby-debug19
105
+ requirement: &18597020 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '0.11'
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *18597020
114
+ description: ! 'Elastictastic is an object-document mapper and lightweight API adapter
115
+ for
116
+
117
+ ElasticSearch. Elastictastic''s primary use case is to define model classes which
118
+
119
+ use ElasticSearch as a primary document-oriented data store, and to expose
120
+
121
+ ElasticSearch''s search functionality to query for those models.
122
+
123
+ '
124
+ email: mat.a.brown@gmail.com
125
+ executables: []
126
+ extensions: []
127
+ extra_rdoc_files:
128
+ - README.md
129
+ files:
130
+ - lib/elastictastic.rb
131
+ - lib/elastictastic/field.rb
132
+ - lib/elastictastic/util.rb
133
+ - lib/elastictastic/properties.rb
134
+ - lib/elastictastic/client.rb
135
+ - lib/elastictastic/test_helpers.rb
136
+ - lib/elastictastic/association.rb
137
+ - lib/elastictastic/scope.rb
138
+ - lib/elastictastic/scoped.rb
139
+ - lib/elastictastic/new_relic_instrumentation.rb
140
+ - lib/elastictastic/child_collection_proxy.rb
141
+ - lib/elastictastic/callbacks.rb
142
+ - lib/elastictastic/server_error.rb
143
+ - lib/elastictastic/discrete_persistence_strategy.rb
144
+ - lib/elastictastic/version.rb
145
+ - lib/elastictastic/scope_builder.rb
146
+ - lib/elastictastic/observing.rb
147
+ - lib/elastictastic/resource.rb
148
+ - lib/elastictastic/configuration.rb
149
+ - lib/elastictastic/nested_document.rb
150
+ - lib/elastictastic/dirty.rb
151
+ - lib/elastictastic/document.rb
152
+ - lib/elastictastic/persistence.rb
153
+ - lib/elastictastic/index.rb
154
+ - lib/elastictastic/search.rb
155
+ - lib/elastictastic/mass_assignment_security.rb
156
+ - lib/elastictastic/parent_child.rb
157
+ - lib/elastictastic/observer.rb
158
+ - lib/elastictastic/middleware.rb
159
+ - lib/elastictastic/errors.rb
160
+ - lib/elastictastic/validations.rb
161
+ - lib/elastictastic/railtie.rb
162
+ - lib/elastictastic/bulk_persistence_strategy.rb
163
+ - spec/examples/observing_spec.rb
164
+ - spec/examples/bulk_persistence_strategy_spec.rb
165
+ - spec/examples/dirty_spec.rb
166
+ - spec/examples/parent_child_spec.rb
167
+ - spec/examples/validation_spec.rb
168
+ - spec/examples/spec_helper.rb
169
+ - spec/examples/middleware_spec.rb
170
+ - spec/examples/active_model_lint_spec.rb
171
+ - spec/examples/search_spec.rb
172
+ - spec/examples/scope_spec.rb
173
+ - spec/examples/properties_spec.rb
174
+ - spec/examples/mass_assignment_security_spec.rb
175
+ - spec/examples/document_spec.rb
176
+ - spec/examples/callbacks_spec.rb
177
+ - spec/support/fakeweb_request_history.rb
178
+ - spec/environment.rb
179
+ - spec/models/comment.rb
180
+ - spec/models/author.rb
181
+ - spec/models/post_observer.rb
182
+ - spec/models/blog.rb
183
+ - spec/models/post.rb
184
+ - README.md
185
+ - LICENSE
186
+ has_rdoc: true
187
+ homepage:
188
+ licenses:
189
+ - MIT
190
+ post_install_message:
191
+ rdoc_options: []
192
+ require_paths:
193
+ - lib
194
+ required_ruby_version: !ruby/object:Gem::Requirement
195
+ none: false
196
+ requirements:
197
+ - - ! '>='
198
+ - !ruby/object:Gem::Version
199
+ version: '1.9'
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ requirements:
207
+ - ElasticSearch
208
+ rubyforge_project:
209
+ rubygems_version: 1.6.2
210
+ signing_key:
211
+ specification_version: 3
212
+ summary: Object-document mapper for ElasticSearch
213
+ test_files:
214
+ - spec/examples/observing_spec.rb
215
+ - spec/examples/bulk_persistence_strategy_spec.rb
216
+ - spec/examples/dirty_spec.rb
217
+ - spec/examples/parent_child_spec.rb
218
+ - spec/examples/validation_spec.rb
219
+ - spec/examples/spec_helper.rb
220
+ - spec/examples/middleware_spec.rb
221
+ - spec/examples/active_model_lint_spec.rb
222
+ - spec/examples/search_spec.rb
223
+ - spec/examples/scope_spec.rb
224
+ - spec/examples/properties_spec.rb
225
+ - spec/examples/mass_assignment_security_spec.rb
226
+ - spec/examples/document_spec.rb
227
+ - spec/examples/callbacks_spec.rb