elastic_adapter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +41 -0
  7. data/Rakefile +24 -0
  8. data/elastic_adapter.gemspec +30 -0
  9. data/example.env +4 -0
  10. data/lib/elastic_adapter/decoration/count_response.rb +18 -0
  11. data/lib/elastic_adapter/decoration/decorator.rb +39 -0
  12. data/lib/elastic_adapter/decoration/hit_decorator.rb +25 -0
  13. data/lib/elastic_adapter/decoration/response_decorator_factory.rb +51 -0
  14. data/lib/elastic_adapter/decoration/search_response.rb +29 -0
  15. data/lib/elastic_adapter/decoration/suggestion_response.rb +25 -0
  16. data/lib/elastic_adapter/decoration/validation_response.rb +16 -0
  17. data/lib/elastic_adapter/document_type.rb +21 -0
  18. data/lib/elastic_adapter/index.rb +108 -0
  19. data/lib/elastic_adapter/response.rb +57 -0
  20. data/lib/elastic_adapter/version.rb +3 -0
  21. data/lib/elastic_adapter.rb +21 -0
  22. data/spec/cassettes/ElasticAdapter_Index/_count/empty_index/is_a_response.yml +30 -0
  23. data/spec/cassettes/ElasticAdapter_Index/_count/empty_index/returs_the_amount_of_all_documents.yml +30 -0
  24. data/spec/cassettes/ElasticAdapter_Index/_count/not_empty_index/is_a_response.yml +30 -0
  25. data/spec/cassettes/ElasticAdapter_Index/_count/not_empty_index/returns_1.yml +30 -0
  26. data/spec/cassettes/ElasticAdapter_Index/_create_index/index_is_present/response/has_an_exception.yml +30 -0
  27. data/spec/cassettes/ElasticAdapter_Index/_create_index/index_is_present/response/is_a_Response.yml +30 -0
  28. data/spec/cassettes/ElasticAdapter_Index/_create_index/index_not_present/response/has_no_exception.yml +57 -0
  29. data/spec/cassettes/ElasticAdapter_Index/_create_index/index_not_present/response/is_a_Response.yml +57 -0
  30. data/spec/cassettes/ElasticAdapter_Index/_delete_index/index_not_present/repsonse/has_an_exception.yml +30 -0
  31. data/spec/cassettes/ElasticAdapter_Index/_delete_index/index_not_present/repsonse/is_a_Response.yml +30 -0
  32. data/spec/cassettes/ElasticAdapter_Index/_delete_index/index_present/repsonse/has_no_exception.yml +57 -0
  33. data/spec/cassettes/ElasticAdapter_Index/_delete_index/index_present/repsonse/is_a_Response.yml +57 -0
  34. data/spec/cassettes/ElasticAdapter_Index/_get/document_exists/response/contains_the_document.yml +30 -0
  35. data/spec/cassettes/ElasticAdapter_Index/_index/existing_document/doesn_t_change_the_document_count.yml +84 -0
  36. data/spec/cassettes/ElasticAdapter_Index/_index/existing_document/invokes_to_hash_on_the_document.yml +30 -0
  37. data/spec/cassettes/ElasticAdapter_Index/_index/existing_document/updates_the_document.yml +30 -0
  38. data/spec/cassettes/ElasticAdapter_Index/_index/new_document/indexes_a_document.yml +57 -0
  39. data/spec/cassettes/ElasticAdapter_Index/_index/new_document/invokes_to_hash_on_the_document.yml +30 -0
  40. data/spec/cassettes/ElasticAdapter_Index/_search/match_all/returns_all_documents.yml +30 -0
  41. data/spec/cassettes/ElasticAdapter_Index/_search/zoo/returns_one_document.yml +30 -0
  42. data/spec/cassettes/ElasticAdapter_Index/_search/zoo/returns_the_wanted_document.yml +30 -0
  43. data/spec/cassettes/ElasticAdapter_Index/_suggest/query_ba_/returns_bar.yml +30 -0
  44. data/spec/cassettes/ElasticAdapter_Index/_suggest/query_ba_/returns_one_result.yml +30 -0
  45. data/spec/cassettes/ElasticAdapter_Index/_validate/invalid_query/is_a_response.yml +30 -0
  46. data/spec/cassettes/ElasticAdapter_Index/_validate/invalid_query/is_false.yml +31 -0
  47. data/spec/cassettes/ElasticAdapter_Index/_validate/valid_query/is_a_response.yml +30 -0
  48. data/spec/cassettes/ElasticAdapter_Index/_validate/valid_query/is_true.yml +30 -0
  49. data/spec/decoration/response_decorator_factory_spec.rb +75 -0
  50. data/spec/document_type_spec.rb +42 -0
  51. data/spec/elastic_adapter_spec.rb +4 -0
  52. data/spec/index_spec.rb +458 -0
  53. data/spec/response_spec.rb +80 -0
  54. data/spec/spec_helper.rb +102 -0
  55. metadata +243 -0
