solidus_core 4.2.3 → 4.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7938f34b4bcad40238d6e3b65de04d09adf33f858d356a4018e9786ca4ed6ab
4
- data.tar.gz: 195dee172feed70780658e7bc036ee937968f49890d4d2ef7c0b0e8ad2444d8e
3
+ metadata.gz: 0eb60fcde264131cbc3b6bdfcdced0854de8aa26dca53f8b68faeeebb9206391
4
+ data.tar.gz: 498d88f29ce16037d2acfadaccc9ae4416323cb60856bcc054236b068ba323e4
5
5
  SHA512:
6
- metadata.gz: dac210f0e4f20d0d0d5ffb9b4544855ecb4577674283340a27c21943df9949d9a56bfeb514efa5ad70892ec3ecdc65d7134adb01b1861fd2567d9b289dd663b6
7
- data.tar.gz: c7ee0dd8abcc63ac7efc17b6736da623e0ed9ff57c9954c3ef90666aea214d348dca3893b21b97aa883bfb8a493a7a6fca69b2e0507a9d3be2e7b60da855cbab
6
+ metadata.gz: 69fb3f9bff92c01cb7794aa6d4814cd70015b8c815890bb96bca93cbfd145efd8600478db7c33d0db6dec415b121503393965f7c54e4d8e94ea913ad3ae84c28
7
+ data.tar.gz: bb83b03b5eaf069d76aeaacf1affa007c1a8e7cd135b08f9dcf77dac506a20e3476307878223bc9401be18d380880a49e3344bcb47754646dfca15226369b826
@@ -630,7 +630,7 @@ module Spree
630
630
  if can_complete? || complete?
631
631
  valid_store_credit_payments.to_a.sum(&:amount)
632
632
  else
633
- [total, (user.try(:available_store_credit_total, currency: currency) || 0.0)].min
633
+ [total, user.try(:available_store_credit_total, currency: currency) || 0.0].min
634
634
  end
635
635
  end
636
636
 
@@ -73,7 +73,7 @@ module Spree
73
73
 
74
74
  unless promotion.eligible?(order, promotion_code: promotion_code)
75
75
  set_promotion_eligibility_error_code(promotion)
76
- return (error || ineligible_for_this_order)
76
+ return error || ineligible_for_this_order
77
77
  end
78
78
 
79
79
  # If any of the actions for the promotion return `true`,
@@ -24,7 +24,7 @@ module Spree
24
24
 
25
25
  def hash_to_packages(categories)
26
26
  packages = []
27
- categories.each do |_id, contents|
27
+ categories.each_value do |contents|
28
28
  packages << build_package(contents)
29
29
  end
30
30
  packages
@@ -44,6 +44,7 @@ module Spree
44
44
  opts[:skip_yarn] = true
45
45
  opts[:skip_bootsnap] = true
46
46
  opts[:skip_javascript] = true
47
+ opts[:skip_action_cable] = true
47
48
 
48
49
  puts "Generating dummy Rails application..."
49
50
  invoke Rails::Generators::AppGenerator,
@@ -3,7 +3,7 @@
3
3
  'mysql'
4
4
  when 'postgres', 'postgresql'
5
5
  'postgres'
6
- when 'sqlite', '', nil
6
+ when /sqlite3?/, '', nil
7
7
  'sqlite'
8
8
  else
9
9
  raise "Invalid DB specified: #{ENV['DB']}"
@@ -19,7 +19,7 @@
19
19
  <% db_username = ENV['DB_USERNAME'] %>
20
20
  <% db_password = ENV['DB_PASSWORD'] %>
21
21
 
22
- <% case ENV['DB']
22
+ <% case db
23
23
  when 'mysql' %>
24
24
  development:
25
25
  adapter: mysql2
@@ -22,6 +22,8 @@ require "spree/core/search/variant"
22
22
  require 'spree/preferences/configuration'
23
23
  require 'spree/core/environment'
24
24
 
25
+ require 'uri'
26
+
25
27
  module Spree
26
28
  class AppConfiguration < Preferences::Configuration
27
29
  # Preferences (alphabetized to more easily lookup particular preferences)
@@ -46,7 +46,11 @@ module Spree
46
46
 
47
47
  # Persist the state on the order
48
48
  after_transition do |order, transition|
49
- order.state = order.state
49
+ # Hard to say if this is really necessary, it was introduced in this commit:
50
+ # https://github.com/mamhoff/solidus/commit/fa1d66c42e4c04ee7cd1c20d87e4cdb74a226d3d
51
+ # But it seems to be harmless, so we'll keep it for now.
52
+ order.state = order.state # rubocop:disable Lint/SelfAssignment
53
+
50
54
  order.state_changes.create(
51
55
  previous_state: transition.from,
52
56
  next_state: transition.to,
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "4.2.3"
4
+ VERSION = "4.2.4"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
data/lib/spree/money.rb CHANGED
@@ -35,7 +35,7 @@ module Spree
35
35
  if amount.is_a?(::Money)
36
36
  @money = amount
37
37
  else
38
- currency = (options[:currency] || Spree::Config[:currency])
38
+ currency = options[:currency] || Spree::Config[:currency]
39
39
 
40
40
  @money = Monetize.from_string(amount, currency)
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-02 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -1048,7 +1048,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1048
1048
  - !ruby/object:Gem::Version
1049
1049
  version: 1.8.23
1050
1050
  requirements: []
1051
- rubygems_version: 3.4.17
1051
+ rubygems_version: 3.4.19
1052
1052
  signing_key:
1053
1053
  specification_version: 4
1054
1054
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.