solidus_reviews 1.6.0 → 1.8.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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +7 -0
  3. data/.github/workflows/lint.yml +25 -0
  4. data/.github/workflows/test.yml +68 -0
  5. data/.rubocop_todo.yml +0 -5
  6. data/Gemfile +6 -10
  7. data/README.md +2 -2
  8. data/app/models/spree/feedback_review.rb +1 -1
  9. data/app/models/spree/review.rb +4 -1
  10. data/app/overrides/spree/products/show/add_reviews_after_product_properties.html.erb.deface +3 -0
  11. data/app/{decorators/models/solidus_reviews/spree/product_decorator.rb → patches/models/solidus_reviews/spree/product_patch.rb} +1 -1
  12. data/app/{decorators/models/solidus_reviews/spree/user_decorator.rb → patches/models/solidus_reviews/spree/user_patch.rb} +1 -1
  13. data/app/views/spree/admin/feedback_reviews/index.html.erb +33 -35
  14. data/app/views/spree/admin/reviews/edit.html.erb +18 -20
  15. data/config/initializers/add_spree_reviews_to_menu.rb +33 -0
  16. data/{app/decorators/helpers/solidus_reviews/spree/api/api_helpers_decorator.rb → lib/patches/api/helpers/solidus_reviews/spree/api/api_helpers_patch.rb} +3 -2
  17. data/{app/decorators/controllers/solidus_reviews/spree/products_controller_decorator.rb → lib/patches/frontend/controllers/solidus_reviews/spree/products_controller_patch.rb} +1 -1
  18. data/lib/solidus_reviews/version.rb +1 -1
  19. data/solidus_reviews.gemspec +3 -2
  20. data/spec/features/reviews_spec.rb +6 -6
  21. data/spec/models/review_spec.rb +12 -0
  22. data/vendor/assets/javascripts/jquery.rating.js +2 -1
  23. metadata +56 -27
  24. data/.circleci/config.yml +0 -61
  25. data/app/overrides/add_reviews_after_product_properties.rb +0 -7
  26. data/app/overrides/add_reviews_tab_to_admin.rb +0 -20
  27. data/app/overrides/add_reviews_to_admin_configuration_sidebar.rb +0 -20
  28. /data/{app/views → lib/views/api}/spree/api/reviews/_feedback_review.json.jbuilder +0 -0
  29. /data/{app/views → lib/views/api}/spree/api/reviews/_review.json.jbuilder +0 -0
  30. /data/{app/views → lib/views/api}/spree/api/reviews/index.json.jbuilder +0 -0
  31. /data/{app/views → lib/views/api}/spree/api/reviews/show.json.jbuilder +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f786e0b7b86049c102cea681a540eae39543d8afa2b428092de2470c7e8caf28
4
- data.tar.gz: 7d06e09fbc10a29eae662fa260874a6c202bcde097a99fb22b7bf13bec68b193
3
+ metadata.gz: b020b08e1ff3ee4e26c4720cfeb3b89599cba08bf36319b6c91595910b2f6271
4
+ data.tar.gz: 11c2e893bed1016bb656ae50aede6a3d104bd3f85a4d0df115aefff21d377374
5
5
  SHA512:
6
- metadata.gz: 50e9f5c509e0ed7a6ca2c7ef783a4cd33bc06649873266690a1e2fe70ca4d582ca530203aa6f83d94dc202b38fe6a7f56628909c9712d40f68e39d4a56197b3e
7
- data.tar.gz: 77e05282a759c6e0d8029f686263a24379408416718b5f88fd9ea2ad66274ef64f8c86fa973679410ec9095b43d7fa80fa17e183a8b4c414a2ce8ac76d7f19f0
6
+ metadata.gz: 0c54dc0026decb39c7646b3d1c7eadfdbc0cedc6b99ca70321712a56104320e6c8e441af14f14d58cdd00b2057b64a61d292e9751a4a6ffc17f9da88cdc8bdbb
7
+ data.tar.gz: edd8fb878ad4a71f4ae473200a888ab294f17c6dbb894009e59bf671de64f5b91d42c5397b615d06f61b83add6312c47db4aa705aa1b705eeafa3ac350b4f444
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
@@ -0,0 +1,25 @@
1
+ name: Lint
2
+
3
+ on: [pull_request]
4
+
5
+ concurrency:
6
+ group: lint-${{ github.ref_name }}
7
+ cancel-in-progress: ${{ github.ref_name != 'main' }}
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ ruby:
14
+ name: Check Ruby
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v3
19
+ - name: Install Ruby and gems
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: "3.2"
23
+ bundler-cache: true
24
+ - name: Lint Ruby files
25
+ run: bundle exec rubocop -ESP
@@ -0,0 +1,68 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ schedule:
9
+ - cron: "0 0 * * 4" # every Thursday
10
+
11
+ concurrency:
12
+ group: test-${{ github.ref_name }}
13
+ cancel-in-progress: ${{ github.ref_name != 'main' }}
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ rspec:
20
+ name: Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
21
+ runs-on: ubuntu-24.04
22
+ strategy:
23
+ fail-fast: true
24
+ matrix:
25
+ rails-version:
26
+ - "7.0"
27
+ - "7.1"
28
+ - "7.2"
29
+ ruby-version:
30
+ - "3.1"
31
+ - "3.4"
32
+ solidus-branch:
33
+ - "v4.1"
34
+ - "v4.2"
35
+ - "v4.3"
36
+ - "v4.4"
37
+ database:
38
+ - "postgresql"
39
+ - "mysql"
40
+ - "sqlite"
41
+ exclude:
42
+ - rails-version: "7.2"
43
+ solidus-branch: "v4.3"
44
+ - rails-version: "7.2"
45
+ solidus-branch: "v4.2"
46
+ - rails-version: "7.2"
47
+ solidus-branch: "v4.1"
48
+ - rails-version: "7.1"
49
+ solidus-branch: "v4.2"
50
+ - rails-version: "7.1"
51
+ solidus-branch: "v4.1"
52
+ - ruby-version: "3.4"
53
+ rails-version: "7.0"
54
+ steps:
55
+ - uses: actions/checkout@v4
56
+ - name: Run extension tests
57
+ uses: solidusio/test-solidus-extension@main
58
+ with:
59
+ database: ${{ matrix.database }}
60
+ rails-version: ${{ matrix.rails-version }}
61
+ ruby-version: ${{ matrix.ruby-version }}
62
+ solidus-branch: ${{ matrix.solidus-branch }}
63
+ - name: Upload coverage reports to Codecov
64
+ uses: codecov/codecov-action@v5
65
+ continue-on-error: true
66
+ with:
67
+ token: ${{ secrets.CODECOV_TOKEN }}
68
+ files: ./coverage/coverage.xml
data/.rubocop_todo.yml CHANGED
@@ -164,11 +164,6 @@ Style/ClassAndModuleChildren:
164
164
  - 'app/models/spree/reviews_ability.rb'
165
165
  - 'app/models/spree/reviews_configuration.rb'
166
166
 
167
- # Offense count: 2
168
- Style/ClassVars:
169
- Exclude:
170
- - 'app/decorators/helpers/solidus_reviews/spree/api/api_helpers_decorator.rb'
171
-
172
167
  # Offense count: 1
173
168
  # Configuration parameters: EnforcedStyle.
174
169
  # SupportedStyles: annotated, template, unannotated
data/Gemfile CHANGED
@@ -18,10 +18,8 @@ end
18
18
  # Needed to help Bundler figure out how to resolve dependencies,
19
19
  # otherwise it takes forever to resolve them.
20
20
  # See https://github.com/bundler/bundler/issues/6677
21
- gem 'rails', '>0.a'
22
-
23
- # Provides basic authentication functionality for testing parts of your engine
24
- gem 'solidus_auth_devise'
21
+ rails_version = ENV.fetch('RAILS_VERSION', '7.2')
22
+ gem 'rails', "~> #{rails_version}"
25
23
 
26
24
  case ENV.fetch('DB', nil)
27
25
  when 'mysql'
@@ -29,14 +27,9 @@ when 'mysql'
29
27
  when 'postgresql'
30
28
  gem 'pg'
31
29
  else
32
- gem 'sqlite3'
30
+ gem 'sqlite3', '~> 1.7'
33
31
  end
34
32
 
35
- # While we still support Ruby < 3 we need to workaround a limitation in
36
- # the 'async' gem that relies on the latest ruby, since RubyGems doesn't
37
- # resolve gems based on the required ruby version.
38
- gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
39
-
40
33
  gemspec
41
34
 
42
35
  # Use a local Gemfile to include development dependencies that might not be
@@ -45,3 +38,6 @@ gemspec
45
38
  # We use `send` instead of calling `eval_gemfile` to work around an issue with
46
39
  # how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
47
40
  send(:eval_gemfile, 'Gemfile-local') if File.exist? 'Gemfile-local'
41
+
42
+ # Necessary for Ruby 3.4 support
43
+ gem "csv", "~> 3.3"
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Solidus Reviews
2
2
 
3
- [![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_reviews.svg?style=svg)](https://circleci.com/gh/solidusio-contrib/solidus_reviews)
4
- [![codecov](https://codecov.io/gh/solidusio-contrib/solidus_reviews/branch/master/graph/badge.svg)](https://codecov.io/gh/solidusio-contrib/solidus_reviews)
3
+ [![Test](https://github.com/solidusio-contrib/solidus_reviews/actions/workflows/test.yml/badge.svg)](https://github.com/solidusio-contrib/solidus_reviews/actions/workflows/test.yml)
4
+ [![codecov](https://codecov.io/gh/solidusio-contrib/solidus_reviews/graph/badge.svg?token=khhn97J549)](https://codecov.io/gh/solidusio-contrib/solidus_reviews)
5
5
 
6
6
  Straightforward review/rating functionality, updated for [Solidus](https://solidus.io).
7
7
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Spree::FeedbackReview < ApplicationRecord
3
+ class Spree::FeedbackReview < Spree::Base
4
4
  belongs_to :user, class_name: Spree.user_class.to_s, optional: true
5
5
 
6
6
  belongs_to :review, touch: true
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Spree::Review < ApplicationRecord
3
+ class Spree::Review < Spree::Base
4
4
  belongs_to :product, touch: true, optional: true
5
5
  belongs_to :user, class_name: Spree.user_class.to_s, optional: true
6
6
  has_many :feedback_reviews, dependent: :destroy
@@ -27,6 +27,9 @@ class Spree::Review < ApplicationRecord
27
27
  scope :not_approved, -> { where(approved: false) }
28
28
  scope :default_approval_filter, -> { Spree::Reviews::Config[:include_unapproved_reviews] ? all : approved }
29
29
 
30
+ self.allowed_ransackable_associations = %w[feedback_reviews product user]
31
+ self.allowed_ransackable_attributes = %w[approved name review title]
32
+
30
33
  def feedback_stars
31
34
  return 0 if feedback_reviews.size <= 0
32
35
 
@@ -0,0 +1,3 @@
1
+ <!-- insert_after "[data-hook='product_properties']" -->
2
+
3
+ <%= render "spree/shared/reviews" %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  module SolidusReviews
4
4
  module Spree
5
- module ProductDecorator
5
+ module ProductPatch
6
6
  def self.prepended(base)
7
7
  base.class_eval do
8
8
  has_many :reviews
@@ -2,7 +2,7 @@
2
2
 
3
3
  module SolidusReviews
4
4
  module Spree
5
- module UserDecorator
5
+ module UserPatch
6
6
  def self.prepended(base)
7
7
  base.class_eval do
8
8
  has_many :reviews, class_name: 'Spree::Review'
@@ -1,44 +1,42 @@
1
1
  <% content_for :page_title do %>
2
- <%= I18n.t("spree.feedback_review_for", review: @review.title) %>
2
+ <%= I18n.t("spree.feedback_review_for", review: @review.title) %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <li><%= link_to I18n.t("spree.back_to_reviews"), admin_reviews_path %></li>
6
+ <li><%= link_to I18n.t("spree.back_to_reviews"), admin_reviews_path %></li>
7
7
  <% end %>
8
8
 
9
- <% render 'spree/admin/shared/product_sub_menu' %>
10
-
11
9
  <% if @collection.any? %>
12
- <table class="index">
13
- <colgroup>
14
- <col style="width: 30%;">
15
- <col style="width: 20%;">
16
- <col style="width: 20%;">
17
- <col style="width: 17%;">
18
- </colgroup>
19
- <thead>
20
- <tr>
21
- <th><%= I18n.t("spree.user") %></th>
22
- <th><%= I18n.t("spree.stars") %></th>
23
- <th><%= I18n.t("spree.date") %></th>
24
- <th class="actions"></th>
25
- </tr>
26
- </thead>
27
- <tbody>
28
- <%- @collection.each do |feedback| -%>
29
- <tr id="<%= dom_id(feedback) %>">
30
- <td><%= l feedback.created_at %></td>
31
- <td><%= feedback.user.try(:login) || I18n.t("spree.anonymous") %></td>
32
- <td><%= feedback.rating %></td>
33
- <td class="actions">
34
- <%= link_to_delete feedback, no_text: true %>
35
- </td>
36
- </tr>
37
- <% end %>
38
- </tbody>
39
- </table>
10
+ <table class="index">
11
+ <colgroup>
12
+ <col style="width: 30%;">
13
+ <col style="width: 20%;">
14
+ <col style="width: 20%;">
15
+ <col style="width: 17%;">
16
+ </colgroup>
17
+ <thead>
18
+ <tr>
19
+ <th><%= I18n.t("spree.user") %></th>
20
+ <th><%= I18n.t("spree.stars") %></th>
21
+ <th><%= I18n.t("spree.date") %></th>
22
+ <th class="actions"></th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <%- @collection.each do |feedback| -%>
27
+ <tr id="<%= dom_id(feedback) %>">
28
+ <td><%= l feedback.created_at %></td>
29
+ <td><%= feedback.user.try(:login) || I18n.t("spree.anonymous") %></td>
30
+ <td><%= feedback.rating %></td>
31
+ <td class="actions">
32
+ <%= link_to_delete feedback, no_text: true %>
33
+ </td>
34
+ </tr>
35
+ <% end %>
36
+ </tbody>
37
+ </table>
40
38
  <% else %>
41
- <div class="no-objects-found">
42
- <%= I18n.t("spree.no_results") %>
43
- </div>
39
+ <div class="no-objects-found">
40
+ <%= I18n.t("spree.no_results") %>
41
+ </div>
44
42
  <% end %>
@@ -1,28 +1,26 @@
1
1
  <% content_for :page_title do %>
2
- <%= I18n.t("spree.editing_review_for_html", product_name: @review.product.name) %>
2
+ <%= I18n.t("spree.editing_review_for_html", product_name: @review.product.name) %>
3
3
  <% end %>
4
4
 
5
- <% render 'spree/admin/shared/product_sub_menu' %>
6
-
7
5
  <%= form_for([:admin, @review]) do |f| %>
8
- <div class="alpha eight columns">
9
- <% unless @review.title.blank? %>
10
- <h2><%= @review.title %></h2>
11
- <% end %>
12
- <p>
13
- <%= simple_format(@review.review) %>
14
- </p>
15
- </div>
6
+ <div class="alpha eight columns">
7
+ <% unless @review.title.blank? %>
8
+ <h2><%= @review.title %></h2>
9
+ <% end %>
10
+ <p>
11
+ <%= simple_format(@review.review) %>
12
+ </p>
13
+ </div>
16
14
 
17
- <div class="omega eight columns">
18
- <%= render 'form', f: f %>
19
- </div>
15
+ <div class="omega eight columns">
16
+ <%= render 'form', f: f %>
17
+ </div>
20
18
 
21
- <div class="clear"></div>
19
+ <div class="clear"></div>
22
20
 
23
- <fieldset class="no-border-top">
24
- <% if can? :manage, Spree::Review %>
25
- <%= render 'spree/admin/shared/edit_resource_links' %>
26
- <% end %>
27
- </fieldset>
21
+ <fieldset class="no-border-top">
22
+ <% if can? :manage, Spree::Review %>
23
+ <%= render 'spree/admin/shared/edit_resource_links' %>
24
+ <% end %>
25
+ </fieldset>
28
26
  <% end %>
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.config.after_initialize do
4
+ Spree::Backend::Config.configure do |config|
5
+ config.menu_items = config.menu_items.map do |item|
6
+ if item.label.to_sym == :settings
7
+ # The API of the MenuItem class changes in Solidus 4.2.0
8
+ if item.respond_to?(:children)
9
+ item.children << Spree::BackendConfiguration::MenuItem.new(
10
+ label: :reviews,
11
+ condition: -> { can?(:admin, Spree::ReviewsConfiguration) },
12
+ url: -> { Spree::Core::Engine.routes.url_helpers.edit_admin_review_settings_path },
13
+ match_path: /review_settings/
14
+ )
15
+ else
16
+ item.sections << :reviews
17
+ end
18
+ elsif item.label.to_sym == :products
19
+ if item.respond_to?(:children)
20
+ item.children << Spree::BackendConfiguration::MenuItem.new(
21
+ label: :reviews,
22
+ condition: -> { can?(:admin, Spree::Review) },
23
+ url: -> { Spree::Core::Engine.routes.url_helpers.admin_reviews_path },
24
+ match_path: /reviews/
25
+ )
26
+ else
27
+ item.sections << :reviews
28
+ end
29
+ end
30
+ item
31
+ end
32
+ end
33
+ end
@@ -3,9 +3,10 @@
3
3
  module SolidusReviews
4
4
  module Spree
5
5
  module Api
6
- module ApiHelpersDecorator
6
+ module ApiHelpersPatch
7
7
  def self.prepended(base)
8
8
  base.module_eval do
9
+ # rubocop:disable Style/ClassVars
9
10
  @@review_attributes = [
10
11
  :id, :product_id, :name, :location, :rating, :title, :review, :approved,
11
12
  :created_at, :updated_at, :user_id, :ip_address, :locale, :show_identifier,
@@ -15,6 +16,7 @@ module SolidusReviews
15
16
  @@feedback_review_attributes = [
16
17
  :id, :user_id, :review_id, :rating, :comment, :created_at, :updated_at, :locale
17
18
  ]
19
+ # rubocop:enable Style/ClassVars
18
20
 
19
21
  def review_attributes
20
22
  @@review_attributes
@@ -25,7 +27,6 @@ module SolidusReviews
25
27
  end
26
28
  end
27
29
  end
28
-
29
30
  ::Spree::Api::ApiHelpers.prepend self
30
31
  end
31
32
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module SolidusReviews
4
4
  module Spree
5
- module ProductsControllerDecorator
5
+ module ProductsControllerPatch
6
6
  def self.prepended(base)
7
7
  base.class_eval do
8
8
  helper ::Spree::ReviewsHelper
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusReviews
4
- VERSION = '1.6.0'
4
+ VERSION = '1.8.0'
5
5
  end
@@ -28,9 +28,10 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
+ spec.add_dependency 'deface', ['>= 1.9.0', '< 2.0']
31
32
  spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 5']
32
- spec.add_dependency 'solidus_support', '~> 0.8'
33
+ spec.add_dependency 'solidus_support', ['>= 0.14.1', '< 1']
33
34
 
34
35
  spec.add_development_dependency 'rails-controller-testing'
35
- spec.add_development_dependency 'solidus_dev_support', '~> 2.7'
36
+ spec.add_development_dependency 'solidus_dev_support', ['>= 2.11', '< 3']
36
37
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'spec_helper'
4
+ require 'spree/testing_support/authorization_helpers'
4
5
 
5
6
  describe 'Reviews', js: true do
6
7
  let!(:someone) { create(:user, email: 'ryan@spree.com') }
@@ -125,12 +126,11 @@ describe 'Reviews', js: true do
125
126
  private
126
127
 
127
128
  def sign_in_as!(user)
128
- visit spree.login_path
129
- within '#new_spree_user' do
130
- fill_in 'Email', with: user.email
131
- fill_in 'Password', with: user.password
132
- end
133
- click_button 'Login'
129
+ # rubocop:disable RSpec/AnyInstance
130
+ allow_any_instance_of(ApplicationController).to receive_messages current_user: user
131
+ allow_any_instance_of(ApplicationController).to receive_messages spree_current_user: user
132
+ allow_any_instance_of(ApplicationController).to receive_messages spree_user_signed_in?: true
133
+ # rubocop:enable RSpec/AnyInstance
134
134
  end
135
135
 
136
136
  def click_star(num)
@@ -123,6 +123,18 @@ describe Spree::Review do
123
123
  end
124
124
  end
125
125
 
126
+ describe '.ransackable_attributes' do
127
+ subject { described_class.ransackable_attributes }
128
+
129
+ it { is_expected.to contain_exactly("id", "approved", "name", "review", "title") }
130
+ end
131
+
132
+ describe '.ransackable_associations' do
133
+ subject { described_class.ransackable_associations }
134
+
135
+ it { is_expected.to contain_exactly("feedback_reviews", "product", "user") }
136
+ end
137
+
126
138
  describe '#recalculate_product_rating' do
127
139
  let(:product) { create(:product) }
128
140
  let!(:review) { create(:review, product: product) }
@@ -3,7 +3,8 @@
3
3
  * Home: http://www.fyneworks.com/jquery/star-rating/
4
4
  * Code: http://code.google.com/p/jquery-star-rating-plugin/
5
5
  *
6
- * Licensed under http://en.wikipedia.org/wiki/MIT_License
6
+ * Licensed under http://en.wikipedia.org/wiki/MIT_License
7
+ * Copyright by Fyneworks.com
7
8
  ###
8
9
  */
9
10
 
metadata CHANGED
@@ -1,15 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_reviews
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Contrib
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-06-20 00:00:00.000000000 Z
10
+ date: 2025-02-27 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: deface
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 1.9.0
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 1.9.0
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '2.0'
13
32
  - !ruby/object:Gem::Dependency
14
33
  name: solidus_core
15
34
  requirement: !ruby/object:Gem::Requirement
@@ -34,16 +53,22 @@ dependencies:
34
53
  name: solidus_support
35
54
  requirement: !ruby/object:Gem::Requirement
36
55
  requirements:
37
- - - "~>"
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: 0.14.1
59
+ - - "<"
38
60
  - !ruby/object:Gem::Version
39
- version: '0.8'
61
+ version: '1'
40
62
  type: :runtime
41
63
  prerelease: false
42
64
  version_requirements: !ruby/object:Gem::Requirement
43
65
  requirements:
44
- - - "~>"
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 0.14.1
69
+ - - "<"
45
70
  - !ruby/object:Gem::Version
46
- version: '0.8'
71
+ version: '1'
47
72
  - !ruby/object:Gem::Dependency
48
73
  name: rails-controller-testing
49
74
  requirement: !ruby/object:Gem::Requirement
@@ -62,25 +87,32 @@ dependencies:
62
87
  name: solidus_dev_support
63
88
  requirement: !ruby/object:Gem::Requirement
64
89
  requirements:
65
- - - "~>"
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '2.11'
93
+ - - "<"
66
94
  - !ruby/object:Gem::Version
67
- version: '2.7'
95
+ version: '3'
68
96
  type: :development
69
97
  prerelease: false
70
98
  version_requirements: !ruby/object:Gem::Requirement
71
99
  requirements:
72
- - - "~>"
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '2.11'
103
+ - - "<"
73
104
  - !ruby/object:Gem::Version
74
- version: '2.7'
105
+ version: '3'
75
106
  description: Review and rating functionality for your Solidus store.
76
- email:
77
107
  executables: []
78
108
  extensions: []
79
109
  extra_rdoc_files: []
80
110
  files:
81
- - ".circleci/config.yml"
82
111
  - ".gem_release.yml"
112
+ - ".github/dependabot.yml"
83
113
  - ".github/stale.yml"
114
+ - ".github/workflows/lint.yml"
115
+ - ".github/workflows/test.yml"
84
116
  - ".github_changelog_generator"
85
117
  - ".gitignore"
86
118
  - ".rspec"
@@ -104,10 +136,6 @@ files:
104
136
  - app/controllers/spree/admin/reviews_controller.rb
105
137
  - app/controllers/spree/feedback_reviews_controller.rb
106
138
  - app/controllers/spree/reviews_controller.rb
107
- - app/decorators/controllers/solidus_reviews/spree/products_controller_decorator.rb
108
- - app/decorators/helpers/solidus_reviews/spree/api/api_helpers_decorator.rb
109
- - app/decorators/models/solidus_reviews/spree/product_decorator.rb
110
- - app/decorators/models/solidus_reviews/spree/user_decorator.rb
111
139
  - app/helpers/spree/reviews_helper.rb
112
140
  - app/models/spree/feedback_review.rb
113
141
  - app/models/spree/permission_sets/review_display.rb
@@ -115,18 +143,14 @@ files:
115
143
  - app/models/spree/review.rb
116
144
  - app/models/spree/reviews_ability.rb
117
145
  - app/models/spree/reviews_configuration.rb
118
- - app/overrides/add_reviews_after_product_properties.rb
119
- - app/overrides/add_reviews_tab_to_admin.rb
120
- - app/overrides/add_reviews_to_admin_configuration_sidebar.rb
146
+ - app/overrides/spree/products/show/add_reviews_after_product_properties.html.erb.deface
147
+ - app/patches/models/solidus_reviews/spree/product_patch.rb
148
+ - app/patches/models/solidus_reviews/spree/user_patch.rb
121
149
  - app/views/spree/admin/feedback_reviews/index.html.erb
122
150
  - app/views/spree/admin/review_settings/edit.html.erb
123
151
  - app/views/spree/admin/reviews/_form.html.erb
124
152
  - app/views/spree/admin/reviews/edit.html.erb
125
153
  - app/views/spree/admin/reviews/index.html.erb
126
- - app/views/spree/api/reviews/_feedback_review.json.jbuilder
127
- - app/views/spree/api/reviews/_review.json.jbuilder
128
- - app/views/spree/api/reviews/index.json.jbuilder
129
- - app/views/spree/api/reviews/show.json.jbuilder
130
154
  - app/views/spree/feedback_reviews/_form.html.erb
131
155
  - app/views/spree/feedback_reviews/_summary.html.erb
132
156
  - app/views/spree/feedback_reviews/create.js.erb
@@ -147,6 +171,7 @@ files:
147
171
  - bin/rake
148
172
  - bin/sandbox
149
173
  - bin/setup
174
+ - config/initializers/add_spree_reviews_to_menu.rb
150
175
  - config/initializers/constants.rb
151
176
  - config/initializers/load_preferences.rb
152
177
  - config/locales/de-CH.yml
@@ -184,6 +209,8 @@ files:
184
209
  - lib/controllers/spree/api/reviews_controller.rb
185
210
  - lib/generators/solidus_reviews/install/install_generator.rb
186
211
  - lib/generators/solidus_reviews/install/templates/initializer.rb
212
+ - lib/patches/api/helpers/solidus_reviews/spree/api/api_helpers_patch.rb
213
+ - lib/patches/frontend/controllers/solidus_reviews/spree/products_controller_patch.rb
187
214
  - lib/solidus_reviews.rb
188
215
  - lib/solidus_reviews/configuration.rb
189
216
  - lib/solidus_reviews/engine.rb
@@ -191,6 +218,10 @@ files:
191
218
  - lib/solidus_reviews/factories/review_factory.rb
192
219
  - lib/solidus_reviews/testing_support/factories.rb
193
220
  - lib/solidus_reviews/version.rb
221
+ - lib/views/api/spree/api/reviews/_feedback_review.json.jbuilder
222
+ - lib/views/api/spree/api/reviews/_review.json.jbuilder
223
+ - lib/views/api/spree/api/reviews/index.json.jbuilder
224
+ - lib/views/api/spree/api/reviews/show.json.jbuilder
194
225
  - solidus_reviews.gemspec
195
226
  - spec/controllers/spree/admin/feedback_reviews_controller_spec.rb
196
227
  - spec/controllers/spree/admin/review_settings_controller_spec.rb
@@ -218,7 +249,6 @@ metadata:
218
249
  homepage_uri: https://github.com/solidusio-contrib/solidus_reviews
219
250
  source_code_uri: https://github.com/solidusio-contrib/solidus_reviews
220
251
  changelog_uri: https://github.com/solidusio-contrib/solidus_reviews/releases
221
- post_install_message:
222
252
  rdoc_options: []
223
253
  require_paths:
224
254
  - lib
@@ -233,8 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
263
  - !ruby/object:Gem::Version
234
264
  version: '0'
235
265
  requirements: []
236
- rubygems_version: 3.4.6
237
- signing_key:
266
+ rubygems_version: 3.6.5
238
267
  specification_version: 4
239
268
  summary: Review and rating functionality for your Solidus store.
240
269
  test_files:
data/.circleci/config.yml DELETED
@@ -1,61 +0,0 @@
1
- version: 2.1
2
-
3
- orbs:
4
- # Required for feature specs.
5
- browser-tools: circleci/browser-tools@1.1
6
-
7
- # Always take the latest version of the orb, this allows us to
8
- # run specs against Solidus supported versions only without the need
9
- # to change this configuration every time a Solidus version is released
10
- # or goes EOL.
11
- solidusio_extensions: solidusio/extensions@volatile
12
-
13
- jobs:
14
- run-specs-with-sqlite:
15
- executor:
16
- name: solidusio_extensions/sqlite
17
- ruby_version: "3.0"
18
- steps:
19
- - browser-tools/install-chrome
20
- - solidusio_extensions/run-tests
21
- run-specs-with-postgres:
22
- executor:
23
- name: solidusio_extensions/postgres
24
- ruby_version: "3.0"
25
- steps:
26
- - browser-tools/install-chrome
27
- - solidusio_extensions/run-tests
28
- run-specs-with-mysql:
29
- executor:
30
- name: solidusio_extensions/mysql
31
- ruby_version: "3.0"
32
- steps:
33
- - browser-tools/install-chrome
34
- - solidusio_extensions/run-tests
35
- lint-code:
36
- executor:
37
- name: solidusio_extensions/sqlite-memory
38
- ruby_version: "3.0"
39
- steps:
40
- - solidusio_extensions/lint-code
41
-
42
- workflows:
43
- "Run specs on supported Solidus versions":
44
- jobs:
45
- - run-specs-with-sqlite
46
- - run-specs-with-postgres
47
- - run-specs-with-mysql
48
- - lint-code
49
-
50
- "Weekly run specs against master":
51
- triggers:
52
- - schedule:
53
- cron: "0 0 * * 4" # every Thursday
54
- filters:
55
- branches:
56
- only:
57
- - master
58
- jobs:
59
- - run-specs-with-sqlite
60
- - run-specs-with-postgres
61
- - run-specs-with-mysql
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Deface::Override.new(virtual_path: "spree/products/show",
4
- name: "converted_product_properties_767643482",
5
- insert_after: "[data-hook='product_properties']",
6
- partial: "spree/shared/reviews",
7
- disabled: false)
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Spree::Backend::Config.configure do |config|
4
- config.menu_items.detect { |menu_item|
5
- menu_item.label == :products
6
- }.sections << :reviews
7
- end
8
-
9
- Deface::Override.new(
10
- virtual_path: "spree/admin/shared/_product_sub_menu",
11
- name: "reviews_admin_tab",
12
- insert_bottom: "[data-hook='admin_product_sub_tabs']",
13
- disabled: false
14
- ) do
15
- <<-HTML
16
- <% if can? :admin, Spree::Review %>
17
- <%= tab(:reviews, label: 'review_management') %>
18
- <% end %>
19
- HTML
20
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Spree::Backend::Config.configure do |config|
4
- config.menu_items.detect { |menu_item|
5
- menu_item.label == :settings
6
- }.sections << :review_settings
7
- end
8
-
9
- Deface::Override.new(
10
- virtual_path: "spree/admin/shared/_settings_sub_menu",
11
- name: "converted_admin_configurations_menu",
12
- insert_bottom: "[data-hook='admin_settings_sub_tabs']",
13
- disabled: false
14
- ) do
15
- <<-HTML
16
- <% if can? :admin, Spree::ReviewsConfiguration %>
17
- <%= tab :reviews, url: spree.edit_admin_review_settings_path, match_path: /review_settings/ %>
18
- <% end %>
19
- HTML
20
- end