solidus_reviews 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +322 -0
- data/.travis.yml +27 -14
- data/Gemfile +23 -8
- data/LICENSE.md +2 -2
- data/README.md +9 -11
- data/Rakefile +2 -0
- data/app/controllers/spree/admin/feedback_reviews_controller.rb +3 -1
- data/app/controllers/spree/admin/review_settings_controller.rb +3 -1
- data/app/controllers/spree/admin/reviews_controller.rb +9 -6
- data/app/controllers/spree/feedback_reviews_controller.rb +25 -19
- data/app/controllers/spree/products_controller_decorator.rb +2 -0
- data/app/controllers/spree/reviews_controller.rb +11 -7
- data/app/helpers/spree/api/api_helpers_decorator.rb +12 -0
- data/app/helpers/spree/reviews_helper.rb +15 -5
- data/app/models/spree/feedback_review.rb +5 -4
- data/app/models/spree/product_decorator.rb +5 -4
- data/app/models/spree/review.rb +28 -10
- data/app/models/spree/reviews_ability.rb +17 -3
- data/app/models/spree/reviews_configuration.rb +16 -8
- data/app/models/spree/user_decorator.rb +3 -0
- data/app/overrides/add_reviews_after_product_properties.rb +7 -5
- data/app/overrides/add_reviews_tab_to_admin.rb +12 -4
- data/app/overrides/add_reviews_to_admin_configuration_sidebar.rb +13 -5
- data/app/views/spree/admin/feedback_reviews/index.html.erb +9 -9
- data/app/views/spree/admin/review_settings/edit.html.erb +64 -35
- data/app/views/spree/admin/reviews/_form.html.erb +26 -5
- data/app/views/spree/admin/reviews/edit.html.erb +2 -2
- data/app/views/spree/admin/reviews/index.html.erb +100 -88
- data/app/views/spree/api/reviews/_review.json.jbuilder +8 -0
- data/app/views/spree/api/reviews/index.json.jbuilder +6 -0
- data/app/views/spree/api/reviews/show.json.jbuilder +3 -0
- data/app/views/spree/feedback_reviews/_form.html.erb +5 -5
- data/app/views/spree/feedback_reviews/_summary.html.erb +3 -3
- data/app/views/spree/feedback_reviews/create.js.erb +2 -2
- data/app/views/spree/reviews/_form.html.erb +15 -10
- data/app/views/spree/reviews/new.html.erb +2 -2
- data/app/views/spree/shared/_rating.html.erb +3 -3
- data/app/views/spree/shared/_review.html.erb +29 -19
- data/app/views/spree/shared/_review_summary.html.erb +3 -3
- data/app/views/spree/shared/_reviews.html.erb +6 -6
- data/app/views/spree/shared/_shortrating.html.erb +2 -2
- data/bin/rails +4 -2
- data/config/initializers/constants.rb +2 -0
- data/config/initializers/load_preferences.rb +2 -0
- data/config/locales/de-CH.yml +14 -1
- data/config/locales/de.yml +14 -1
- data/config/locales/en-GB.yml +14 -2
- data/config/locales/en.yml +14 -1
- data/config/locales/es.yml +14 -2
- data/config/locales/fr.yml +14 -2
- data/config/locales/it.yml +79 -0
- data/config/locales/pl.yml +14 -2
- data/config/locales/pt-BR.yml +14 -2
- data/config/locales/pt.yml +14 -2
- data/config/locales/ro.yml +15 -3
- data/config/locales/ru.yml +14 -2
- data/config/locales/sv.yml +14 -1
- data/config/locales/tr.yml +14 -2
- data/config/locales/uk.yml +14 -1
- data/config/locales/zh-CN.yml +14 -1
- data/config/locales/zh-TW.yml +14 -1
- data/config/routes.rb +18 -1
- data/db/migrate/20081020220724_create_reviews.rb +4 -2
- data/db/migrate/20101222083309_create_feedback_reviews.rb +5 -3
- data/db/migrate/20110406083603_add_rating_to_products.rb +7 -5
- data/db/migrate/20110606150524_add_user_to_reviews.rb +4 -2
- data/db/migrate/20110806093221_add_ip_address_to_reviews.rb +3 -1
- data/db/migrate/20120110172331_namespace_tables.rb +3 -1
- data/db/migrate/20120123141326_recalculate_ratings.rb +6 -5
- data/db/migrate/20120712182514_add_locale_to_reviews.rb +4 -2
- data/db/migrate/20120712182627_add_locale_to_feedback_reviews.rb +4 -2
- data/db/migrate/20140703200946_add_show_identifier_to_reviews.rb +3 -1
- data/db/migrate/20190613165528_add_verified_purchaser_to_reviews.rb +5 -0
- data/lib/controllers/spree/api/reviews_controller.rb +111 -0
- data/lib/generators/solidus_reviews/install/install_generator.rb +5 -4
- data/lib/solidus_reviews.rb +3 -1
- data/lib/solidus_reviews/factories.rb +3 -1
- data/lib/solidus_reviews/factories/feedback_review_factory.rb +6 -5
- data/lib/solidus_reviews/factories/review_factory.rb +19 -9
- data/lib/spree_reviews/engine.rb +7 -0
- data/solidus_reviews.gemspec +20 -18
- data/spec/controllers/admin/feedback_reviews_controller_spec.rb +9 -7
- data/spec/controllers/admin/review_settings_controller_spec.rb +18 -16
- data/spec/controllers/admin/reviews_controller_spec.rb +18 -16
- data/spec/controllers/feedback_reviews_controller_spec.rb +29 -25
- data/spec/controllers/products_controller_spec.rb +4 -2
- data/spec/controllers/reviews_controller_spec.rb +67 -40
- data/spec/controllers/spree/api/reviews_controller_spec.rb +233 -0
- data/spec/features/admin_spec.rb +3 -0
- data/spec/features/reviews_spec.rb +27 -11
- data/spec/helpers/review_helper_spec.rb +3 -2
- data/spec/models/feedback_review_spec.rb +19 -17
- data/spec/models/product_spec.rb +41 -19
- data/spec/models/review_spec.rb +100 -42
- data/spec/models/reviews_ability_spec.rb +10 -8
- data/spec/models/reviews_configuration_spec.rb +28 -19
- data/spec/spec_helper.rb +21 -35
- data/vendor/assets/javascripts/jquery.rating.js +389 -376
- metadata +108 -59
metadata
CHANGED
@@ -1,60 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_reviews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Alex Blackie
|
7
|
+
- Solidus Contrib
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2019-08-14 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: deface
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
17
|
- - "~>"
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1
|
19
|
+
version: '1'
|
21
20
|
type: :runtime
|
22
21
|
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
24
|
- - "~>"
|
26
25
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1
|
26
|
+
version: '1'
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
28
|
+
name: solidus
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
31
30
|
requirements:
|
32
|
-
- - "
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.4'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '3'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.4'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: solidus_auth_devise
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
33
52
|
- !ruby/object:Gem::Version
|
34
53
|
version: '1.0'
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '3'
|
35
57
|
type: :runtime
|
36
58
|
prerelease: false
|
37
59
|
version_requirements: !ruby/object:Gem::Requirement
|
38
60
|
requirements:
|
39
|
-
- - "
|
61
|
+
- - ">="
|
40
62
|
- !ruby/object:Gem::Version
|
41
63
|
version: '1.0'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3'
|
42
67
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
68
|
+
name: solidus_support
|
44
69
|
requirement: !ruby/object:Gem::Requirement
|
45
70
|
requirements:
|
46
71
|
- - "~>"
|
47
72
|
- !ruby/object:Gem::Version
|
48
|
-
version: '1
|
73
|
+
version: '0.1'
|
49
74
|
type: :runtime
|
50
75
|
prerelease: false
|
51
76
|
version_requirements: !ruby/object:Gem::Requirement
|
52
77
|
requirements:
|
53
78
|
- - "~>"
|
54
79
|
- !ruby/object:Gem::Version
|
55
|
-
version: '1
|
80
|
+
version: '0.1'
|
56
81
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
82
|
+
name: capybara
|
58
83
|
requirement: !ruby/object:Gem::Requirement
|
59
84
|
requirements:
|
60
85
|
- - ">="
|
@@ -68,77 +93,77 @@ dependencies:
|
|
68
93
|
- !ruby/object:Gem::Version
|
69
94
|
version: '0'
|
70
95
|
- !ruby/object:Gem::Dependency
|
71
|
-
name: capybara
|
96
|
+
name: capybara-screenshot
|
72
97
|
requirement: !ruby/object:Gem::Requirement
|
73
98
|
requirements:
|
74
|
-
- - "
|
99
|
+
- - ">="
|
75
100
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
101
|
+
version: '0'
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
104
|
version_requirements: !ruby/object:Gem::Requirement
|
80
105
|
requirements:
|
81
|
-
- - "
|
106
|
+
- - ">="
|
82
107
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
108
|
+
version: '0'
|
84
109
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
110
|
+
name: coffee-rails
|
86
111
|
requirement: !ruby/object:Gem::Requirement
|
87
112
|
requirements:
|
88
|
-
- -
|
113
|
+
- - ">="
|
89
114
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
115
|
+
version: '0'
|
91
116
|
type: :development
|
92
117
|
prerelease: false
|
93
118
|
version_requirements: !ruby/object:Gem::Requirement
|
94
119
|
requirements:
|
95
|
-
- -
|
120
|
+
- - ">="
|
96
121
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
122
|
+
version: '0'
|
98
123
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
124
|
+
name: database_cleaner
|
100
125
|
requirement: !ruby/object:Gem::Requirement
|
101
126
|
requirements:
|
102
|
-
- - "
|
127
|
+
- - ">="
|
103
128
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
129
|
+
version: '0'
|
105
130
|
type: :development
|
106
131
|
prerelease: false
|
107
132
|
version_requirements: !ruby/object:Gem::Requirement
|
108
133
|
requirements:
|
109
|
-
- - "
|
134
|
+
- - ">="
|
110
135
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
136
|
+
version: '0'
|
112
137
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
138
|
+
name: ffaker
|
114
139
|
requirement: !ruby/object:Gem::Requirement
|
115
140
|
requirements:
|
116
|
-
- - "
|
141
|
+
- - ">="
|
117
142
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
143
|
+
version: '0'
|
119
144
|
type: :development
|
120
145
|
prerelease: false
|
121
146
|
version_requirements: !ruby/object:Gem::Requirement
|
122
147
|
requirements:
|
123
|
-
- - "
|
148
|
+
- - ">="
|
124
149
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
150
|
+
version: '0'
|
126
151
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
152
|
+
name: poltergeist
|
128
153
|
requirement: !ruby/object:Gem::Requirement
|
129
154
|
requirements:
|
130
|
-
- - "
|
155
|
+
- - ">="
|
131
156
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
157
|
+
version: '0'
|
133
158
|
type: :development
|
134
159
|
prerelease: false
|
135
160
|
version_requirements: !ruby/object:Gem::Requirement
|
136
161
|
requirements:
|
137
|
-
- - "
|
162
|
+
- - ">="
|
138
163
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
164
|
+
version: '0'
|
140
165
|
- !ruby/object:Gem::Dependency
|
141
|
-
name:
|
166
|
+
name: pry
|
142
167
|
requirement: !ruby/object:Gem::Requirement
|
143
168
|
requirements:
|
144
169
|
- - ">="
|
@@ -152,49 +177,49 @@ dependencies:
|
|
152
177
|
- !ruby/object:Gem::Version
|
153
178
|
version: '0'
|
154
179
|
- !ruby/object:Gem::Dependency
|
155
|
-
name:
|
180
|
+
name: rspec-rails
|
156
181
|
requirement: !ruby/object:Gem::Requirement
|
157
182
|
requirements:
|
158
|
-
- - "
|
183
|
+
- - ">="
|
159
184
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0
|
185
|
+
version: '0'
|
161
186
|
type: :development
|
162
187
|
prerelease: false
|
163
188
|
version_requirements: !ruby/object:Gem::Requirement
|
164
189
|
requirements:
|
165
|
-
- - "
|
190
|
+
- - ">="
|
166
191
|
- !ruby/object:Gem::Version
|
167
|
-
version: 0
|
192
|
+
version: '0'
|
168
193
|
- !ruby/object:Gem::Dependency
|
169
|
-
name:
|
194
|
+
name: rubocop
|
170
195
|
requirement: !ruby/object:Gem::Requirement
|
171
196
|
requirements:
|
172
197
|
- - "~>"
|
173
198
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
199
|
+
version: 0.53.0
|
175
200
|
type: :development
|
176
201
|
prerelease: false
|
177
202
|
version_requirements: !ruby/object:Gem::Requirement
|
178
203
|
requirements:
|
179
204
|
- - "~>"
|
180
205
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
206
|
+
version: 0.53.0
|
182
207
|
- !ruby/object:Gem::Dependency
|
183
208
|
name: sass-rails
|
184
209
|
requirement: !ruby/object:Gem::Requirement
|
185
210
|
requirements:
|
186
|
-
- - "
|
211
|
+
- - ">="
|
187
212
|
- !ruby/object:Gem::Version
|
188
|
-
version: '
|
213
|
+
version: '0'
|
189
214
|
type: :development
|
190
215
|
prerelease: false
|
191
216
|
version_requirements: !ruby/object:Gem::Requirement
|
192
217
|
requirements:
|
193
|
-
- - "
|
218
|
+
- - ">="
|
194
219
|
- !ruby/object:Gem::Version
|
195
|
-
version: '
|
220
|
+
version: '0'
|
196
221
|
- !ruby/object:Gem::Dependency
|
197
|
-
name:
|
222
|
+
name: simplecov
|
198
223
|
requirement: !ruby/object:Gem::Requirement
|
199
224
|
requirements:
|
200
225
|
- - ">="
|
@@ -207,14 +232,29 @@ dependencies:
|
|
207
232
|
- - ">="
|
208
233
|
- !ruby/object:Gem::Version
|
209
234
|
version: '0'
|
210
|
-
|
211
|
-
|
235
|
+
- !ruby/object:Gem::Dependency
|
236
|
+
name: sqlite3
|
237
|
+
requirement: !ruby/object:Gem::Requirement
|
238
|
+
requirements:
|
239
|
+
- - "~>"
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: 1.3.6
|
242
|
+
type: :development
|
243
|
+
prerelease: false
|
244
|
+
version_requirements: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - "~>"
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: 1.3.6
|
249
|
+
description: Basic review and ratings facility for Solidus
|
250
|
+
email:
|
212
251
|
executables: []
|
213
252
|
extensions: []
|
214
253
|
extra_rdoc_files: []
|
215
254
|
files:
|
216
255
|
- ".gitignore"
|
217
256
|
- ".rspec"
|
257
|
+
- ".rubocop.yml"
|
218
258
|
- ".travis.yml"
|
219
259
|
- CONTRIBUTING.md
|
220
260
|
- Gemfile
|
@@ -233,12 +273,14 @@ files:
|
|
233
273
|
- app/controllers/spree/feedback_reviews_controller.rb
|
234
274
|
- app/controllers/spree/products_controller_decorator.rb
|
235
275
|
- app/controllers/spree/reviews_controller.rb
|
276
|
+
- app/helpers/spree/api/api_helpers_decorator.rb
|
236
277
|
- app/helpers/spree/reviews_helper.rb
|
237
278
|
- app/models/spree/feedback_review.rb
|
238
279
|
- app/models/spree/product_decorator.rb
|
239
280
|
- app/models/spree/review.rb
|
240
281
|
- app/models/spree/reviews_ability.rb
|
241
282
|
- app/models/spree/reviews_configuration.rb
|
283
|
+
- app/models/spree/user_decorator.rb
|
242
284
|
- app/overrides/add_reviews_after_product_properties.rb
|
243
285
|
- app/overrides/add_reviews_tab_to_admin.rb
|
244
286
|
- app/overrides/add_reviews_to_admin_configuration_sidebar.rb
|
@@ -247,6 +289,9 @@ files:
|
|
247
289
|
- app/views/spree/admin/reviews/_form.html.erb
|
248
290
|
- app/views/spree/admin/reviews/edit.html.erb
|
249
291
|
- app/views/spree/admin/reviews/index.html.erb
|
292
|
+
- app/views/spree/api/reviews/_review.json.jbuilder
|
293
|
+
- app/views/spree/api/reviews/index.json.jbuilder
|
294
|
+
- app/views/spree/api/reviews/show.json.jbuilder
|
250
295
|
- app/views/spree/feedback_reviews/_form.html.erb
|
251
296
|
- app/views/spree/feedback_reviews/_summary.html.erb
|
252
297
|
- app/views/spree/feedback_reviews/create.js.erb
|
@@ -268,6 +313,7 @@ files:
|
|
268
313
|
- config/locales/en.yml
|
269
314
|
- config/locales/es.yml
|
270
315
|
- config/locales/fr.yml
|
316
|
+
- config/locales/it.yml
|
271
317
|
- config/locales/pl.yml
|
272
318
|
- config/locales/pt-BR.yml
|
273
319
|
- config/locales/pt.yml
|
@@ -289,8 +335,10 @@ files:
|
|
289
335
|
- db/migrate/20120712182514_add_locale_to_reviews.rb
|
290
336
|
- db/migrate/20120712182627_add_locale_to_feedback_reviews.rb
|
291
337
|
- db/migrate/20140703200946_add_show_identifier_to_reviews.rb
|
338
|
+
- db/migrate/20190613165528_add_verified_purchaser_to_reviews.rb
|
292
339
|
- db/sample/ratings.yml
|
293
340
|
- db/sample/reviews.yml
|
341
|
+
- lib/controllers/spree/api/reviews_controller.rb
|
294
342
|
- lib/generators/solidus_reviews/install/install_generator.rb
|
295
343
|
- lib/solidus_reviews.rb
|
296
344
|
- lib/solidus_reviews/factories.rb
|
@@ -304,6 +352,7 @@ files:
|
|
304
352
|
- spec/controllers/feedback_reviews_controller_spec.rb
|
305
353
|
- spec/controllers/products_controller_spec.rb
|
306
354
|
- spec/controllers/reviews_controller_spec.rb
|
355
|
+
- spec/controllers/spree/api/reviews_controller_spec.rb
|
307
356
|
- spec/features/admin_spec.rb
|
308
357
|
- spec/features/reviews_spec.rb
|
309
358
|
- spec/helpers/review_helper_spec.rb
|
@@ -314,7 +363,7 @@ files:
|
|
314
363
|
- spec/models/reviews_configuration_spec.rb
|
315
364
|
- spec/spec_helper.rb
|
316
365
|
- vendor/assets/javascripts/jquery.rating.js
|
317
|
-
homepage: https://github.com/solidusio-contrib/
|
366
|
+
homepage: https://github.com/solidusio-contrib/solidus_reviews/
|
318
367
|
licenses:
|
319
368
|
- BSD-3
|
320
369
|
metadata: {}
|
@@ -334,11 +383,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
383
|
version: '0'
|
335
384
|
requirements:
|
336
385
|
- none
|
337
|
-
|
338
|
-
rubygems_version: 2.6.10
|
386
|
+
rubygems_version: 3.0.3
|
339
387
|
signing_key:
|
340
388
|
specification_version: 4
|
341
|
-
summary: Basic review and ratings facility for
|
389
|
+
summary: Basic review and ratings facility for Solidus
|
342
390
|
test_files:
|
343
391
|
- spec/controllers/admin/feedback_reviews_controller_spec.rb
|
344
392
|
- spec/controllers/admin/review_settings_controller_spec.rb
|
@@ -346,6 +394,7 @@ test_files:
|
|
346
394
|
- spec/controllers/feedback_reviews_controller_spec.rb
|
347
395
|
- spec/controllers/products_controller_spec.rb
|
348
396
|
- spec/controllers/reviews_controller_spec.rb
|
397
|
+
- spec/controllers/spree/api/reviews_controller_spec.rb
|
349
398
|
- spec/features/admin_spec.rb
|
350
399
|
- spec/features/reviews_spec.rb
|
351
400
|
- spec/helpers/review_helper_spec.rb
|