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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60bc6136c2e7e1fd1be7907da852474c4f3205c7e0f999d6ec4a072bec969add
4
- data.tar.gz: 79304471bb793a689ba46407ed43dc5f510cc652a71e38bc1a763b552c56d9ec
3
+ metadata.gz: 0eb60fcde264131cbc3b6bdfcdced0854de8aa26dca53f8b68faeeebb9206391
4
+ data.tar.gz: 498d88f29ce16037d2acfadaccc9ae4416323cb60856bcc054236b068ba323e4
5
5
  SHA512:
6
- metadata.gz: 965858227459fec4e4ff4472c539732607ab4e7dfbc192d478e6c928d0574ac0693c547dc08f90ee72189c87541bc01ec6b06dcc2fb63cff4cf617602073b974
7
- data.tar.gz: b9c13fe8be48599e2614f06d0d08e1b1ca914876dd45cb43488a23932d60f9c61852a5173ab4657f63ee898d5ead1e8c293b4518092ae9079ba435eb8a78f938
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.2"
4
+ VERSION = "4.2.4"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
data/lib/spree/core.rb CHANGED
@@ -6,6 +6,7 @@ require "action_view/railtie"
6
6
  require "active_job/railtie"
7
7
  require "active_model/railtie"
8
8
  require "active_record/railtie"
9
+ require "active_storage/engine"
9
10
  require "sprockets/railtie"
10
11
 
11
12
  require 'active_support/deprecation'
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
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.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: 2023-11-01 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
@@ -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.17
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.