solidus_core 4.2.2 → 4.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/order.rb +1 -1
- data/app/models/spree/promotion_handler/coupon.rb +1 -1
- data/app/models/spree/stock/splitter/shipping_category.rb +1 -1
- data/lib/generators/spree/dummy/dummy_generator.rb +1 -0
- data/lib/generators/spree/dummy/templates/rails/database.yml +2 -2
- data/lib/spree/app_configuration.rb +2 -0
- data/lib/spree/core/state_machines/order.rb +5 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core.rb +1 -0
- data/lib/spree/money.rb +1 -1
- data/solidus_core.gemspec +1 -1
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0eb60fcde264131cbc3b6bdfcdced0854de8aa26dca53f8b68faeeebb9206391
|
4
|
+
data.tar.gz: 498d88f29ce16037d2acfadaccc9ae4416323cb60856bcc054236b068ba323e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69fb3f9bff92c01cb7794aa6d4814cd70015b8c815890bb96bca93cbfd145efd8600478db7c33d0db6dec415b121503393965f7c54e4d8e94ea913ad3ae84c28
|
7
|
+
data.tar.gz: bb83b03b5eaf069d76aeaacf1affa007c1a8e7cd135b08f9dcf77dac506a20e3476307878223bc9401be18d380880a49e3344bcb47754646dfca15226369b826
|
data/app/models/spree/order.rb
CHANGED
@@ -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,
|
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
|
76
|
+
return error || ineligible_for_this_order
|
77
77
|
end
|
78
78
|
|
79
79
|
# If any of the actions for the promotion return `true`,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
'mysql'
|
4
4
|
when 'postgres', 'postgresql'
|
5
5
|
'postgres'
|
6
|
-
when
|
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
|
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
|
-
|
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,
|
data/lib/spree/core/version.rb
CHANGED
data/lib/spree/core.rb
CHANGED
data/lib/spree/money.rb
CHANGED
data/solidus_core.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
%w[
|
27
27
|
actionmailer actionpack actionview activejob activemodel activerecord
|
28
|
-
activesupport railties
|
28
|
+
activestorage activesupport railties
|
29
29
|
].each do |rails_dep|
|
30
30
|
s.add_dependency rails_dep, ['>= 7.0', '< 7.1']
|
31
31
|
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.
|
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:
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -130,6 +130,26 @@ dependencies:
|
|
130
130
|
- - "<"
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '7.1'
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: activestorage
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '7.0'
|
140
|
+
- - "<"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '7.1'
|
143
|
+
type: :runtime
|
144
|
+
prerelease: false
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ">="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '7.0'
|
150
|
+
- - "<"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '7.1'
|
133
153
|
- !ruby/object:Gem::Dependency
|
134
154
|
name: activesupport
|
135
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1028,7 +1048,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1028
1048
|
- !ruby/object:Gem::Version
|
1029
1049
|
version: 1.8.23
|
1030
1050
|
requirements: []
|
1031
|
-
rubygems_version: 3.4.
|
1051
|
+
rubygems_version: 3.4.19
|
1032
1052
|
signing_key:
|
1033
1053
|
specification_version: 4
|
1034
1054
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|