solidus_searchkick 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +5 -0
  3. data/.gitignore +14 -0
  4. data/.travis.yml +18 -0
  5. data/Gemfile +9 -0
  6. data/Gemfile.lock +404 -0
  7. data/LICENSE +26 -0
  8. data/README.md +78 -0
  9. data/Rakefile +21 -0
  10. data/app/assets/javascripts/spree/backend/spree_searchkick.js +2 -0
  11. data/app/assets/javascripts/spree/frontend/spree_searchkick.js +28 -0
  12. data/app/assets/javascripts/spree/frontend/typeahead.bundle.js +2451 -0
  13. data/app/assets/stylesheets/spree/backend/spree_searchkick.css +4 -0
  14. data/app/assets/stylesheets/spree/frontend/spree_searchkick.css +47 -0
  15. data/app/controllers/spree/products_controller_decorator.rb +7 -0
  16. data/app/helpers/spree/products_helper_decorator.rb +9 -0
  17. data/app/models/spree/order_decorator.rb +8 -0
  18. data/app/models/spree/product_decorator.rb +57 -0
  19. data/app/models/spree/property_decorator.rb +7 -0
  20. data/app/models/spree/taxonomy_decorator.rb +7 -0
  21. data/app/overrides/spree/admin/properties/_form/add_filterable_to_property_form.html.erb.deface +8 -0
  22. data/app/overrides/spree/admin/taxonomies/_form/add_filterable_to_taxonomy_form.html.erb.deface +6 -0
  23. data/app/views/spree/shared/_es_filter.html.erb +15 -0
  24. data/app/views/spree/shared/_filters.html.erb +12 -0
  25. data/bin/rails +7 -0
  26. data/config/locales/en.yml +5 -0
  27. data/config/routes.rb +6 -0
  28. data/db/migrate/20150819222417_add_filtrable_to_spree_taxonomies.rb +5 -0
  29. data/db/migrate/20151009155442_add_filterable_to_spree_property.rb +5 -0
  30. data/lib/generators/spree_searchkick/install/install_generator.rb +31 -0
  31. data/lib/solidus_searchkick.rb +2 -0
  32. data/lib/solidus_searchkick/engine.rb +23 -0
  33. data/lib/solidus_searchkick/factories.rb +6 -0
  34. data/lib/solidus_searchkick/version.rb +3 -0
  35. data/lib/spree/core/searchkick_filters.rb +50 -0
  36. data/lib/spree/search/searchkick.rb +58 -0
  37. data/solidus_searchkick.gemspec +38 -0
  38. data/spec/controllers/spree/products_controller_spec.rb +5 -0
  39. data/spec/lib/spree/search/searchkick_spec.rb +43 -0
  40. data/spec/models/spree/order_spec.rb +20 -0
  41. data/spec/models/spree/product_spec.rb +37 -0
  42. data/spec/models/spree/property_spec.rb +11 -0
  43. data/spec/models/spree/taxonomy_spec.rb +11 -0
  44. data/spec/routing/spree/products_routes_spec.rb +20 -0
  45. data/spec/spec_helper.rb +92 -0
  46. metadata +313 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f30fff68875027413d67bf0db833bb21a7078577
