solidus_frontend 3.0.8 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_frontend might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2001b7c2ecfac0a27e85416f08b4b7ecf4d57ee056c2a85ed1065f3f9061b8cf
4
- data.tar.gz: 2c842aa15ffcbbacbc6e2296ea3af3e1ad4e6689f4d5f9241775ee9ef511780d
3
+ metadata.gz: 62653584365f7feb30418391dae86ad065d9873f86edb921dec1432198f0c9d5
4
+ data.tar.gz: dcb5c77f653b65f24836cafbb04d88bf3a282d763e2b5b0416a39bd491efa8c4
5
5
  SHA512:
6
- metadata.gz: b7095dc36e14c911a537fca71d952f896d86017c19e488ed5487d5efeab9290cc5879e863c98c1b2c9a575b415c1bf722c1bf92baa8f7e81cf8905074c90458d
7
- data.tar.gz: bd1261019adfeb19d4a74b27a6d35f49fdba37794c7cf3ca3d1b2b5d4a85e11b30429a0221993c76af17e898022d2dd63006a3439297f626f5ad7db0ffc822ec
6
+ metadata.gz: 9763134a7d86ff644b5e8025d2aa62c243bbcab708610d834451fe2304a4fb97105ef4c5758906861b7c27e3ffc74adec170653255902ef3eec5a0043d71e25a
7
+ data.tar.gz: aa17b59fe8c6967a4499cd1ddb871c8f043ce66d364dcbfbcd507e6757b13886cc3a5b1f26279726c23e9f2e7ac8790dae83a8cf52695fc836f05a1d5883dec7
@@ -21,7 +21,7 @@ $cart_total_text_color: #FFFFFF !default;
21
21
  /*--------------------------------------*/
22
22
  /* Fonts import from remote
23
23
  /*--------------------------------------*/
24
- @import url(https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic|&subset=latin,cyrillic,greek,greek-ext,latin-ext,cyrillic-ext);
24
+ @import url(//fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic|&subset=latin,cyrillic,greek,greek-ext,latin-ext,cyrillic-ext);
25
25
 
26
26
  /*--------------------------------------*/
27
27
  /* Font families
@@ -3,12 +3,11 @@
3
3
  module Spree
4
4
  class LocaleController < Spree::StoreController
5
5
  def set
6
- available_locales = Spree.i18n_available_locales
7
6
  requested_locale = params[:switch_to_locale] || params[:locale]
8
7
 
9
- if requested_locale && available_locales.map(&:to_s).include?(requested_locale)
10
- session[set_user_language_locale_key] = requested_locale
8
+ if locale_is_available?(requested_locale)
11
9
  I18n.locale = requested_locale
10
+ session[set_user_language_locale_key] = requested_locale
12
11
  flash.notice = t('spree.locale_changed')
13
12
  else
14
13
  flash[:error] = t('spree.locale_not_changed')
@@ -16,5 +15,11 @@ module Spree
16
15
 
17
16
  redirect_to spree.root_path
18
17
  end
18
+
19
+ private
20
+
21
+ def locale_is_available?(locale)
22
+ locale && Spree.i18n_available_locales.include?(locale.to_sym)
23
+ end
19
24
  end
20
25
  end
@@ -10,6 +10,7 @@ module Spree
10
10
  before_action :assign_order, only: :update
11
11
  # note: do not lock the #edit action because that's where we redirect when we fail to acquire a lock
12
12
  around_action :lock_order, only: :update
13
+ skip_before_action :verify_authenticity_token, only: [:populate]
13
14
 
14
15
  def show
15
16
  @order = Spree::Order.find_by!(number: params[:id])
@@ -7,7 +7,7 @@
7
7
  <ul>
8
8
  <% @product.variants_and_option_values_for(current_pricing_options).each_with_index do |variant, index| %>
9
9
  <li>
10
- <%= radio_button_tag "variant_id", variant.id, index == 0, 'data-price' => variant.price_for(current_pricing_options) %>
10
+ <%= radio_button_tag "variant_id", variant.id, index == 0, 'data-price' => variant.price_for_options(current_pricing_options)&.money %>
11
11
  <%= label_tag "variant_id_#{ variant.id }" do %>
12
12
  <span class="variant-description">
13
13
  <%= variant_options variant %>
@@ -28,13 +28,13 @@
28
28
  <%= hidden_field_tag "variant_id", @product.master.id %>
29
29
  <% end %>
30
30
 
31
- <% if @product.price_for(current_pricing_options) and !@product.price.nil? %>
31
+ <% if @product.price_for_options(current_pricing_options) and !@product.price.nil? %>
32
32
  <div data-hook="product_price" class="columns five <%= !@product.has_variants? ? 'alpha' : 'omega' %>">
33
33
 
34
34
  <div id="product-price">
35
35
  <h6 class="product-section-title"><%= t('spree.price') %></h6>
36
36
  <div>
37
- <span class="price selling" itemprop="price" content="<%= @product.price_for(current_pricing_options).to_d %>">
37
+ <span class="price selling" itemprop="price" content="<%= @product.price_for_options(current_pricing_options).amount %>">
38
38
  <%= display_price(@product) %>
39
39
  </span>
40
40
  <span itemprop="priceCurrency" content="<%= current_pricing_options.currency %>"></span>
@@ -32,7 +32,7 @@
32
32
  </div>
33
33
  <%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
34
34
  <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
35
- <% if price = product.price_for(current_pricing_options) %>
35
+ <% if price = product.price_for_options(current_pricing_options)&.money %>
36
36
  <span class="price selling" itemprop="price" content="<%= price.to_d %>">
37
37
  <%= price.to_html %>
38
38
  </span>
@@ -10,6 +10,10 @@ module Spree
10
10
  # Leave initializer empty for backwards-compatability. Other apps
11
11
  # might still rely on this event.
12
12
  initializer "spree.frontend.environment", before: :load_config_initializers do; end
13
+
14
+ config.after_initialize do
15
+ Spree::Frontend::Config.check_load_defaults_called('Spree::Frontend::Config')
16
+ end
13
17
  end
14
18
  end
15
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-22 00:00:00.000000000 Z
11
+ date: 2021-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.8
19
+ version: 3.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.8
26
+ version: 3.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.8
33
+ version: 3.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.8
40
+ version: 3.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: canonical-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  - !ruby/object:Gem::Version
305
305
  version: 1.8.23
306
306
  requirements: []
307
- rubygems_version: 3.3.7
307
+ rubygems_version: 3.2.20
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: Cart and storefront for the Solidus e-commerce project.