solidus_reviews 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +11 -8
- data/.rspec +1 -1
- data/.rubocop.yml +1 -11
- data/CHANGELOG.md +32 -0
- data/Gemfile +9 -13
- data/{LICENSE.md → LICENSE} +1 -1
- data/Rakefile +4 -19
- data/app/controllers/spree/reviews_controller.rb +29 -2
- data/app/decorators/controllers/solidus_reviews/spree/{admin/products_controller_decorator.rb → products_controller_decorator.rb} +0 -4
- data/app/models/spree/feedback_review.rb +1 -1
- data/app/models/spree/permission_sets/review_display.rb +11 -0
- data/app/models/spree/permission_sets/review_management.rb +11 -0
- data/app/models/spree/review.rb +16 -2
- data/app/models/spree/reviews_ability.rb +5 -0
- data/app/models/spree/reviews_configuration.rb +10 -1
- data/app/overrides/add_reviews_tab_to_admin.rb +12 -4
- data/app/overrides/add_reviews_to_admin_configuration_sidebar.rb +12 -5
- data/app/views/spree/admin/review_settings/edit.html.erb +7 -0
- data/app/views/spree/admin/reviews/edit.html.erb +4 -2
- data/app/views/spree/admin/reviews/index.html.erb +9 -5
- data/app/views/spree/reviews/_form.html.erb +6 -4
- data/app/views/spree/reviews/edit.html.erb +3 -0
- data/app/views/spree/shared/_review.html.erb +6 -4
- data/bin/console +17 -0
- data/bin/rails +11 -3
- data/bin/setup +8 -0
- data/config/locales/de-CH.yml +1 -1
- data/config/locales/de.yml +1 -1
- data/config/locales/en-GB.yml +2 -1
- data/config/locales/en.yml +2 -1
- data/config/locales/es.yml +2 -1
- data/config/locales/fr.yml +1 -1
- data/config/locales/it.yml +1 -1
- data/config/locales/pl.yml +1 -1
- data/config/locales/pt-BR.yml +1 -1
- data/config/locales/pt.yml +1 -1
- data/config/locales/ro.yml +1 -1
- data/config/locales/sv.yml +1 -1
- data/config/locales/tr.yml +1 -1
- data/config/locales/uk.yml +1 -1
- data/config/locales/zh-CN.yml +1 -1
- data/config/locales/zh-TW.yml +1 -1
- data/config/routes.rb +3 -1
- data/lib/controllers/spree/api/feedback_reviews_controller.rb +91 -0
- data/lib/solidus_reviews.rb +2 -4
- data/lib/solidus_reviews/engine.rb +12 -8
- data/lib/solidus_reviews/version.rb +1 -1
- data/solidus_reviews.gemspec +19 -12
- data/spec/controllers/spree/api/feedback_reviews_controller_spec.rb +136 -0
- data/spec/controllers/spree/reviews_controller_spec.rb +136 -0
- data/spec/models/review_spec.rb +27 -0
- data/spec/models/reviews_configuration_spec.rb +12 -0
- data/spec/spec_helper.rb +16 -3
- metadata +48 -39
- data/spec/controllers/spree/products_controller_spec.rb +0 -11
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Spree::Api::FeedbackReviewsController, type: :controller do
|
6
|
+
render_views
|
7
|
+
|
8
|
+
let!(:user) { create(:user) }
|
9
|
+
let!(:review) { create(:review) }
|
10
|
+
let!(:feedback_review) { create(:feedback_review, review: review) }
|
11
|
+
|
12
|
+
before do
|
13
|
+
user.generate_spree_api_key!
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#create' do
|
17
|
+
subject do
|
18
|
+
params = { review_id: review.id, token: user.spree_api_key, format: 'json' }.merge(feedback_review_params)
|
19
|
+
post :create, params: params
|
20
|
+
JSON.parse(response.body)
|
21
|
+
end
|
22
|
+
|
23
|
+
let(:feedback_review_params) do
|
24
|
+
{
|
25
|
+
"feedback_review": {
|
26
|
+
"rating": "5",
|
27
|
+
"comment": "I agree with what you said"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'when user has already left feedback on a reviewed this product' do
|
33
|
+
before do
|
34
|
+
feedback_review.update(user_id: user.id)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'returns with a fail' do
|
38
|
+
expect(subject["error"]).not_to be_empty
|
39
|
+
expect(subject["error"]).to match(/invalid resource/i)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'when it is a users first feedback for a review' do
|
44
|
+
it 'returns success with feedback' do
|
45
|
+
expect(subject).not_to be_empty
|
46
|
+
expect(subject["review_id"]).to eq(review.id)
|
47
|
+
expect(subject["rating"]).to eq(5)
|
48
|
+
expect(subject["comment"]).to eq("I agree with what you said")
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'updates the review' do
|
52
|
+
expect(review).to receive(:touch)
|
53
|
+
feedback = create(:feedback_review, review: review)
|
54
|
+
feedback.save!
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe '#update' do
|
60
|
+
subject do
|
61
|
+
put :update, params: params
|
62
|
+
JSON.parse(response.body)
|
63
|
+
end
|
64
|
+
|
65
|
+
before { feedback_review.update(user_id: user.id) }
|
66
|
+
|
67
|
+
let(:params) { { review_id: review.id, id: feedback_review.id, token: user.spree_api_key, format: 'json' }.merge(feedback_review_params) }
|
68
|
+
|
69
|
+
let(:feedback_review_params) do
|
70
|
+
{
|
71
|
+
"feedback_review": {
|
72
|
+
"rating": "1",
|
73
|
+
"comment": "Actually I don't agree"
|
74
|
+
}
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
context 'when a user updates their own feedback for a review' do
|
79
|
+
it 'successfully updates their feedback' do
|
80
|
+
original = feedback_review
|
81
|
+
expect(subject["id"]).to eq(original.id)
|
82
|
+
expect(subject["user_id"]).to eq(original.user_id)
|
83
|
+
expect(subject["review_id"]).to eq(original.review_id)
|
84
|
+
expect(subject["rating"]).to eq(1)
|
85
|
+
expect(subject["comment"]).to eq("Actually I don't agree")
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
context 'when a user updates another users review' do
|
90
|
+
let(:other_user) { create(:user) }
|
91
|
+
let(:params) { { review_id: review.id, id: feedback_review.id, token: other_user.spree_api_key, format: 'json' }.merge(feedback_review_params) }
|
92
|
+
|
93
|
+
before do
|
94
|
+
other_user.generate_spree_api_key!
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'returns an error' do
|
98
|
+
expect(subject["error"]).not_to be_empty
|
99
|
+
expect(subject["error"]).to match(/not authorized/i)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
describe '#destroy' do
|
105
|
+
subject do
|
106
|
+
delete :destroy, params: params
|
107
|
+
JSON.parse(response.body)
|
108
|
+
end
|
109
|
+
|
110
|
+
before { feedback_review.update(user_id: user.id) }
|
111
|
+
|
112
|
+
let(:params) { { review_id: review.id, id: feedback_review.id, token: user.spree_api_key, format: 'json' } }
|
113
|
+
|
114
|
+
context "when a user destroys their own feedback" do
|
115
|
+
it 'returns the deleted feedback' do
|
116
|
+
expect(subject["id"]).to eq(feedback_review.id)
|
117
|
+
expect(subject["review_id"]).to eq(review.id)
|
118
|
+
expect(Spree::FeedbackReview.find_by(id: feedback_review.id)).to be_falsey
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
context "when a user destroys another users feedback" do
|
123
|
+
let(:other_user) { create(:user) }
|
124
|
+
let(:params) { { review_id: review.id, id: feedback_review.id, token: other_user.spree_api_key, format: 'json' } }
|
125
|
+
|
126
|
+
before do
|
127
|
+
other_user.generate_spree_api_key!
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'returns an error' do
|
131
|
+
expect(subject["error"]).not_to be_empty
|
132
|
+
expect(subject["error"]).to match(/not authorized/i)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -5,6 +5,7 @@ require 'spec_helper'
|
|
5
5
|
describe Spree::ReviewsController, type: :controller do
|
6
6
|
let(:user) { create(:user) }
|
7
7
|
let(:product) { create(:product) }
|
8
|
+
let(:review) { create(:review, :approved, product: product, user: user) }
|
8
9
|
let(:review_params) do
|
9
10
|
{ product_id: product.slug,
|
10
11
|
review: { rating: 3,
|
@@ -67,6 +68,40 @@ describe Spree::ReviewsController, type: :controller do
|
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
71
|
+
describe '#edit' do
|
72
|
+
|
73
|
+
context 'for a product that does not exist' do
|
74
|
+
it 'responds with a 404' do
|
75
|
+
expect {
|
76
|
+
get :edit, params: { id: review.id, product_id: 'not_real' }
|
77
|
+
}.to raise_error(ActiveRecord::RecordNotFound)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'fail if the user is not authorized to edit a review' do
|
82
|
+
allow(controller).to receive(:authorize!).and_raise(RuntimeError)
|
83
|
+
|
84
|
+
expect {
|
85
|
+
post :edit, params: { id: review.id, product_id: product.slug }
|
86
|
+
assert_match 'ryanbig', response.body
|
87
|
+
}.to raise_error RuntimeError
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'render the edit template' do
|
91
|
+
get :edit, params: { id: review.id, product_id: product.slug }
|
92
|
+
expect(response.status).to eq(200)
|
93
|
+
expect(response).to render_template(:edit)
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'doesn\'t allow another user to update a users review' do
|
97
|
+
other_user = create(:user)
|
98
|
+
allow(controller).to receive(:spree_current_user).and_return(other_user)
|
99
|
+
get :edit, params: {id: review.id, product_id: product.slug }
|
100
|
+
expect(response).to_not render_template(:edit)
|
101
|
+
expect(flash[:error]).to eq "Authorization Failure"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
70
105
|
describe '#create' do
|
71
106
|
before { allow(controller).to receive(:spree_current_user).and_return(user) }
|
72
107
|
|
@@ -159,4 +194,105 @@ describe Spree::ReviewsController, type: :controller do
|
|
159
194
|
end
|
160
195
|
end
|
161
196
|
end
|
197
|
+
|
198
|
+
describe '#update' do
|
199
|
+
before {
|
200
|
+
allow(controller).to receive(:spree_current_user).and_return(user)
|
201
|
+
@review_params = { product_id: product.slug,
|
202
|
+
id: review.id,
|
203
|
+
review: { title: 'Amazing Product' } }
|
204
|
+
}
|
205
|
+
|
206
|
+
context 'for a product that does not exist' do
|
207
|
+
it 'responds with a 404' do
|
208
|
+
expect {
|
209
|
+
post :update, params: { id: review.id, product_id: 'not_real' }
|
210
|
+
}.to raise_error(ActiveRecord::RecordNotFound)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
it 'updates a review' do
|
215
|
+
post :update, params: @review_params
|
216
|
+
|
217
|
+
expect(assigns[:review].title).to eq 'Amazing Product'
|
218
|
+
expect(assigns[:review].product).to eq product
|
219
|
+
expect(assigns[:review].user).to eq user
|
220
|
+
end
|
221
|
+
|
222
|
+
it 'updates a review to be a rating only review' do
|
223
|
+
post :update, params: {
|
224
|
+
product_id: product.slug,
|
225
|
+
id: review.id,
|
226
|
+
review: { title: '', review: '', rating: 5 }
|
227
|
+
}
|
228
|
+
|
229
|
+
expect(assigns[:review].title).to eq ''
|
230
|
+
expect(assigns[:review].review).to eq ''
|
231
|
+
expect(assigns[:review].rating).to eq 5
|
232
|
+
end
|
233
|
+
|
234
|
+
it 'updates the attached image' do
|
235
|
+
post :update, params: {
|
236
|
+
product_id: product.slug,
|
237
|
+
id: review.id,
|
238
|
+
review: {
|
239
|
+
images: [
|
240
|
+
fixture_file_upload(File.new(Spree::Core::Engine.root + 'spec/fixtures/thinking-cat.jpg')),
|
241
|
+
] }
|
242
|
+
}
|
243
|
+
expect(assigns[:review].images.count).to eq 1
|
244
|
+
end
|
245
|
+
|
246
|
+
it 'fails if the user is not authorized to create a review' do
|
247
|
+
allow(controller).to receive(:authorize!).and_raise(RuntimeError)
|
248
|
+
|
249
|
+
expect{
|
250
|
+
post :update, params: @review_params
|
251
|
+
}.to raise_error RuntimeError
|
252
|
+
end
|
253
|
+
|
254
|
+
it 'flashes the notice' do
|
255
|
+
post :update, params: @review_params
|
256
|
+
|
257
|
+
expect(flash[:notice]).to eq I18n.t('spree.review_successfully_submitted')
|
258
|
+
end
|
259
|
+
|
260
|
+
it 'redirects to product page' do
|
261
|
+
post :update, params: @review_params
|
262
|
+
review.reload
|
263
|
+
review.valid?
|
264
|
+
expect(response).to redirect_to spree.product_path(product)
|
265
|
+
end
|
266
|
+
|
267
|
+
it 'removes all non-numbers from ratings param' do
|
268
|
+
@review_params[:review][:rating] = 5
|
269
|
+
post :update, params: @review_params
|
270
|
+
expect(controller.params[:review][:rating]).to eq '5'
|
271
|
+
end
|
272
|
+
|
273
|
+
it 'doesnt change the current spree user as reviews user' do
|
274
|
+
post :update, params: @review_params
|
275
|
+
expect(assigns[:review].user_id).to eq user.id
|
276
|
+
end
|
277
|
+
|
278
|
+
context 'with invalid params' do
|
279
|
+
it 'renders edit when review.save fails' do
|
280
|
+
expect_any_instance_of(Spree::Review).to receive(:update).and_return(false)
|
281
|
+
post :update, params: @review_params
|
282
|
+
expect(response).to render_template :edit
|
283
|
+
end
|
284
|
+
|
285
|
+
it 'does not update a review' do
|
286
|
+
original_rating = review.rating
|
287
|
+
original_title = review.title
|
288
|
+
@review_params[:review][:rating] = 'not_a_number'
|
289
|
+
@review_params[:review][:title] = true
|
290
|
+
post :update, params: @review_params
|
291
|
+
|
292
|
+
review.reload
|
293
|
+
expect(review.rating).to eq original_rating
|
294
|
+
expect(review.title).to eq original_title
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end
|
162
298
|
end
|
data/spec/models/review_spec.rb
CHANGED
@@ -219,4 +219,31 @@ describe Spree::Review do
|
|
219
219
|
expect(review.verified_purchaser).to eq(false)
|
220
220
|
end
|
221
221
|
end
|
222
|
+
|
223
|
+
describe "#approve_review" do
|
224
|
+
let(:order) { create(:completed_order_with_totals) }
|
225
|
+
let(:product) { order.products.first }
|
226
|
+
let(:user) { order.user }
|
227
|
+
let(:review) { build(:review, title: '', review: '', user: user, product: product) }
|
228
|
+
|
229
|
+
it "auto approves star only review" do
|
230
|
+
stub_spree_preferences(Spree::Reviews::Config, approve_star_only: true)
|
231
|
+
|
232
|
+
expect(review.approved).to eq(false)
|
233
|
+
review.approve_review
|
234
|
+
expect(review.approved).to eq(true)
|
235
|
+
end
|
236
|
+
|
237
|
+
it "auto approves star only review for verified purchaser" do
|
238
|
+
stub_spree_preferences(Spree::Reviews::Config, approve_star_only_for_verified_purchaser: true)
|
239
|
+
|
240
|
+
expect(review.verified_purchaser).to eq(false)
|
241
|
+
expect(review.approved).to eq(false)
|
242
|
+
review.verify_purchaser
|
243
|
+
expect(review.verified_purchaser).to eq(true)
|
244
|
+
expect(review.approved).to eq(false)
|
245
|
+
review.approve_review
|
246
|
+
expect(review.approved).to eq(true)
|
247
|
+
end
|
248
|
+
end
|
222
249
|
end
|
@@ -50,4 +50,16 @@ describe Spree::ReviewsConfiguration do
|
|
50
50
|
expect(subject).to respond_to(:preferred_track_locale=)
|
51
51
|
expect(subject.preferred_track_locale).to be false
|
52
52
|
end
|
53
|
+
|
54
|
+
it 'has the approve_star_only preference' do
|
55
|
+
expect(subject).to respond_to(:preferred_approve_star_only)
|
56
|
+
expect(subject).to respond_to(:preferred_approve_star_only=)
|
57
|
+
expect(subject.preferred_approve_star_only).to be false
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'has the approve_star_only_for_verified_purchaser preference' do
|
61
|
+
expect(subject).to respond_to(:preferred_approve_star_only_for_verified_purchaser)
|
62
|
+
expect(subject).to respond_to(:preferred_approve_star_only_for_verified_purchaser=)
|
63
|
+
expect(subject.preferred_approve_star_only_for_verified_purchaser).to be false
|
64
|
+
end
|
53
65
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,11 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
# Configure Rails Environment
|
4
|
+
ENV['RAILS_ENV'] = 'test'
|
4
5
|
|
5
|
-
|
6
|
+
# Run Coverage report
|
7
|
+
require 'solidus_dev_support/rspec/coverage'
|
6
8
|
|
7
9
|
require File.expand_path('dummy/config/environment.rb', __dir__)
|
8
10
|
|
9
|
-
|
11
|
+
# Requires factories and other useful helpers defined in spree_core.
|
12
|
+
require 'solidus_dev_support/rspec/feature_helper'
|
10
13
|
|
14
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
15
|
+
# in spec/support/ and its subdirectories.
|
11
16
|
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
17
|
+
|
18
|
+
# Requires factories defined in lib/solidus_reviews/factories.rb
|
19
|
+
require 'solidus_reviews/factories'
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.infer_spec_type_from_file_location!
|
23
|
+
config.use_transactional_fixtures = false
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_reviews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Contrib
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -25,12 +25,12 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: solidus_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '3'
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 2.0.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '3'
|
@@ -48,18 +48,18 @@ dependencies:
|
|
48
48
|
name: solidus_support
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
53
|
+
version: '0.4'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
60
|
+
version: '0.4'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: solidus_dev_support
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
@@ -72,20 +72,22 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
-
description:
|
76
|
-
email:
|
75
|
+
description:
|
76
|
+
email:
|
77
77
|
executables: []
|
78
78
|
extensions: []
|
79
79
|
extra_rdoc_files: []
|
80
80
|
files:
|
81
81
|
- ".circleci/config.yml"
|
82
|
+
- ".gem_release.yml"
|
83
|
+
- ".github/stale.yml"
|
82
84
|
- ".gitignore"
|
83
85
|
- ".rspec"
|
84
86
|
- ".rubocop.yml"
|
85
87
|
- ".rubocop_todo.yml"
|
86
88
|
- CHANGELOG.md
|
87
89
|
- Gemfile
|
88
|
-
- LICENSE
|
90
|
+
- LICENSE
|
89
91
|
- README.md
|
90
92
|
- Rakefile
|
91
93
|
- app/assets/images/store/reviews/delete.gif
|
@@ -99,12 +101,14 @@ files:
|
|
99
101
|
- app/controllers/spree/admin/reviews_controller.rb
|
100
102
|
- app/controllers/spree/feedback_reviews_controller.rb
|
101
103
|
- app/controllers/spree/reviews_controller.rb
|
102
|
-
- app/decorators/controllers/solidus_reviews/spree/
|
104
|
+
- app/decorators/controllers/solidus_reviews/spree/products_controller_decorator.rb
|
103
105
|
- app/decorators/helpers/solidus_reviews/spree/api/api_helpers_decorator.rb
|
104
106
|
- app/decorators/models/solidus_reviews/spree/product_decorator.rb
|
105
107
|
- app/decorators/models/solidus_reviews/spree/user_decorator.rb
|
106
108
|
- app/helpers/spree/reviews_helper.rb
|
107
109
|
- app/models/spree/feedback_review.rb
|
110
|
+
- app/models/spree/permission_sets/review_display.rb
|
111
|
+
- app/models/spree/permission_sets/review_management.rb
|
108
112
|
- app/models/spree/review.rb
|
109
113
|
- app/models/spree/reviews_ability.rb
|
110
114
|
- app/models/spree/reviews_configuration.rb
|
@@ -125,6 +129,7 @@ files:
|
|
125
129
|
- app/views/spree/feedback_reviews/create.js.erb
|
126
130
|
- app/views/spree/reviews/_form.html.erb
|
127
131
|
- app/views/spree/reviews/_stars.html.erb
|
132
|
+
- app/views/spree/reviews/edit.html.erb
|
128
133
|
- app/views/spree/reviews/index.html.erb
|
129
134
|
- app/views/spree/reviews/new.html.erb
|
130
135
|
- app/views/spree/shared/_rating.html.erb
|
@@ -132,7 +137,9 @@ files:
|
|
132
137
|
- app/views/spree/shared/_review_summary.html.erb
|
133
138
|
- app/views/spree/shared/_reviews.html.erb
|
134
139
|
- app/views/spree/shared/_shortrating.html.erb
|
140
|
+
- bin/console
|
135
141
|
- bin/rails
|
142
|
+
- bin/setup
|
136
143
|
- config/initializers/constants.rb
|
137
144
|
- config/initializers/load_preferences.rb
|
138
145
|
- config/locales/de-CH.yml
|
@@ -166,6 +173,7 @@ files:
|
|
166
173
|
- db/migrate/20190613165528_add_verified_purchaser_to_reviews.rb
|
167
174
|
- db/sample/ratings.yml
|
168
175
|
- db/sample/reviews.yml
|
176
|
+
- lib/controllers/spree/api/feedback_reviews_controller.rb
|
169
177
|
- lib/controllers/spree/api/reviews_controller.rb
|
170
178
|
- lib/generators/solidus_reviews/install/install_generator.rb
|
171
179
|
- lib/solidus_reviews.rb
|
@@ -178,9 +186,9 @@ files:
|
|
178
186
|
- spec/controllers/spree/admin/feedback_reviews_controller_spec.rb
|
179
187
|
- spec/controllers/spree/admin/review_settings_controller_spec.rb
|
180
188
|
- spec/controllers/spree/admin/reviews_controller_spec.rb
|
189
|
+
- spec/controllers/spree/api/feedback_reviews_controller_spec.rb
|
181
190
|
- spec/controllers/spree/api/reviews_controller_spec.rb
|
182
191
|
- spec/controllers/spree/feedback_reviews_controller_spec.rb
|
183
|
-
- spec/controllers/spree/products_controller_spec.rb
|
184
192
|
- spec/controllers/spree/reviews_controller_spec.rb
|
185
193
|
- spec/features/admin_spec.rb
|
186
194
|
- spec/features/reviews_spec.rb
|
@@ -196,44 +204,45 @@ files:
|
|
196
204
|
- vendor/assets/javascripts/jquery.rating.js
|
197
205
|
homepage: https://github.com/solidusio-contrib/solidus_reviews
|
198
206
|
licenses:
|
199
|
-
- BSD-3
|
200
|
-
metadata:
|
201
|
-
|
207
|
+
- BSD-3-Clause
|
208
|
+
metadata:
|
209
|
+
homepage_uri: https://github.com/solidusio-contrib/solidus_reviews
|
210
|
+
source_code_uri: https://github.com/solidusio-contrib/solidus_reviews
|
211
|
+
post_install_message:
|
202
212
|
rdoc_options: []
|
203
213
|
require_paths:
|
204
214
|
- lib
|
205
215
|
required_ruby_version: !ruby/object:Gem::Requirement
|
206
216
|
requirements:
|
207
|
-
- - "
|
217
|
+
- - "~>"
|
208
218
|
- !ruby/object:Gem::Version
|
209
|
-
version:
|
219
|
+
version: '2.4'
|
210
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
221
|
requirements:
|
212
222
|
- - ">="
|
213
223
|
- !ruby/object:Gem::Version
|
214
224
|
version: '0'
|
215
|
-
requirements:
|
216
|
-
|
217
|
-
|
218
|
-
signing_key:
|
225
|
+
requirements: []
|
226
|
+
rubygems_version: 3.0.3
|
227
|
+
signing_key:
|
219
228
|
specification_version: 4
|
220
229
|
summary: Review and rating functionality for your Solidus store.
|
221
230
|
test_files:
|
222
|
-
- spec/
|
231
|
+
- spec/spec_helper.rb
|
232
|
+
- spec/features/reviews_spec.rb
|
233
|
+
- spec/features/admin_spec.rb
|
234
|
+
- spec/models/reviews_configuration_spec.rb
|
235
|
+
- spec/models/review_spec.rb
|
236
|
+
- spec/models/reviews_ability_spec.rb
|
237
|
+
- spec/models/product_spec.rb
|
238
|
+
- spec/models/feedback_review_spec.rb
|
239
|
+
- spec/support/factories.rb
|
240
|
+
- spec/support/config.rb
|
223
241
|
- spec/controllers/spree/admin/review_settings_controller_spec.rb
|
224
242
|
- spec/controllers/spree/admin/reviews_controller_spec.rb
|
243
|
+
- spec/controllers/spree/admin/feedback_reviews_controller_spec.rb
|
225
244
|
- spec/controllers/spree/api/reviews_controller_spec.rb
|
226
|
-
- spec/controllers/spree/feedback_reviews_controller_spec.rb
|
227
|
-
- spec/controllers/spree/products_controller_spec.rb
|
245
|
+
- spec/controllers/spree/api/feedback_reviews_controller_spec.rb
|
228
246
|
- spec/controllers/spree/reviews_controller_spec.rb
|
229
|
-
- spec/
|
230
|
-
- spec/features/reviews_spec.rb
|
247
|
+
- spec/controllers/spree/feedback_reviews_controller_spec.rb
|
231
248
|
- spec/helpers/review_helper_spec.rb
|
232
|
-
- spec/models/feedback_review_spec.rb
|
233
|
-
- spec/models/product_spec.rb
|
234
|
-
- spec/models/review_spec.rb
|
235
|
-
- spec/models/reviews_ability_spec.rb
|
236
|
-
- spec/models/reviews_configuration_spec.rb
|
237
|
-
- spec/spec_helper.rb
|
238
|
-
- spec/support/config.rb
|
239
|
-
- spec/support/factories.rb
|