4
+ data.tar.gz: a0726e7fda9050afe3a1d1fbb4fff2da71a8a1cf
5
+ SHA512:
6
+ metadata.gz: 5be22ce9869a9bd00b23ac5723c3a3725e463ac6f83159c8f009cd7ec39858a515690a62c4ed853887ff28ab054abdbb46f485f4c48da3291e392b8b95559d9a
7
+ data.tar.gz: 661f82be3ef9a9d31644c79577eea985a8d45c38afdcde525c78decf726f82b7990a6a67fd4be05361c0b6ffe896f7157f86e2e1ccdbeea8c9ec4534d2b30239
data/.codeclimate.yml ADDED
@@ -0,0 +1,5 @@
1
+ languages:
2
+ Ruby: true
3
+ JavaScript: true
4
+ exclude_paths:
5
+ - 'app/assets/javascripts/spree/frontend/typeahead.bundle.js'
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ \#*
2
+ *~
3
+ .#*
4
+ .DS_Store
5
+ .idea
6
+ .project
7
+ .sass-cache
8
+ coverage
9
+ Gemfile.lock
10
+ tmp
11
+ nbproject
12
+ pkg
13
+ *.swp
14
+ spec/dummy
data/.travis.yml ADDED
@@ -0,0 +1,18 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+
5
+ services:
6
+ - elasticsearch
7
+
8
+ sudo: false
9
+ cache: bundler
10
+
11
+ before_script:
12
+ - bundle exec rake test_app
13
+ script:
14
+ - bundle exec rspec spec
15
+
16
+ addons:
17
+ code_climate:
18
+ repo_token: 6cf4ba2d4eb65b2ea59982e9c888a9fd6eb6b2b9ab035f58086c06d5adb16e4a
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'solidus', '~> 1.4.0'
4
+ gem 'solidus_auth_devise'
5
+ gem 'searchkick', '>= 1.2'
6
+
7
+ gem 'codeclimate-test-reporter', group: :test, require: nil
8
+
9
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,404 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ solidus_searchkick (0.1.0)
5
+ searchkick (~> 1.2)
6
+ solidus (~> 1.4, >= 1.4.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.2.7.1)
12
+ actionpack (= 4.2.7.1)
13
+ actionview (= 4.2.7.1)
14
+ activejob (= 4.2.7.1)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.7.1)
18
+ actionview (= 4.2.7.1)
19
+ activesupport (= 4.2.7.1)
20
+ rack (~> 1.6)
21
+ rack-test (~> 0.6.2)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ actionview (4.2.7.1)
25
+ activesupport (= 4.2.7.1)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
+ activejob (4.2.7.1)
31
+ activesupport (= 4.2.7.1)
32
+ globalid (>= 0.3.0)
33
+ activemerchant (1.60.0)
34
+ activesupport (>= 3.2.14, < 5.1)
35
+ builder (>= 2.1.2, < 4.0.0)
36
+ i18n (>= 0.6.9)
37
+ nokogiri (~> 1.4)
38
+ activemodel (4.2.7.1)
39
+ activesupport (= 4.2.7.1)
40
+ builder (~> 3.1)
41
+ activerecord (4.2.7.1)
42
+ activemodel (= 4.2.7.1)
43
+ activesupport (= 4.2.7.1)
44
+ arel (~> 6.0)
45
+ activesupport (4.2.7.1)
46
+ i18n (~> 0.7)
47
+ json (~> 1.7, >= 1.7.7)
48
+ minitest (~> 5.1)
49
+ thread_safe (~> 0.3, >= 0.3.4)
50
+ tzinfo (~> 1.1)
51
+ acts_as_list (0.8.2)
52
+ activerecord (>= 3.0)
53
+ addressable (2.4.0)
54
+ arel (6.0.3)
55
+ awesome_nested_set (3.1.1)
56
+ activerecord (>= 4.0.0, < 5.1)
57
+ bcrypt (3.1.11)
58
+ better_errors (2.1.1)
59
+ coderay (>= 1.0.0)
60
+ erubis (>= 2.6.6)
61
+ rack (>= 0.9.0)
62
+ binding_of_caller (0.7.2)
63
+ debug_inspector (>= 0.0.1)
64
+ bourbon (4.2.7)
65
+ sass (~> 3.4)
66
+ thor (~> 0.19)
67
+ builder (3.2.2)
68
+ camertron-eprun (1.1.1)
69
+ cancancan (1.15.0)
70
+ canonical-rails (0.1.1)
71
+ rails (>= 4.1, < 5.1)
72
+ capybara (2.9.1)
73
+ addressable
74
+ mime-types (>= 1.16)
75
+ nokogiri (>= 1.3.3)
76
+ rack (>= 1.0.0)
77
+ rack-test (>= 0.5.4)
78
+ xpath (~> 2.0)
79
+ carmen (1.0.2)
80
+ activesupport (>= 3.0.0)
81
+ childprocess (0.5.9)
82
+ ffi (~> 1.0, >= 1.0.11)
83
+ cldr-plurals-runtime-rb (1.0.1)
84
+ climate_control (0.0.3)
85
+ activesupport (>= 3.0)
86
+ cocaine (0.5.8)
87
+ climate_control (>= 0.0.3, < 1.0)
88
+ codeclimate-test-reporter (0.6.0)
89
+ simplecov (>= 0.7.1, < 1.0.0)
90
+ coderay (1.1.1)
91
+ coffee-rails (4.2.1)
92
+ coffee-script (>= 2.2.0)
93
+ railties (>= 4.0.0, < 5.2.x)
94
+ coffee-script (2.4.1)
95
+ coffee-script-source
96
+ execjs
97
+ coffee-script-source (1.10.0)
98
+ colorize (0.8.1)
99
+ concurrent-ruby (1.0.2)
100
+ css_parser (1.4.5)
101
+ addressable
102
+ database_cleaner (1.5.3)
103
+ debug_inspector (0.0.2)
104
+ deface (1.0.2)
105
+ colorize (>= 0.5.8)
106
+ nokogiri (~> 1.6.0)
107
+ polyglot
108
+ rails (>= 3.1)
109
+ devise (4.2.0)
110
+ bcrypt (~> 3.0)
111
+ orm_adapter (~> 0.1)
112
+ railties (>= 4.1.0, < 5.1)
113
+ responders
114
+ warden (~> 1.2.3)
115
+ devise-encryptable (0.2.0)
116
+ devise (>= 2.1.0)
117
+ diff-lcs (1.2.5)
118
+ docile (1.1.5)
119
+ elasticsearch (2.0.0)
120
+ elasticsearch-api (= 2.0.0)
121
+ elasticsearch-transport (= 2.0.0)
122
+ elasticsearch-api (2.0.0)
123
+ multi_json
124
+ elasticsearch-transport (2.0.0)
125
+ faraday
126
+ multi_json
127
+ erubis (2.7.0)
128
+ execjs (2.7.0)
129
+ factory_girl (4.7.0)
130
+ activesupport (>= 3.0.0)
131
+ faraday (0.9.2)
132
+ multipart-post (>= 1.2, < 3)
133
+ ffaker (2.2.0)
134
+ ffi (1.9.14)
135
+ font-awesome-rails (4.6.3.1)
136
+ railties (>= 3.2, < 5.1)
137
+ friendly_id (5.1.0)
138
+ activerecord (>= 4.0.0)
139
+ globalid (0.3.7)
140
+ activesupport (>= 4.1.0)
141
+ handlebars_assets (0.23.1)
142
+ execjs (~> 2.0)
143
+ multi_json (~> 1.0)
144
+ sprockets (>= 2.0.0)
145
+ tilt (>= 1.2)
146
+ hashie (3.4.6)
147
+ highline (1.6.21)
148
+ htmlentities (4.3.4)
149
+ i18n (0.7.0)
150
+ jquery-rails (4.2.1)
151
+ rails-dom-testing (>= 1, < 3)
152
+ railties (>= 4.2.0)
153
+ thor (>= 0.14, < 2.0)
154
+ jquery-ui-rails (5.0.5)
155
+ railties (>= 3.2.16)
156
+ json (1.8.3)
157
+ kaminari (0.17.0)
158
+ actionpack (>= 3.0.0)
159
+ activesupport (>= 3.0.0)
160
+ loofah (2.0.3)
161
+ nokogiri (>= 1.5.9)
162
+ mail (2.6.4)
163
+ mime-types (>= 1.16, < 4)
164
+ method_source (0.8.2)
165
+ mime-types (3.1)
166
+ mime-types-data (~> 3.2015)
167
+ mime-types-data (3.2016.0521)
168
+ mimemagic (0.3.0)
169
+ mini_portile2 (2.1.0)
170
+ minitest (5.9.1)
171
+ monetize (1.4.0)
172
+ money (~> 6.7)
173
+ money (6.7.1)
174
+ i18n (>= 0.6.4, <= 0.7.0)
175
+ sixarm_ruby_unaccent (>= 1.1.1, < 2)
176
+ multi_json (1.12.1)
177
+ multipart-post (2.0.0)
178
+ nokogiri (1.6.8)
179
+ mini_portile2 (~> 2.1.0)
180
+ pkg-config (~> 1.1.7)
181
+ orm_adapter (0.5.0)
182
+ paperclip (4.3.7)
183
+ activemodel (>= 3.2.0)
184
+ activesupport (>= 3.2.0)
185
+ cocaine (~> 0.5.5)
186
+ mime-types
187
+ mimemagic (= 0.3.0)
188
+ paranoia (2.1.5)
189
+ activerecord (~> 4.0)
190
+ pkg-config (1.1.7)
191
+ polyamorous (1.3.1)
192
+ activerecord (>= 3.0)
193
+ polyglot (0.3.5)
194
+ premailer (1.8.7)
195
+ css_parser (>= 1.4.5)
196
+ htmlentities (>= 4.0.0)
197
+ premailer-rails (1.9.4)
198
+ actionmailer (>= 3, < 6)
199
+ premailer (~> 1.7, >= 1.7.9)
200
+ pry (0.10.4)
201
+ coderay (~> 1.1.0)
202
+ method_source (~> 0.8.1)
203
+ slop (~> 3.4)
204
+ rabl (0.11.8)
205
+ activesupport (>= 2.3.14)
206
+ rack (1.6.4)
207
+ rack-test (0.6.3)
208
+ rack (>= 1.0)
209
+ rails (4.2.7.1)
210
+ actionmailer (= 4.2.7.1)
211
+ actionpack (= 4.2.7.1)
212
+ actionview (= 4.2.7.1)
213
+ activejob (= 4.2.7.1)
214
+ activemodel (= 4.2.7.1)
215
+ activerecord (= 4.2.7.1)
216
+ activesupport (= 4.2.7.1)
217
+ bundler (>= 1.3.0, < 2.0)
218
+ railties (= 4.2.7.1)
219
+ sprockets-rails
220
+ rails-deprecated_sanitizer (1.0.3)
221
+ activesupport (>= 4.2.0.alpha)
222
+ rails-dom-testing (1.0.7)
223
+ activesupport (>= 4.2.0.beta, < 5.0)
224
+ nokogiri (~> 1.6.0)
225
+ rails-deprecated_sanitizer (>= 1.0.1)
226
+ rails-html-sanitizer (1.0.3)
227
+ loofah (~> 2.0)
228
+ railties (4.2.7.1)
229
+ actionpack (= 4.2.7.1)
230
+ activesupport (= 4.2.7.1)
231
+ rake (>= 0.8.7)
232
+ thor (>= 0.18.1, < 2.0)
233
+ rake (11.3.0)
234
+ ransack (1.8.2)
235
+ actionpack (>= 3.0)
236
+ activerecord (>= 3.0)
237
+ activesupport (>= 3.0)
238
+ i18n
239
+ polyamorous (~> 1.3)
240
+ responders (2.3.0)
241
+ railties (>= 4.2.0, < 5.1)
242
+ rspec-core (3.5.3)
243
+ rspec-support (~> 3.5.0)
244
+ rspec-expectations (3.5.0)
245
+ diff-lcs (>= 1.2.0, < 2.0)
246
+ rspec-support (~> 3.5.0)
247
+ rspec-mocks (3.5.0)
248
+ diff-lcs (>= 1.2.0, < 2.0)
249
+ rspec-support (~> 3.5.0)
250
+ rspec-rails (3.5.2)
251
+ actionpack (>= 3.0)
252
+ activesupport (>= 3.0)
253
+ railties (>= 3.0)
254
+ rspec-core (~> 3.5.0)
255
+ rspec-expectations (~> 3.5.0)
256
+ rspec-mocks (~> 3.5.0)
257
+ rspec-support (~> 3.5.0)
258
+ rspec-support (3.5.0)
259
+ rubyzip (1.2.0)
260
+ sass (3.4.22)
261
+ sass-rails (5.0.6)
262
+ railties (>= 4.0.0, < 6)
263
+ sass (~> 3.1)
264
+ sprockets (>= 2.8, < 4.0)
265
+ sprockets-rails (>= 2.0, < 4.0)
266
+ tilt (>= 1.1, < 3)
267
+ searchkick (1.3.5)
268
+ activemodel
269
+ elasticsearch (>= 1)
270
+ hashie
271
+ select2-rails (3.5.9.1)
272
+ thor (~> 0.14)
273
+ selenium-webdriver (2.53.4)
274
+ childprocess (~> 0.5)
275
+ rubyzip (~> 1.0)
276
+ websocket (~> 1.0)
277
+ simplecov (0.12.0)
278
+ docile (~> 1.1.0)
279
+ json (>= 1.8, < 3)
280
+ simplecov-html (~> 0.10.0)
281
+ simplecov-html (0.10.0)
282
+ sixarm_ruby_unaccent (1.1.1)
283
+ slop (3.6.0)
284
+ solidus (1.4.0)
285
+ solidus_api (= 1.4.0)
286
+ solidus_backend (= 1.4.0)
287
+ solidus_core (= 1.4.0)
288
+ solidus_frontend (= 1.4.0)
289
+ solidus_sample (= 1.4.0)
290
+ solidus_api (1.4.0)
291
+ rabl (>= 0.9.4.pre1, < 0.12.0)
292
+ solidus_core (= 1.4.0)
293
+ versioncake (~> 3.0)
294
+ solidus_auth_devise (1.6.1)
295
+ deface (~> 1.0.0)
296
+ devise (~> 4.1)
297
+ devise-encryptable (= 0.2.0)
298
+ json
299
+ multi_json
300
+ solidus_core (>= 1.0.6, < 3)
301
+ solidus_backend (1.4.0)
302
+ bourbon (>= 4, < 6)
303
+ coffee-rails
304
+ font-awesome-rails (~> 4.0)
305
+ handlebars_assets (~> 0.23)
306
+ jquery-rails
307
+ jquery-ui-rails (~> 5.0.0)
308
+ sass-rails
309
+ select2-rails (= 3.5.9.1)
310
+ solidus_api (= 1.4.0)
311
+ solidus_core (= 1.4.0)
312
+ solidus_core (1.4.0)
313
+ activemerchant (~> 1.48)
314
+ acts_as_list (~> 0.3)
315
+ awesome_nested_set (~> 3.0, >= 3.0.1)
316
+ cancancan (~> 1.10)
317
+ carmen (~> 1.0.0)
318
+ ffaker (~> 2.0)
319
+ friendly_id (~> 5.0)
320
+ highline (~> 1.6.18)
321
+ kaminari (~> 0.15, >= 0.15.1)
322
+ monetize (~> 1.1)
323
+ paperclip (~> 4.2)
324
+ paranoia (~> 2.1, >= 2.1.4)
325
+ premailer-rails
326
+ rails (~> 4.2.5)
327
+ ransack (~> 1.6)
328
+ responders
329
+ state_machines-activerecord (~> 0.2)
330
+ stringex (~> 1.5.1)
331
+ truncate_html (~> 0.9, >= 0.9.2)
332
+ twitter_cldr (~> 3.0)
333
+ solidus_frontend (1.4.0)
334
+ canonical-rails (~> 0.1.1)
335
+ coffee-rails
336
+ font-awesome-rails (~> 4.0)
337
+ jquery-rails
338
+ sass-rails
339
+ solidus_api (= 1.4.0)
340
+ solidus_core (= 1.4.0)
341
+ solidus_sample (1.4.0)
342
+ solidus_core (= 1.4.0)
343
+ sprockets (3.7.0)
344
+ concurrent-ruby (~> 1.0)
345
+ rack (> 1, < 3)
346
+ sprockets-rails (3.2.0)
347
+ actionpack (>= 4.0)
348
+ activesupport (>= 4.0)
349
+ sprockets (>= 3.0.0)
350
+ sqlite3 (1.3.11)
351
+ state_machines (0.4.0)
352
+ state_machines-activemodel (0.4.0)
353
+ activemodel (>= 4.1, < 5.1)
354
+ state_machines (>= 0.4.0)
355
+ state_machines-activerecord (0.4.0)
356
+ activerecord (>= 4.1, < 5.1)
357
+ state_machines-activemodel (>= 0.3.0)
358
+ stringex (1.5.1)
359
+ thor (0.19.1)
360
+ thread_safe (0.3.5)
361
+ tilt (2.0.5)
362
+ truncate_html (0.9.3)
363
+ twitter_cldr (3.5.0)
364
+ camertron-eprun
365
+ cldr-plurals-runtime-rb (~> 1.0.0)
366
+ tzinfo
367
+ tzinfo (1.2.2)
368
+ thread_safe (~> 0.1)
369
+ versioncake (3.2.0)
370
+ actionpack (>= 3.2)
371
+ activesupport (>= 3.2)
372
+ railties (>= 3.2)
373
+ tzinfo
374
+ warden (1.2.6)
375
+ rack (>= 1.0)
376
+ websocket (1.2.3)
377
+ xpath (2.0.0)
378
+ nokogiri (~> 1.3)
379
+
380
+ PLATFORMS
381
+ ruby
382
+
383
+ DEPENDENCIES
384
+ better_errors
385
+ binding_of_caller
386
+ capybara (~> 2.4)
387
+ codeclimate-test-reporter
388
+ coffee-rails
389
+ database_cleaner
390
+ factory_girl (~> 4.5)
391
+ ffaker
392
+ pry
393
+ rspec-rails (~> 3.1)
394
+ sass-rails (~> 5.0)
395
+ searchkick (>= 1.2)
396
+ selenium-webdriver
397
+ simplecov
398
+ solidus (~> 1.4.0)
399
+ solidus_auth_devise
400
+ solidus_searchkick!
401
+ sqlite3
402
+
403
+ BUNDLED WITH
404
+ 1.13.1