metadata ADDED
@@ -0,0 +1,243 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: elastic_adapter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kristopher Bredemeier
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-05 00:00:00.000000000 Z
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: 1.0.6
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 3.1.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 3.1.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: vcr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 2.9.3
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 2.9.3
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.20.4
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.20.4
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.0.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.0.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: yard
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.8.7.6
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.8.7.6
125
+ description: Repository like access to elasticseach indices
126
+ email:
127
+ - k.bredemeier@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - Gemfile
135
+ - LICENSE.txt
136
+ - README.md
137
+ - Rakefile
138
+ - elastic_adapter.gemspec
139
+ - example.env
140
+ - lib/elastic_adapter.rb
141
+ - lib/elastic_adapter/decoration/count_response.rb
142
+ - lib/elastic_adapter/decoration/decorator.rb
143
+ - lib/elastic_adapter/decoration/hit_decorator.rb
144
+ - lib/elastic_adapter/decoration/response_decorator_factory.rb
145
+ - lib/elastic_adapter/decoration/search_response.rb
146
+ - lib/elastic_adapter/decoration/suggestion_response.rb
147
+ - lib/elastic_adapter/decoration/validation_response.rb
148
+ - lib/elastic_adapter/document_type.rb
149
+ - lib/elastic_adapter/index.rb
150
+ - lib/elastic_adapter/response.rb
151
+ - lib/elastic_adapter/version.rb
152
+ - spec/cassettes/ElasticAdapter_Index/_count/empty_index/is_a_response.yml
153
+ - spec/cassettes/ElasticAdapter_Index/_count/empty_index/returs_the_amount_of_all_documents.yml
154
+ - spec/cassettes/ElasticAdapter_Index/_count/not_empty_index/is_a_response.yml
155
+ - spec/cassettes/ElasticAdapter_Index/_count/not_empty_index/returns_1.yml
156
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_is_present/response/has_an_exception.yml
157
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_is_present/response/is_a_Response.yml
158
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_not_present/response/has_no_exception.yml
159
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_not_present/response/is_a_Response.yml
160
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_not_present/repsonse/has_an_exception.yml
161
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_not_present/repsonse/is_a_Response.yml
162
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_present/repsonse/has_no_exception.yml
163
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_present/repsonse/is_a_Response.yml
164
+ - spec/cassettes/ElasticAdapter_Index/_get/document_exists/response/contains_the_document.yml
165
+ - spec/cassettes/ElasticAdapter_Index/_index/existing_document/doesn_t_change_the_document_count.yml
166
+ - spec/cassettes/ElasticAdapter_Index/_index/existing_document/invokes_to_hash_on_the_document.yml
167
+ - spec/cassettes/ElasticAdapter_Index/_index/existing_document/updates_the_document.yml
168
+ - spec/cassettes/ElasticAdapter_Index/_index/new_document/indexes_a_document.yml
169
+ - spec/cassettes/ElasticAdapter_Index/_index/new_document/invokes_to_hash_on_the_document.yml
170
+ - spec/cassettes/ElasticAdapter_Index/_search/match_all/returns_all_documents.yml
171
+ - spec/cassettes/ElasticAdapter_Index/_search/zoo/returns_one_document.yml
172
+ - spec/cassettes/ElasticAdapter_Index/_search/zoo/returns_the_wanted_document.yml
173
+ - spec/cassettes/ElasticAdapter_Index/_suggest/query_ba_/returns_bar.yml
174
+ - spec/cassettes/ElasticAdapter_Index/_suggest/query_ba_/returns_one_result.yml
175
+ - spec/cassettes/ElasticAdapter_Index/_validate/invalid_query/is_a_response.yml
176
+ - spec/cassettes/ElasticAdapter_Index/_validate/invalid_query/is_false.yml
177
+ - spec/cassettes/ElasticAdapter_Index/_validate/valid_query/is_a_response.yml
178
+ - spec/cassettes/ElasticAdapter_Index/_validate/valid_query/is_true.yml
179
+ - spec/decoration/response_decorator_factory_spec.rb
180
+ - spec/document_type_spec.rb
181
+ - spec/elastic_adapter_spec.rb
182
+ - spec/index_spec.rb
183
+ - spec/response_spec.rb
184
+ - spec/spec_helper.rb
185
+ homepage: https://github.com/kbredemeier/elastic_adatper
186
+ licenses:
187
+ - MIT
188
+ metadata: {}
189
+ post_install_message:
190
+ rdoc_options: []
191
+ require_paths:
192
+ - lib
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ requirements: []
204
+ rubyforge_project:
205
+ rubygems_version: 2.2.2
206
+ signing_key:
207
+ specification_version: 4
208
+ summary: Repository like access to elasticseach indices
209
+ test_files:
210
+ - spec/cassettes/ElasticAdapter_Index/_count/empty_index/is_a_response.yml
211
+ - spec/cassettes/ElasticAdapter_Index/_count/empty_index/returs_the_amount_of_all_documents.yml
212
+ - spec/cassettes/ElasticAdapter_Index/_count/not_empty_index/is_a_response.yml
213
+ - spec/cassettes/ElasticAdapter_Index/_count/not_empty_index/returns_1.yml
214
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_is_present/response/has_an_exception.yml
215
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_is_present/response/is_a_Response.yml
216
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_not_present/response/has_no_exception.yml
217
+ - spec/cassettes/ElasticAdapter_Index/_create_index/index_not_present/response/is_a_Response.yml
218
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_not_present/repsonse/has_an_exception.yml
219
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_not_present/repsonse/is_a_Response.yml
220
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_present/repsonse/has_no_exception.yml
221
+ - spec/cassettes/ElasticAdapter_Index/_delete_index/index_present/repsonse/is_a_Response.yml
222
+ - spec/cassettes/ElasticAdapter_Index/_get/document_exists/response/contains_the_document.yml
223
+ - spec/cassettes/ElasticAdapter_Index/_index/existing_document/doesn_t_change_the_document_count.yml
224
+ - spec/cassettes/ElasticAdapter_Index/_index/existing_document/invokes_to_hash_on_the_document.yml
225
+ - spec/cassettes/ElasticAdapter_Index/_index/existing_document/updates_the_document.yml
226
+ - spec/cassettes/ElasticAdapter_Index/_index/new_document/indexes_a_document.yml
227
+ - spec/cassettes/ElasticAdapter_Index/_index/new_document/invokes_to_hash_on_the_document.yml
228
+ - spec/cassettes/ElasticAdapter_Index/_search/match_all/returns_all_documents.yml
229
+ - spec/cassettes/ElasticAdapter_Index/_search/zoo/returns_one_document.yml
230
+ - spec/cassettes/ElasticAdapter_Index/_search/zoo/returns_the_wanted_document.yml
231
+ - spec/cassettes/ElasticAdapter_Index/_suggest/query_ba_/returns_bar.yml
232
+ - spec/cassettes/ElasticAdapter_Index/_suggest/query_ba_/returns_one_result.yml
233
+ - spec/cassettes/ElasticAdapter_Index/_validate/invalid_query/is_a_response.yml
234
+ - spec/cassettes/ElasticAdapter_Index/_validate/invalid_query/is_false.yml
235
+ - spec/cassettes/ElasticAdapter_Index/_validate/valid_query/is_a_response.yml
236
+ - spec/cassettes/ElasticAdapter_Index/_validate/valid_query/is_true.yml
237
+ - spec/decoration/response_decorator_factory_spec.rb
238
+ - spec/document_type_spec.rb
239
+ - spec/elastic_adapter_spec.rb
240
+ - spec/index_spec.rb
241
+ - spec/response_spec.rb
242
+ - spec/spec_helper.rb
243
+ has_rdoc: