solidus_frontend 4.6.4 → 4.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d59375232a4fd5f7d8022ca5aa6e13db48c66b5042b2cc55f6a19c94a91ed96
4
- data.tar.gz: e6a0feec370f914af45135ecbdf010490b962d378511d1039856ab09b6f44a0e
3
+ metadata.gz: 5294035bcb041247624c2b5e25e0ffe1b12e3e3c9ac4f062e5c2f5ab4b5f6700
4
+ data.tar.gz: 893761e7a21db3961bdf924429d362f201bf2e02c7adab47ca5f7c0f72886a7e
5
5
  SHA512:
6
- metadata.gz: a1a490324406639835b1d18b99065588231e6c398dc8c4fd31244ac52087fa7407330490b7e17be337205744acee1099734f00a6df34ff2bc735e7b1560c053a
7
- data.tar.gz: ce59a8716f720a291abc7a5c8360ac16542177e15a035b82e775c526c7ef045405f80b51fdb2c266d2cdb9b17358fd23f182b9f5d54a9a38dc2612cb86002da8
6
+ metadata.gz: 8395ea1b598f71430ea76f48933640fc919e982a709179ec1a260091e0326455e0a634bd27660aa4115986f42a487212407cc79a031da3e50437b2973bbcd409
7
+ data.tar.gz: f4ed0596aa980976745450b96408618c4d6ff0d9362205f5b0deaa5ab7b157ede1b8e099f3e0670444a72a88f1cb00846c10c8dcbbf4fbef5f26fdc8b400c361
@@ -4,7 +4,7 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
- - v4.6
7
+ - v4.7
8
8
  pull_request:
9
9
  workflow_dispatch:
10
10
  schedule:
@@ -21,5 +21,5 @@ jobs:
21
21
  test:
22
22
  uses: solidusio/test-solidus-extension/.github/workflows/test.yml@main
23
23
  with:
24
- solidus_branches: '["v4.6"]'
24
+ solidus_branches: '["v4.7"]'
25
25
  ruby_versions: '["3.2", "3.4"]'
data/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- branch = ENV.fetch('SOLIDUS_BRANCH', 'v4.6')
5
+ branch = ENV.fetch('SOLIDUS_BRANCH', 'v4.7')
6
6
 
7
7
  # The storefront's promotion features build on the legacy promotion
8
8
  # system, which lives in the solidus_legacy_promotions gem since Solidus
@@ -13,9 +13,6 @@ gem 'solidus', git: "https://github.com/solidusio/solidus.git", branch: branch
13
13
  rails_version = ENV.fetch('RAILS_VERSION', '7.2')
14
14
  gem 'rails', "~> #{rails_version}"
15
15
 
16
- # json 3 is incompatible with Rails < 8.1.
17
- gem 'json', '< 3', require: false
18
-
19
16
  # Temporarily locking sprockets to v3.x
20
17
  # see https://github.com/solidusio/solidus/issues/3374
21
18
  # and https://github.com/rails/sprockets-rails/issues/369
@@ -6,13 +6,14 @@ module Spree
6
6
 
7
7
  respond_to :html
8
8
 
9
+ before_action :store_guest_token
9
10
  before_action :assign_order, only: :update
10
11
  # note: do not lock the #edit action because that's where we redirect when we fail to acquire a lock
11
12
  around_action :lock_order, only: :update
12
13
 
13
14
  def show
14
15
  @order = Spree::Order.find_by!(number: params[:id])
15
- authorize! :show, @order, params[:token] || cookies.signed[:guest_token]
16
+ authorize! :show, @order, cookies.signed[:guest_token]
16
17
  end
17
18
 
18
19
  def update
@@ -101,6 +102,10 @@ module Spree
101
102
 
102
103
  private
103
104
 
105
+ def store_guest_token
106
+ cookies.permanent.signed[:guest_token] = params[:token] if params[:token]
107
+ end
108
+
104
109
  def order_params
105
110
  if params[:order]
106
111
  params[:order].permit(*permitted_order_attributes)
@@ -8,11 +8,7 @@ module Spree
8
8
  include TruncateHtmlHelper
9
9
 
10
10
  def truncated_product_description(product)
11
- if Spree::Config.show_raw_product_description
12
- truncate_html(raw(product.description))
13
- else
14
- truncate_html(sanitize(product.description))
15
- end
11
+ truncate_html(raw(product.description))
16
12
  end
17
13
 
18
14
  def order_just_completed?(order)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Spree
4
4
  module Frontend
5
- VERSION = "4.6.4"
5
+ VERSION = "4.7.0"
6
6
 
7
7
  def self.version
8
8
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.4
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team