solidus_core 2.11.10 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree.js.erb +0 -51
- data/app/helpers/spree/store_helper.rb +0 -11
- data/app/mailers/spree/carton_mailer.rb +1 -5
- data/app/models/concerns/spree/adjustment_source.rb +0 -15
- data/app/models/concerns/spree/calculated_adjustments.rb +0 -18
- data/app/models/concerns/spree/soft_deletable.rb +2 -4
- data/app/models/concerns/spree/user_address_book.rb +0 -37
- data/app/models/concerns/spree/user_methods.rb +2 -11
- data/app/models/spree/ability.rb +0 -37
- data/app/models/spree/address/name.rb +2 -20
- data/app/models/spree/address.rb +8 -186
- data/app/models/spree/adjustment.rb +0 -28
- data/app/models/spree/base.rb +0 -53
- data/app/models/spree/calculator/flexi_rate.rb +0 -5
- data/app/models/spree/calculator.rb +0 -7
- data/app/models/spree/country.rb +1 -6
- data/app/models/spree/credit_card.rb +0 -27
- data/app/models/spree/customer_return.rb +1 -4
- data/app/models/spree/image.rb +0 -7
- data/app/models/spree/inventory_unit.rb +0 -21
- data/app/models/spree/line_item.rb +2 -45
- data/app/models/spree/order.rb +4 -137
- data/app/models/spree/order_cancellations.rb +4 -24
- data/app/models/spree/order_updater.rb +2 -11
- data/app/models/spree/payment/cancellation.rb +1 -1
- data/app/models/spree/payment.rb +0 -3
- data/app/models/spree/payment_create.rb +1 -13
- data/app/models/spree/payment_method/credit_card.rb +1 -3
- data/app/models/spree/payment_method.rb +2 -103
- data/app/models/spree/product/scopes.rb +0 -27
- data/app/models/spree/product.rb +0 -40
- data/app/models/spree/promotion/actions/create_adjustment.rb +0 -3
- data/app/models/spree/promotion/actions/create_item_adjustments.rb +0 -3
- data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +0 -3
- data/app/models/spree/promotion/rules/taxon.rb +2 -15
- data/app/models/spree/promotion.rb +2 -6
- data/app/models/spree/promotion_action.rb +2 -9
- data/app/models/spree/promotion_code/batch_builder.rb +0 -14
- data/app/models/spree/refund.rb +0 -52
- data/app/models/spree/reimbursement.rb +3 -41
- data/app/models/spree/reimbursement_performer.rb +2 -8
- data/app/models/spree/reimbursement_type/credit.rb +1 -4
- data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +1 -2
- data/app/models/spree/reimbursement_type/store_credit.rb +1 -4
- data/app/models/spree/return_authorization.rb +1 -4
- data/app/models/spree/return_item.rb +3 -22
- data/app/models/spree/shipment.rb +1 -54
- data/app/models/spree/shipping_method.rb +0 -25
- data/app/models/spree/shipping_rate.rb +0 -2
- data/app/models/spree/state.rb +0 -4
- data/app/models/spree/stock/simple_coordinator.rb +6 -15
- data/app/models/spree/stock/splitter/base.rb +2 -7
- data/app/models/spree/stock_item.rb +1 -7
- data/app/models/spree/store.rb +0 -12
- data/app/models/spree/store_credit_category.rb +0 -32
- data/app/models/spree/tax_calculator/shipping_rate.rb +1 -12
- data/app/models/spree/tax_rate.rb +0 -27
- data/app/models/spree/taxon/active_storage_attachment.rb +0 -5
- data/app/models/spree/taxon/paperclip_attachment.rb +0 -5
- data/app/models/spree/taxon.rb +0 -11
- data/app/models/spree/user_address.rb +0 -5
- data/app/models/spree/variant.rb +2 -46
- data/config/locales/en.yml +0 -8
- data/db/migrate/20180416083007_add_apply_to_all_to_variant_property_rule.rb +1 -1
- data/lib/generators/solidus/install/install_generator.rb +12 -1
- data/lib/generators/solidus/install/templates/config/initializers/spree.rb.tt +3 -39
- data/lib/generators/spree/dummy/dummy_generator.rb +2 -1
- data/lib/generators/spree/dummy/templates/rails/database.yml +6 -1
- data/lib/generators/spree/dummy/templates/rails/storage.yml +3 -0
- data/lib/generators/spree/dummy/templates/rails/test.rb +2 -0
- data/lib/spree/app_configuration.rb +6 -65
- data/lib/spree/core/class_constantizer.rb +2 -0
- data/lib/spree/core/controller_helpers/auth.rb +1 -14
- data/lib/spree/core/controller_helpers/order.rb +2 -22
- data/lib/spree/core/controller_helpers/payment_parameters.rb +0 -54
- data/lib/spree/core/controller_helpers/pricing.rb +0 -8
- data/lib/spree/core/controller_helpers/strong_parameters.rb +0 -4
- data/lib/spree/core/engine.rb +0 -35
- data/lib/spree/core/environment_extension.rb +0 -9
- data/lib/spree/core/product_filters.rb +0 -40
- data/lib/spree/core/role_configuration.rb +0 -14
- data/lib/spree/core/search/base.rb +0 -26
- data/lib/spree/core/state_machines.rb +2 -11
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core.rb +9 -8
- data/lib/spree/deprecation.rb +1 -1
- data/lib/spree/event/configuration.rb +0 -5
- data/lib/spree/event/subscriber.rb +0 -18
- data/lib/spree/event/subscriber_registry.rb +3 -1
- data/lib/spree/event.rb +0 -31
- data/lib/spree/i18n.rb +0 -22
- data/lib/spree/money.rb +3 -18
- data/lib/spree/permitted_attributes.rb +9 -54
- data/lib/spree/testing_support/capybara_ext.rb +0 -30
- data/lib/spree/testing_support/controller_requests.rb +0 -82
- data/lib/spree/testing_support/dummy_app/migrations.rb +0 -3
- data/lib/spree/testing_support/dummy_app.rb +7 -14
- data/lib/spree/testing_support/factories/order_factory.rb +0 -1
- data/lib/spree/testing_support/factories/refund_factory.rb +0 -1
- data/lib/spree/testing_support/order_walkthrough.rb +0 -3
- data/lib/spree/testing_support/preferences.rb +0 -25
- data/lib/tasks/upgrade.rake +7 -5
- data/solidus_core.gemspec +2 -5
- metadata +8 -49
- data/app/mailers/spree/test_mailer.rb +0 -13
- data/app/models/concerns/spree/user_payment_source.rb +0 -26
- data/app/models/spree/calculator/free_shipping.rb +0 -22
- data/app/models/spree/calculator/percent_per_item.rb +0 -51
- data/app/models/spree/calculator/price_sack.rb +0 -28
- data/app/models/spree/gateway/bogus.rb +0 -13
- data/app/models/spree/gateway/bogus_simple.rb +0 -13
- data/app/models/spree/gateway.rb +0 -14
- data/app/models/spree/order/checkout.rb +0 -244
- data/app/models/spree/order_capturing.rb +0 -50
- data/app/models/spree/promotion_handler/free_shipping.rb +0 -9
- data/lib/generators/spree/install/install_generator.rb +0 -15
- data/lib/solidus/migrations/rename_gateways.rb +0 -41
- data/lib/spree/core/current_store.rb +0 -24
- data/lib/spree/paranoia_deprecations.rb +0 -41
- data/lib/spree/promo/environment.rb +0 -12
- data/lib/spree/testing_support/bar_ability.rb +0 -19
- data/lib/tasks/core.rake +0 -104
- data/lib/tasks/email.rake +0 -12
- data/lib/tasks/migrations/copy_order_bill_address_to_credit_card.rake +0 -119
- data/lib/tasks/migrations/migrate_address_names.rake +0 -158
- data/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake +0 -26
- data/lib/tasks/migrations/migrate_shipping_rate_taxes.rake +0 -22
- data/lib/tasks/migrations/migrate_user_addresses.rake +0 -34
- data/lib/tasks/migrations/rename_gateways.rake +0 -23
- data/lib/tasks/order_capturing.rake +0 -27
@@ -39,8 +39,7 @@ module Spree
|
|
39
39
|
mattr_reader(*ATTRIBUTES)
|
40
40
|
|
41
41
|
@@address_attributes = [
|
42
|
-
:id, :name, :
|
43
|
-
:address1, :address2, :city, :country_id, :state_id,
|
42
|
+
:id, :name, :address1, :address2, :city, :country_id, :state_id,
|
44
43
|
:zipcode, :phone, :state_name, :country_iso, :alternative_phone, :company,
|
45
44
|
country: [:iso, :name, :iso3, :iso_name],
|
46
45
|
state: [:name, :abbr]
|
@@ -52,7 +51,13 @@ module Spree
|
|
52
51
|
:month, :year, :expiry, :first_name, :last_name, :name
|
53
52
|
]
|
54
53
|
|
55
|
-
@@customer_return_attributes = [
|
54
|
+
@@customer_return_attributes = [
|
55
|
+
:stock_location_id, return_items_attributes: [
|
56
|
+
:id, :inventory_unit_id, :return_authorization_id, :returned, :amount,
|
57
|
+
:reception_status_event, :acceptance_status, :exchange_variant_id,
|
58
|
+
:resellable, :return_reason_id
|
59
|
+
]
|
60
|
+
]
|
56
61
|
|
57
62
|
@@image_attributes = [:alt, :attachment, :position, :viewable_type, :viewable_id]
|
58
63
|
|
@@ -90,7 +95,7 @@ module Spree
|
|
90
95
|
:number, :month, :year, :expiry, :verification_value,
|
91
96
|
:first_name, :last_name, :cc_type, :gateway_customer_profile_id,
|
92
97
|
:gateway_payment_profile_id, :last_digits, :name, :encrypted_data,
|
93
|
-
:
|
98
|
+
:wallet_payment_source_id, address_attributes: address_attributes
|
94
99
|
]
|
95
100
|
|
96
101
|
@@stock_item_attributes = [:variant, :stock_location, :backorderable, :variant_id]
|
@@ -143,61 +148,11 @@ module Spree
|
|
143
148
|
]
|
144
149
|
|
145
150
|
@@checkout_payment_attributes = [
|
146
|
-
:coupon_code,
|
147
151
|
payments_attributes: payment_attributes + [
|
148
152
|
source_attributes: source_attributes
|
149
153
|
]
|
150
154
|
]
|
151
155
|
|
152
156
|
@@checkout_confirm_attributes = []
|
153
|
-
|
154
|
-
def self.checkout_attributes
|
155
|
-
Spree::Deprecation.warn <<-WARN.squish, caller
|
156
|
-
checkout_attributes is deprecated, please use the permitted
|
157
|
-
attributes set for the specific step that needs to be updated.
|
158
|
-
|
159
|
-
E.g. permitted_checkout_address_attributes
|
160
|
-
WARN
|
161
|
-
|
162
|
-
CheckoutAdditionalAttributes.new(
|
163
|
-
checkout_address_attributes +
|
164
|
-
checkout_delivery_attributes +
|
165
|
-
checkout_payment_attributes +
|
166
|
-
checkout_confirm_attributes
|
167
|
-
)
|
168
|
-
end
|
169
|
-
end
|
170
|
-
|
171
|
-
class CheckoutAdditionalAttributes < Array
|
172
|
-
def <<(*attributes)
|
173
|
-
super
|
174
|
-
|
175
|
-
inject_attributes_to_all_steps(attributes, :<<)
|
176
|
-
end
|
177
|
-
|
178
|
-
def push(*attributes)
|
179
|
-
super
|
180
|
-
|
181
|
-
inject_attributes_to_all_steps(attributes, :push)
|
182
|
-
end
|
183
|
-
alias append push
|
184
|
-
|
185
|
-
def prepend(*attributes)
|
186
|
-
super
|
187
|
-
|
188
|
-
inject_attributes_to_all_steps(attributes, :prepend)
|
189
|
-
end
|
190
|
-
alias unshift prepend
|
191
|
-
|
192
|
-
private
|
193
|
-
|
194
|
-
def inject_attributes_to_all_steps(attributes, method_name)
|
195
|
-
attributes.each do |attribute|
|
196
|
-
PermittedAttributes.checkout_address_attributes.send(method_name, attribute)
|
197
|
-
PermittedAttributes.checkout_delivery_attributes.send(method_name, attribute)
|
198
|
-
PermittedAttributes.checkout_payment_attributes.send(method_name, attribute)
|
199
|
-
PermittedAttributes.checkout_confirm_attributes.send(method_name, attribute)
|
200
|
-
end
|
201
|
-
end
|
202
157
|
end
|
203
158
|
end
|
@@ -35,18 +35,6 @@ module Spree
|
|
35
35
|
find("td:nth-of-type(#{num})").text
|
36
36
|
end
|
37
37
|
|
38
|
-
def fill_in_quantity(table_column, selector, quantity)
|
39
|
-
Spree::Deprecation.warn <<-WARN.strip_heredoc
|
40
|
-
fill_in_quantity is deprecated. Instead use:
|
41
|
-
within(#{table_column.inspect}) do
|
42
|
-
fill_in #{selector.inspect}, with: #{quantity.inspect}
|
43
|
-
end
|
44
|
-
WARN
|
45
|
-
within(table_column) do
|
46
|
-
fill_in selector, with: quantity
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
38
|
def select2_search(value, options)
|
51
39
|
options = {
|
52
40
|
search: value, # by default search for the value
|
@@ -122,21 +110,6 @@ module Spree
|
|
122
110
|
# find the original.
|
123
111
|
find('label:not(.select2-offscreen)', text: /#{Regexp.escape(text)}/i, match: :one)
|
124
112
|
end
|
125
|
-
|
126
|
-
def wait_for_ajax
|
127
|
-
Spree::Deprecation.warn <<-WARN.squish, caller
|
128
|
-
wait_for_ajax has been deprecated.
|
129
|
-
Please refer to the capybara documentation on how to properly wait for asyncronous behavior:
|
130
|
-
https://github.com/teamcapybara/capybara#asynchronous-javascript-ajax-and-friends
|
131
|
-
WARN
|
132
|
-
|
133
|
-
counter = 0
|
134
|
-
while page.evaluate_script("typeof($) === 'undefined' || $.active > 0")
|
135
|
-
counter += 1
|
136
|
-
sleep(0.1)
|
137
|
-
raise "AJAX request took longer than 5 seconds." if counter >= 50
|
138
|
-
end
|
139
|
-
end
|
140
113
|
end
|
141
114
|
end
|
142
115
|
end
|
@@ -156,9 +129,6 @@ RSpec::Matchers.define :have_meta do |name, expected|
|
|
156
129
|
end
|
157
130
|
end
|
158
131
|
|
159
|
-
# @private
|
160
|
-
CapybaraExt = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('CapybaraExt', 'Spree::TestingSupport::CapybaraExt')
|
161
|
-
|
162
132
|
RSpec.configure do |c|
|
163
133
|
c.include Spree::TestingSupport::CapybaraExt
|
164
134
|
end
|
@@ -2,23 +2,12 @@
|
|
2
2
|
|
3
3
|
module Spree
|
4
4
|
module TestingSupport
|
5
|
-
# A module providing convenience methods to test Solidus controllers
|
6
|
-
# in Rails controller/functional tests. Possibly from inside an
|
7
|
-
# application with a mounted Solidus engine.
|
8
|
-
#
|
9
5
|
# *There is generaly no need* to use this module. Instead, in
|
10
6
|
# a functional/controller test against a Spree controller, just
|
11
7
|
# use standard Rails functionality by including:
|
12
8
|
#
|
13
9
|
# routes { Spree::Core::Engine.routes }
|
14
10
|
#
|
15
|
-
# And then use standard Rails test `get`, `post` etc methods.
|
16
|
-
#
|
17
|
-
# But some legacy code uses this ControllerRequests helper. It must
|
18
|
-
# be included only in tests against Spree controllers, it will interfere
|
19
|
-
# with tests against local app or other engine controllers, resulting
|
20
|
-
# in ActionController::UrlGenerationError.
|
21
|
-
#
|
22
11
|
# To use this module, inside your spec_helper.rb, include this module inside
|
23
12
|
# the RSpec.configure block by:
|
24
13
|
#
|
@@ -26,83 +15,12 @@ module Spree
|
|
26
15
|
# RSpec.configure do |c|
|
27
16
|
# c.include Spree::TestingSupport::ControllerRequests, spree_controller: true
|
28
17
|
# end
|
29
|
-
#
|
30
|
-
# Then, in your controller tests against spree controllers, you can access
|
31
|
-
# tag to use this module, and access spree routes like this:
|
32
|
-
#
|
33
|
-
# require 'spec_helper'
|
34
|
-
#
|
35
|
-
# describe Spree::ProductsController, :spree_controller do
|
36
|
-
# it "can see all the products" do
|
37
|
-
# spree_get :index
|
38
|
-
# end
|
39
|
-
# end
|
40
|
-
#
|
41
|
-
# Use spree_get, spree_post, spree_put or spree_delete to make requests to
|
42
|
-
# the Spree engine, and use regular get, post, put or delete to make
|
43
|
-
# requests to your application.
|
44
18
|
module ControllerRequests
|
45
19
|
extend ActiveSupport::Concern
|
46
20
|
|
47
21
|
included do
|
48
22
|
routes { Spree::Core::Engine.routes }
|
49
23
|
end
|
50
|
-
|
51
|
-
def spree_get(action, parameters = nil, session = nil, flash = nil)
|
52
|
-
process_spree_action(action, parameters, session, flash, "GET")
|
53
|
-
end
|
54
|
-
deprecate spree_get: :get, deprecator: Spree::Deprecation
|
55
|
-
|
56
|
-
# Executes a request simulating POST HTTP method and set/volley the response
|
57
|
-
def spree_post(action, parameters = nil, session = nil, flash = nil)
|
58
|
-
process_spree_action(action, parameters, session, flash, "POST")
|
59
|
-
end
|
60
|
-
deprecate spree_post: :post, deprecator: Spree::Deprecation
|
61
|
-
|
62
|
-
# Executes a request simulating PUT HTTP method and set/volley the response
|
63
|
-
def spree_put(action, parameters = nil, session = nil, flash = nil)
|
64
|
-
process_spree_action(action, parameters, session, flash, "PUT")
|
65
|
-
end
|
66
|
-
deprecate spree_put: :put, deprecator: Spree::Deprecation
|
67
|
-
|
68
|
-
# Executes a request simulating DELETE HTTP method and set/volley the response
|
69
|
-
def spree_delete(action, parameters = nil, session = nil, flash = nil)
|
70
|
-
process_spree_action(action, parameters, session, flash, "DELETE")
|
71
|
-
end
|
72
|
-
deprecate spree_delete: :delete, deprecator: Spree::Deprecation
|
73
|
-
|
74
|
-
def spree_xhr_get(action, parameters = nil, session = nil, flash = nil)
|
75
|
-
process_spree_xhr_action(action, parameters, session, flash, :get)
|
76
|
-
end
|
77
|
-
deprecate spree_xhr_get: :get, deprecator: Spree::Deprecation
|
78
|
-
|
79
|
-
def spree_xhr_post(action, parameters = nil, session = nil, flash = nil)
|
80
|
-
process_spree_xhr_action(action, parameters, session, flash, :post)
|
81
|
-
end
|
82
|
-
deprecate spree_xhr_post: :post, deprecator: Spree::Deprecation
|
83
|
-
|
84
|
-
def spree_xhr_put(action, parameters = nil, session = nil, flash = nil)
|
85
|
-
process_spree_xhr_action(action, parameters, session, flash, :put)
|
86
|
-
end
|
87
|
-
deprecate spree_xhr_put: :put, deprecator: Spree::Deprecation
|
88
|
-
|
89
|
-
def spree_xhr_delete(action, parameters = nil, session = nil, flash = nil)
|
90
|
-
process_spree_xhr_action(action, parameters, session, flash, :delete)
|
91
|
-
end
|
92
|
-
deprecate spree_xhr_delete: :delete, deprecator: Spree::Deprecation
|
93
|
-
|
94
|
-
private
|
95
|
-
|
96
|
-
def process_spree_action(action, parameters = nil, session = nil, flash = nil, method = "GET")
|
97
|
-
parameters ||= {}
|
98
|
-
process(action, method, parameters, session, flash)
|
99
|
-
end
|
100
|
-
|
101
|
-
def process_spree_xhr_action(action, parameters = nil, session = nil, flash = nil, method = :get)
|
102
|
-
parameters ||= {}
|
103
|
-
parameters.reverse_merge!(format: :json)
|
104
|
-
xml_http_request(method, action, parameters, session, flash)
|
105
|
-
end
|
106
24
|
end
|
107
25
|
end
|
108
26
|
end
|
@@ -27,9 +27,6 @@ module DummyApp
|
|
27
27
|
ActiveRecord::Base.remove_connection
|
28
28
|
|
29
29
|
sh 'rake db:reset VERBOSE=false'
|
30
|
-
if ENV['ENABLE_ACTIVE_STORAGE']
|
31
|
-
sh 'rake active_storage:install db:migrate VERBOSE=false'
|
32
|
-
end
|
33
30
|
|
34
31
|
# We have a brand new database, so we must re-establish our connection
|
35
32
|
ActiveRecord::Base.establish_connection
|
@@ -7,6 +7,7 @@ require 'rails'
|
|
7
7
|
require 'active_record/railtie'
|
8
8
|
require 'action_controller/railtie'
|
9
9
|
require 'action_mailer/railtie'
|
10
|
+
require 'active_storage/engine'
|
10
11
|
|
11
12
|
Rails.env = 'test'
|
12
13
|
|
@@ -45,6 +46,7 @@ module DummyApp
|
|
45
46
|
end
|
46
47
|
|
47
48
|
class Application < ::Rails::Application
|
49
|
+
config.has_many_inverse = true
|
48
50
|
config.eager_load = false
|
49
51
|
config.cache_classes = true
|
50
52
|
config.cache_store = :memory_store
|
@@ -67,7 +69,7 @@ module DummyApp
|
|
67
69
|
|
68
70
|
config.storage_path = Rails.root.join('tmp', 'storage')
|
69
71
|
|
70
|
-
|
72
|
+
unless ENV['DISABLE_ACTIVE_STORAGE']
|
71
73
|
initializer 'solidus.active_storage' do
|
72
74
|
config.active_storage.service_configurations = {
|
73
75
|
test: {
|
@@ -116,20 +118,11 @@ end
|
|
116
118
|
|
117
119
|
Spree.user_class = 'Spree::LegacyUser'
|
118
120
|
Spree.config do |config|
|
119
|
-
config.use_legacy_address_state_validator = false
|
120
121
|
config.mails_from = "store@example.com"
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
config.use_legacy_order_state_machine = false
|
126
|
-
config.use_custom_cancancan_actions = false
|
127
|
-
config.consider_actionless_promotion_active = false
|
128
|
-
config.use_legacy_store_credit_reimbursement_category_name = false
|
129
|
-
|
130
|
-
if ENV['ENABLE_ACTIVE_STORAGE']
|
131
|
-
config.image_attachment_module = 'Spree::Image::ActiveStorageAttachment'
|
132
|
-
config.taxon_attachment_module = 'Spree::Taxon::ActiveStorageAttachment'
|
122
|
+
|
123
|
+
if ENV['DISABLE_ACTIVE_STORAGE']
|
124
|
+
config.image_attachment_module = 'Spree::Image::PaperclipAttachment'
|
125
|
+
config.taxon_attachment_module = 'Spree::Taxon::PaperclipAttachment'
|
133
126
|
end
|
134
127
|
end
|
135
128
|
|
@@ -1,33 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/deprecation'
|
4
|
-
|
5
3
|
module Spree
|
6
4
|
module TestingSupport
|
7
5
|
module Preferences
|
8
|
-
# Resets all preferences to default values, you can
|
9
|
-
# pass a block to override the defaults with a block
|
10
|
-
#
|
11
|
-
# reset_spree_preferences do |config|
|
12
|
-
# config.track_inventory_levels = false
|
13
|
-
# end
|
14
|
-
#
|
15
|
-
# @deprecated
|
16
|
-
def reset_spree_preferences(&config_block)
|
17
|
-
Spree::Config.instance_variables.
|
18
|
-
reject { |iv| iv == :@events_configuration }.
|
19
|
-
each { |iv| Spree::Config.remove_instance_variable(iv) }
|
20
|
-
Spree::Config.preference_store = Spree::Config.default_preferences
|
21
|
-
|
22
|
-
if defined?(Railties)
|
23
|
-
Rails.application.config.spree = Spree::Config.environment
|
24
|
-
end
|
25
|
-
|
26
|
-
configure_spree_preferences(&config_block) if block_given?
|
27
|
-
end
|
28
|
-
|
29
|
-
deprecate :reset_spree_preferences, deprecator: Spree::Deprecation
|
30
|
-
|
31
6
|
def configure_spree_preferences
|
32
7
|
yield(Spree::Config) if block_given?
|
33
8
|
end
|
data/lib/tasks/upgrade.rake
CHANGED
@@ -2,12 +2,14 @@
|
|
2
2
|
|
3
3
|
namespace :solidus do
|
4
4
|
namespace :upgrade do
|
5
|
-
|
6
|
-
|
7
|
-
'
|
8
|
-
'solidus:migrations:migrate_address_names:up'
|
5
|
+
task three_point_zero: [
|
6
|
+
'railties:install:migrations',
|
7
|
+
'db:migrate'
|
9
8
|
] do
|
10
|
-
puts "Your Solidus install is ready for Solidus
|
9
|
+
puts "Your Solidus install is ready for Solidus 3.0"
|
11
10
|
end
|
12
11
|
end
|
12
|
+
|
13
|
+
desc "Upgrade to the current Solidus version"
|
14
|
+
task upgrade: 'upgrade:three_point_zero'
|
13
15
|
end
|
data/solidus_core.gemspec
CHANGED
@@ -39,8 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_dependency 'kaminari-activerecord', '~> 1.1'
|
40
40
|
s.add_dependency 'mini_magick', '~> 4.10'
|
41
41
|
s.add_dependency 'monetize', '~> 1.8'
|
42
|
-
s.add_dependency 'paperclip', '
|
43
|
-
s.add_dependency 'paranoia', '~> 2.4'
|
42
|
+
s.add_dependency 'kt-paperclip', '~> 6.3'
|
44
43
|
s.add_dependency 'ransack', '~> 2.0'
|
45
44
|
s.add_dependency 'state_machines-activerecord', '~> 0.6'
|
46
45
|
|
@@ -56,9 +55,7 @@ $ bin/rails g solidus:install
|
|
56
55
|
If you are updating Solidus from an older version, please run
|
57
56
|
the following commands to complete the update:
|
58
57
|
|
59
|
-
$ bin/rails
|
60
|
-
$ bin/rails db:migrate
|
61
|
-
$ bin/rails solidus:upgrade:two_point_eleven
|
58
|
+
$ bin/rails solidus:upgrade
|
62
59
|
|
63
60
|
Please report any issues at:
|
64
61
|
- https://github.com/solidusio/solidus/issues
|
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
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -331,33 +331,19 @@ dependencies:
|
|
331
331
|
- !ruby/object:Gem::Version
|
332
332
|
version: '1.8'
|
333
333
|
- !ruby/object:Gem::Dependency
|
334
|
-
name: paperclip
|
335
|
-
requirement: !ruby/object:Gem::Requirement
|
336
|
-
requirements:
|
337
|
-
- - ">="
|
338
|
-
- !ruby/object:Gem::Version
|
339
|
-
version: '4.2'
|
340
|
-
type: :runtime
|
341
|
-
prerelease: false
|
342
|
-
version_requirements: !ruby/object:Gem::Requirement
|
343
|
-
requirements:
|
344
|
-
- - ">="
|
345
|
-
- !ruby/object:Gem::Version
|
346
|
-
version: '4.2'
|
347
|
-
- !ruby/object:Gem::Dependency
|
348
|
-
name: paranoia
|
334
|
+
name: kt-paperclip
|
349
335
|
requirement: !ruby/object:Gem::Requirement
|
350
336
|
requirements:
|
351
337
|
- - "~>"
|
352
338
|
- !ruby/object:Gem::Version
|
353
|
-
version: '
|
339
|
+
version: '6.3'
|
354
340
|
type: :runtime
|
355
341
|
prerelease: false
|
356
342
|
version_requirements: !ruby/object:Gem::Requirement
|
357
343
|
requirements:
|
358
344
|
- - "~>"
|
359
345
|
- !ruby/object:Gem::Version
|
360
|
-
version: '
|
346
|
+
version: '6.3'
|
361
347
|
- !ruby/object:Gem::Dependency
|
362
348
|
name: ransack
|
363
349
|
requirement: !ruby/object:Gem::Requirement
|
@@ -415,7 +401,6 @@ files:
|
|
415
401
|
- app/mailers/spree/order_mailer.rb
|
416
402
|
- app/mailers/spree/promotion_code_batch_mailer.rb
|
417
403
|
- app/mailers/spree/reimbursement_mailer.rb
|
418
|
-
- app/mailers/spree/test_mailer.rb
|
419
404
|
- app/models/concerns/spree/active_storage_adapter.rb
|
420
405
|
- app/models/concerns/spree/active_storage_adapter/attachment.rb
|
421
406
|
- app/models/concerns/spree/active_storage_adapter/normalization.rb
|
@@ -430,7 +415,6 @@ files:
|
|
430
415
|
- app/models/concerns/spree/user_address_book.rb
|
431
416
|
- app/models/concerns/spree/user_api_authentication.rb
|
432
417
|
- app/models/concerns/spree/user_methods.rb
|
433
|
-
- app/models/concerns/spree/user_payment_source.rb
|
434
418
|
- app/models/concerns/spree/user_reporting.rb
|
435
419
|
- app/models/spree/ability.rb
|
436
420
|
- app/models/spree/address.rb
|
@@ -447,10 +431,7 @@ files:
|
|
447
431
|
- app/models/spree/calculator/flat_percent_item_total.rb
|
448
432
|
- app/models/spree/calculator/flat_rate.rb
|
449
433
|
- app/models/spree/calculator/flexi_rate.rb
|
450
|
-
- app/models/spree/calculator/free_shipping.rb
|
451
434
|
- app/models/spree/calculator/percent_on_line_item.rb
|
452
|
-
- app/models/spree/calculator/percent_per_item.rb
|
453
|
-
- app/models/spree/calculator/price_sack.rb
|
454
435
|
- app/models/spree/calculator/returns/default_refund_amount.rb
|
455
436
|
- app/models/spree/calculator/shipping/flat_percent_item_total.rb
|
456
437
|
- app/models/spree/calculator/shipping/flat_rate.rb
|
@@ -469,9 +450,6 @@ files:
|
|
469
450
|
- app/models/spree/fulfilment_changer.rb
|
470
451
|
- app/models/spree/gallery/product_gallery.rb
|
471
452
|
- app/models/spree/gallery/variant_gallery.rb
|
472
|
-
- app/models/spree/gateway.rb
|
473
|
-
- app/models/spree/gateway/bogus.rb
|
474
|
-
- app/models/spree/gateway/bogus_simple.rb
|
475
453
|
- app/models/spree/image.rb
|
476
454
|
- app/models/spree/image/active_storage_attachment.rb
|
477
455
|
- app/models/spree/image/paperclip_attachment.rb
|
@@ -484,11 +462,9 @@ files:
|
|
484
462
|
- app/models/spree/option_value.rb
|
485
463
|
- app/models/spree/option_values_variant.rb
|
486
464
|
- app/models/spree/order.rb
|
487
|
-
- app/models/spree/order/checkout.rb
|
488
465
|
- app/models/spree/order/number_generator.rb
|
489
466
|
- app/models/spree/order/payments.rb
|
490
467
|
- app/models/spree/order_cancellations.rb
|
491
|
-
- app/models/spree/order_capturing.rb
|
492
468
|
- app/models/spree/order_contents.rb
|
493
469
|
- app/models/spree/order_inventory.rb
|
494
470
|
- app/models/spree/order_merger.rb
|
@@ -542,7 +518,6 @@ files:
|
|
542
518
|
- app/models/spree/promotion_code_batch.rb
|
543
519
|
- app/models/spree/promotion_handler/cart.rb
|
544
520
|
- app/models/spree/promotion_handler/coupon.rb
|
545
|
-
- app/models/spree/promotion_handler/free_shipping.rb
|
546
521
|
- app/models/spree/promotion_handler/page.rb
|
547
522
|
- app/models/spree/promotion_handler/shipping.rb
|
548
523
|
- app/models/spree/promotion_rule.rb
|
@@ -746,10 +721,9 @@ files:
|
|
746
721
|
- lib/generators/spree/dummy/templates/rails/database.yml
|
747
722
|
- lib/generators/spree/dummy/templates/rails/routes.rb
|
748
723
|
- lib/generators/spree/dummy/templates/rails/script/rails
|
724
|
+
- lib/generators/spree/dummy/templates/rails/storage.yml
|
749
725
|
- lib/generators/spree/dummy/templates/rails/test.rb
|
750
|
-
- lib/generators/spree/install/install_generator.rb
|
751
726
|
- lib/solidus/migrations/promotions_with_code_handlers.rb
|
752
|
-
- lib/solidus/migrations/rename_gateways.rb
|
753
727
|
- lib/solidus_core.rb
|
754
728
|
- lib/spree/app_configuration.rb
|
755
729
|
- lib/spree/config.rb
|
@@ -765,7 +739,6 @@ files:
|
|
765
739
|
- lib/spree/core/controller_helpers/search.rb
|
766
740
|
- lib/spree/core/controller_helpers/store.rb
|
767
741
|
- lib/spree/core/controller_helpers/strong_parameters.rb
|
768
|
-
- lib/spree/core/current_store.rb
|
769
742
|
- lib/spree/core/engine.rb
|
770
743
|
- lib/spree/core/environment.rb
|
771
744
|
- lib/spree/core/environment/calculators.rb
|
@@ -807,7 +780,6 @@ files:
|
|
807
780
|
- lib/spree/migration_helpers.rb
|
808
781
|
- lib/spree/migrations.rb
|
809
782
|
- lib/spree/money.rb
|
810
|
-
- lib/spree/paranoia_deprecations.rb
|
811
783
|
- lib/spree/permission_sets.rb
|
812
784
|
- lib/spree/permission_sets/base.rb
|
813
785
|
- lib/spree/permission_sets/configuration_display.rb
|
@@ -836,11 +808,9 @@ files:
|
|
836
808
|
- lib/spree/preferences/static_model_preferences.rb
|
837
809
|
- lib/spree/preferences/statically_configurable.rb
|
838
810
|
- lib/spree/preferences/store.rb
|
839
|
-
- lib/spree/promo/environment.rb
|
840
811
|
- lib/spree/testing_support.rb
|
841
812
|
- lib/spree/testing_support/ability_helpers.rb
|
842
813
|
- lib/spree/testing_support/authorization_helpers.rb
|
843
|
-
- lib/spree/testing_support/bar_ability.rb
|
844
814
|
- lib/spree/testing_support/blacklist_urls.rb
|
845
815
|
- lib/spree/testing_support/caching.rb
|
846
816
|
- lib/spree/testing_support/capybara_ext.rb
|
@@ -933,15 +903,6 @@ files:
|
|
933
903
|
- lib/spree/testing_support/url_helpers.rb
|
934
904
|
- lib/spree/user_class_handle.rb
|
935
905
|
- lib/spree_core.rb
|
936
|
-
- lib/tasks/core.rake
|
937
|
-
- lib/tasks/email.rake
|
938
|
-
- lib/tasks/migrations/copy_order_bill_address_to_credit_card.rake
|
939
|
-
- lib/tasks/migrations/migrate_address_names.rake
|
940
|
-
- lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake
|
941
|
-
- lib/tasks/migrations/migrate_shipping_rate_taxes.rake
|
942
|
-
- lib/tasks/migrations/migrate_user_addresses.rake
|
943
|
-
- lib/tasks/migrations/rename_gateways.rake
|
944
|
-
- lib/tasks/order_capturing.rake
|
945
906
|
- lib/tasks/upgrade.rake
|
946
907
|
- solidus_core.gemspec
|
947
908
|
- vendor/assets/javascripts/jquery.payment.js
|
@@ -963,9 +924,7 @@ post_install_message: |
|
|
963
924
|
If you are updating Solidus from an older version, please run
|
964
925
|
the following commands to complete the update:
|
965
926
|
|
966
|
-
$ bin/rails
|
967
|
-
$ bin/rails db:migrate
|
968
|
-
$ bin/rails solidus:upgrade:two_point_eleven
|
927
|
+
$ bin/rails solidus:upgrade
|
969
928
|
|
970
929
|
Please report any issues at:
|
971
930
|
- https://github.com/solidusio/solidus/issues
|
@@ -985,7 +944,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
985
944
|
- !ruby/object:Gem::Version
|
986
945
|
version: 1.8.23
|
987
946
|
requirements: []
|
988
|
-
rubygems_version: 3.
|
947
|
+
rubygems_version: 3.2.20
|
989
948
|
signing_key:
|
990
949
|
specification_version: 4
|
991
950
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|