solidus_core 3.0.7 → 3.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/spree/user_methods.rb +20 -1
- data/app/models/spree/order.rb +1 -1
- data/app/models/spree/price.rb +1 -1
- data/config/locales/en.yml +249 -0
- data/lib/spree/app_configuration.rb +3 -2
- data/lib/spree/core/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f1c5b9cf50bbdf85b17b2efb5fe3812a2882e28133794a7ae898402345bf265
|
4
|
+
data.tar.gz: 5eda0c67dd0eecd516656449aa2fc9b627bddb5586ed71085337806533b0b330
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6362257bfa6688911f046e5c6ae0df2061622866441c7d81555ad1ee842da94d273c079a0a289e9691c130e17632a4765f314cc1ae073cd7f5cc364a181939e4
|
7
|
+
data.tar.gz: 8c18d66c2fe84abecf9111a972ab2127d8406d53b510617518d518abba342847246e2f8d9226bb9b57ac45a070b63da1f55fc385d654a99db17f9e04e17be67c
|
@@ -18,7 +18,7 @@ module Spree
|
|
18
18
|
has_many :stock_locations, through: :user_stock_locations
|
19
19
|
|
20
20
|
has_many :spree_orders, foreign_key: "user_id", class_name: "Spree::Order"
|
21
|
-
has_many :orders, foreign_key: "user_id", class_name: "Spree::Order"
|
21
|
+
has_many :orders, foreign_key: "user_id", class_name: "Spree::Order"
|
22
22
|
|
23
23
|
has_many :store_credits, -> { includes(:credit_type) }, foreign_key: "user_id", class_name: "Spree::StoreCredit"
|
24
24
|
has_many :store_credit_events, through: :store_credits
|
@@ -27,6 +27,7 @@ module Spree
|
|
27
27
|
has_many :wallet_payment_sources, foreign_key: 'user_id', class_name: 'Spree::WalletPaymentSource', inverse_of: :user
|
28
28
|
|
29
29
|
after_create :auto_generate_spree_api_key
|
30
|
+
before_destroy :check_for_deletion
|
30
31
|
|
31
32
|
include Spree::RansackableAttributes unless included_modules.include?(Spree::RansackableAttributes)
|
32
33
|
|
@@ -76,5 +77,23 @@ module Spree
|
|
76
77
|
currency: currency,
|
77
78
|
)
|
78
79
|
end
|
80
|
+
|
81
|
+
# Restrict to delete users with existing orders
|
82
|
+
#
|
83
|
+
# Override this in your user model class to add another logic.
|
84
|
+
#
|
85
|
+
# Ie. to allow to delete users with incomplete orders add:
|
86
|
+
#
|
87
|
+
# orders.complete.none?
|
88
|
+
#
|
89
|
+
def can_be_deleted?
|
90
|
+
orders.none?
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
def check_for_deletion
|
96
|
+
raise ActiveRecord::DeleteRestrictionError unless can_be_deleted?
|
97
|
+
end
|
79
98
|
end
|
80
99
|
end
|
data/app/models/spree/order.rb
CHANGED
@@ -51,7 +51,7 @@ module Spree
|
|
51
51
|
end
|
52
52
|
|
53
53
|
self.whitelisted_ransackable_associations = %w[shipments user order_promotions promotions bill_address ship_address line_items]
|
54
|
-
self.whitelisted_ransackable_attributes = %w[
|
54
|
+
self.whitelisted_ransackable_attributes = %w[completed_at created_at email number state payment_state shipment_state total store_id]
|
55
55
|
|
56
56
|
attr_reader :coupon_code
|
57
57
|
attr_accessor :temporary_address
|
data/app/models/spree/price.rb
CHANGED
data/config/locales/en.yml
CHANGED
@@ -1004,6 +1004,8 @@ en:
|
|
1004
1004
|
use_product_tax_category: Use Product Tax Category
|
1005
1005
|
new:
|
1006
1006
|
new_variant: New Variant
|
1007
|
+
table:
|
1008
|
+
no_variants_found: No variants found for '%{term}'
|
1007
1009
|
table_filter:
|
1008
1010
|
show_deleted: Show Deleted Variants
|
1009
1011
|
administration: Administration
|
@@ -1170,10 +1172,257 @@ en:
|
|
1170
1172
|
country_based: Country Based
|
1171
1173
|
country_name: Name
|
1172
1174
|
country_names:
|
1175
|
+
AD: Andorra
|
1176
|
+
AE: United Arab Emirates
|
1177
|
+
AF: Afghanistan
|
1178
|
+
AG: Antigua and Barbuda
|
1179
|
+
AI: Anguilla
|
1180
|
+
AL: Albania
|
1181
|
+
AM: Armenia
|
1182
|
+
AO: Angola
|
1183
|
+
AQ: Antarctica
|
1184
|
+
AR: Argentina
|
1185
|
+
AS: American Samoa
|
1186
|
+
AT: Austria
|
1187
|
+
AU: Australia
|
1188
|
+
AW: Aruba
|
1189
|
+
AX: Åland Islands
|
1190
|
+
AZ: Azerbaijan
|
1191
|
+
BA: Bosnia and Herzegovina
|
1192
|
+
BB: Barbados
|
1193
|
+
BD: Bangladesh
|
1194
|
+
BE: Belgium
|
1195
|
+
BF: Burkina Faso
|
1196
|
+
BG: Bulgaria
|
1197
|
+
BH: Bahrain
|
1198
|
+
BI: Burundi
|
1199
|
+
BJ: Benin
|
1200
|
+
BL: Saint Barthélemy
|
1201
|
+
BM: Bermuda
|
1202
|
+
BN: Brunei Darussalam
|
1203
|
+
BO: Bolivia, Plurinational State of
|
1204
|
+
BQ: Bonaire, Sint Eustatius and Saba
|
1205
|
+
BR: Brazil
|
1206
|
+
BS: Bahamas
|
1207
|
+
BT: Bhutan
|
1208
|
+
BV: Bouvet Island
|
1209
|
+
BW: Botswana
|
1210
|
+
BY: Belarus
|
1211
|
+
BZ: Belize
|
1173
1212
|
CA: Canada
|
1213
|
+
CC: Cocos (Keeling) Islands
|
1214
|
+
CD: Congo, The Democratic Republic of the
|
1215
|
+
CF: Central African Republic
|
1216
|
+
CG: Congo
|
1217
|
+
CH: Switzerland
|
1218
|
+
CI: Côte d'Ivoire
|
1219
|
+
CK: Cook Islands
|
1220
|
+
CL: Chile
|
1221
|
+
CM: Cameroon
|
1222
|
+
CN: China
|
1223
|
+
CO: Colombia
|
1224
|
+
CR: Costa Rica
|
1225
|
+
CU: Cuba
|
1226
|
+
CV: Cabo Verde
|
1227
|
+
CW: Curaçao
|
1228
|
+
CX: Christmas Island
|
1229
|
+
CY: Cyprus
|
1230
|
+
CZ: Czechia
|
1231
|
+
DE: Germany
|
1232
|
+
DJ: Djibouti
|
1233
|
+
DK: Denmark
|
1234
|
+
DM: Dominica
|
1235
|
+
DO: Dominican Republic
|
1236
|
+
DZ: Algeria
|
1237
|
+
EC: Ecuador
|
1238
|
+
EE: Estonia
|
1239
|
+
EG: Egypt
|
1240
|
+
EH: Western Sahara
|
1241
|
+
ER: Eritrea
|
1242
|
+
ES: Spain
|
1243
|
+
ET: Ethiopia
|
1244
|
+
FI: Finland
|
1245
|
+
FJ: Fiji
|
1246
|
+
FK: Falkland Islands (Malvinas)
|
1247
|
+
FM: Micronesia, Federated States of
|
1248
|
+
FO: Faroe Islands
|
1249
|
+
FR: France
|
1174
1250
|
FRA: France
|
1251
|
+
GA: Gabon
|
1252
|
+
GB: United Kingdom
|
1253
|
+
GD: Grenada
|
1254
|
+
GE: Georgia
|
1255
|
+
GF: French Guiana
|
1256
|
+
GG: Guernsey
|
1257
|
+
GH: Ghana
|
1258
|
+
GI: Gibraltar
|
1259
|
+
GL: Greenland
|
1260
|
+
GM: Gambia
|
1261
|
+
GN: Guinea
|
1262
|
+
GP: Guadeloupe
|
1263
|
+
GQ: Equatorial Guinea
|
1264
|
+
GR: Greece
|
1265
|
+
GS: South Georgia and the South Sandwich Islands
|
1266
|
+
GT: Guatemala
|
1267
|
+
GU: Guam
|
1268
|
+
GW: Guinea-Bissau
|
1269
|
+
GY: Guyana
|
1270
|
+
HK: Hong Kong
|
1271
|
+
HM: Heard Island and McDonald Islands
|
1272
|
+
HN: Honduras
|
1273
|
+
HR: Croatia
|
1274
|
+
HT: Haiti
|
1275
|
+
HU: Hungary
|
1276
|
+
ID: Indonesia
|
1277
|
+
IE: Ireland
|
1278
|
+
IL: Israel
|
1279
|
+
IM: Isle of Man
|
1280
|
+
IN: India
|
1281
|
+
IO: British Indian Ocean Territory
|
1282
|
+
IQ: Iraq
|
1283
|
+
IR: Iran, Islamic Republic of
|
1284
|
+
IS: Iceland
|
1285
|
+
IT: Italy
|
1175
1286
|
ITA: Italy
|
1287
|
+
JE: Jersey
|
1288
|
+
JM: Jamaica
|
1289
|
+
JO: Jordan
|
1290
|
+
JP: Japan
|
1291
|
+
KE: Kenya
|
1292
|
+
KG: Kyrgyzstan
|
1293
|
+
KH: Cambodia
|
1294
|
+
KI: Kiribati
|
1295
|
+
KM: Comoros
|
1296
|
+
KN: Saint Kitts and Nevis
|
1297
|
+
KP: Korea, Democratic People's Republic of
|
1298
|
+
KR: Korea, Republic of
|
1299
|
+
KW: Kuwait
|
1300
|
+
KY: Cayman Islands
|
1301
|
+
KZ: Kazakhstan
|
1302
|
+
LA: Lao People's Democratic Republic
|
1303
|
+
LB: Lebanon
|
1304
|
+
LC: Saint Lucia
|
1305
|
+
LI: Liechtenstein
|
1306
|
+
LK: Sri Lanka
|
1307
|
+
LR: Liberia
|
1308
|
+
LS: Lesotho
|
1309
|
+
LT: Lithuania
|
1310
|
+
LU: Luxembourg
|
1311
|
+
LV: Latvia
|
1312
|
+
LY: Libya
|
1313
|
+
MA: Morocco
|
1314
|
+
MC: Monaco
|
1315
|
+
MD: Moldova, Republic of
|
1316
|
+
ME: Montenegro
|
1317
|
+
MF: Saint Martin (French part)
|
1318
|
+
MG: Madagascar
|
1319
|
+
MH: Marshall Islands
|
1320
|
+
MK: North Macedonia
|
1321
|
+
ML: Mali
|
1322
|
+
MM: Myanmar
|
1323
|
+
MN: Mongolia
|
1324
|
+
MO: Macao
|
1325
|
+
MP: Northern Mariana Islands
|
1326
|
+
MQ: Martinique
|
1327
|
+
MR: Mauritania
|
1328
|
+
MS: Montserrat
|
1329
|
+
MT: Malta
|
1330
|
+
MU: Mauritius
|
1331
|
+
MV: Maldives
|
1332
|
+
MW: Malawi
|
1333
|
+
MX: Mexico
|
1334
|
+
MY: Malaysia
|
1335
|
+
MZ: Mozambique
|
1336
|
+
NA: Namibia
|
1337
|
+
NC: New Caledonia
|
1338
|
+
NE: Niger
|
1339
|
+
NF: Norfolk Island
|
1340
|
+
NG: Nigeria
|
1341
|
+
NI: Nicaragua
|
1342
|
+
NL: Netherlands
|
1343
|
+
'NO': Norway
|
1344
|
+
NP: Nepal
|
1345
|
+
NR: Nauru
|
1346
|
+
NU: Niue
|
1347
|
+
NZ: New Zealand
|
1348
|
+
OM: Oman
|
1349
|
+
PA: Panama
|
1350
|
+
PE: Peru
|
1351
|
+
PF: French Polynesia
|
1352
|
+
PG: Papua New Guinea
|
1353
|
+
PH: Philippines
|
1354
|
+
PK: Pakistan
|
1355
|
+
PL: Poland
|
1356
|
+
PM: Saint Pierre and Miquelon
|
1357
|
+
PN: Pitcairn
|
1358
|
+
PR: Puerto Rico
|
1359
|
+
PS: Palestine, State of
|
1360
|
+
PT: Portugal
|
1361
|
+
PW: Palau
|
1362
|
+
PY: Paraguay
|
1363
|
+
QA: Qatar
|
1364
|
+
RE: Réunion
|
1365
|
+
RO: Romania
|
1366
|
+
RS: Serbia
|
1367
|
+
RU: Russia
|
1368
|
+
RW: Rwanda
|
1369
|
+
SA: Saudi Arabia
|
1370
|
+
SB: Solomon Islands
|
1371
|
+
SC: Seychelles
|
1372
|
+
SD: Sudan
|
1373
|
+
SE: Sweden
|
1374
|
+
SG: Singapore
|
1375
|
+
SH: Saint Helena, Ascension and Tristan da Cunha
|
1376
|
+
SI: Slovenia
|
1377
|
+
SJ: Svalbard and Jan Mayen
|
1378
|
+
SK: Slovakia
|
1379
|
+
SL: Sierra Leone
|
1380
|
+
SM: San Marino
|
1381
|
+
SN: Senegal
|
1382
|
+
SO: Somalia
|
1383
|
+
SR: Suriname
|
1384
|
+
SS: South Sudan
|
1385
|
+
ST: Sao Tome and Principe
|
1386
|
+
SV: El Salvador
|
1387
|
+
SX: Sint Maarten (Dutch part)
|
1388
|
+
SY: Syrian Arab Republic
|
1389
|
+
SZ: Eswatini
|
1390
|
+
TC: Turks and Caicos Islands
|
1391
|
+
TD: Chad
|
1392
|
+
TF: French Southern Territories
|
1393
|
+
TG: Togo
|
1394
|
+
TH: Thailand
|
1395
|
+
TJ: Tajikistan
|
1396
|
+
TK: Tokelau
|
1397
|
+
TL: Timor-Leste
|
1398
|
+
TM: Turkmenistan
|
1399
|
+
TN: Tunisia
|
1400
|
+
TO: Tonga
|
1401
|
+
TR: Turkey
|
1402
|
+
TT: Trinidad and Tobago
|
1403
|
+
TV: Tuvalu
|
1404
|
+
TW: Taiwan
|
1405
|
+
TZ: Tanzania, United Republic of
|
1406
|
+
UA: Ukraine
|
1407
|
+
UG: Uganda
|
1408
|
+
UM: United States Minor Outlying Islands
|
1176
1409
|
US: United States of America
|
1410
|
+
UY: Uruguay
|
1411
|
+
UZ: Uzbekistan
|
1412
|
+
VA: Holy See (Vatican City State)
|
1413
|
+
VC: Saint Vincent and the Grenadines
|
1414
|
+
VE: Venezuela, Bolivarian Republic of
|
1415
|
+
VG: Virgin Islands, British
|
1416
|
+
VI: Virgin Islands, U.S.
|
1417
|
+
VN: Vietnam
|
1418
|
+
VU: Vanuatu
|
1419
|
+
WF: Wallis and Futuna
|
1420
|
+
WS: Samoa
|
1421
|
+
YE: Yemen
|
1422
|
+
YT: Mayotte
|
1423
|
+
ZA: South Africa
|
1424
|
+
ZM: Zambia
|
1425
|
+
ZW: Zimbabwe
|
1177
1426
|
coupon: Coupon
|
1178
1427
|
coupon_code: Coupon code
|
1179
1428
|
coupon_code_already_applied: The coupon code has already been applied to this
|
@@ -21,6 +21,7 @@ require "spree/core/search/base"
|
|
21
21
|
require "spree/core/search/variant"
|
22
22
|
require 'spree/preferences/configuration'
|
23
23
|
require 'spree/core/environment'
|
24
|
+
require 'rails/gem_version'
|
24
25
|
|
25
26
|
module Spree
|
26
27
|
class AppConfiguration < Preferences::Configuration
|
@@ -459,7 +460,7 @@ module Spree
|
|
459
460
|
# @!attribute [rw] image_attachment_module
|
460
461
|
# @return [Module] a module that can be included into Spree::Image to allow attachments
|
461
462
|
# Enumerable of images adhering to the present_image_class interface
|
462
|
-
class_name_attribute :image_attachment_module, default:
|
463
|
+
class_name_attribute :image_attachment_module, default: Rails.gem_version >= Gem::Version.new("6.1.0") ? "Spree::Image::ActiveStorageAttachment" : "Spree::Image::PaperclipAttachment"
|
463
464
|
|
464
465
|
# @!attribute [rw] allowed_image_mime_types
|
465
466
|
#
|
@@ -477,7 +478,7 @@ module Spree
|
|
477
478
|
# @!attribute [rw] taxon_attachment_module
|
478
479
|
# @return [Module] a module that can be included into Spree::Taxon to allow attachments
|
479
480
|
# Enumerable of taxons adhering to the present_taxon_class interface
|
480
|
-
class_name_attribute :taxon_attachment_module, default:
|
481
|
+
class_name_attribute :taxon_attachment_module, default: Rails.gem_version >= Gem::Version.new("6.1.0") ? "Spree::Taxon::ActiveStorageAttachment" : "Spree::Taxon::PaperclipAttachment"
|
481
482
|
|
482
483
|
# Allows providing your own class instance for generating order numbers.
|
483
484
|
#
|
data/lib/spree/core/version.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -965,8 +965,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
965
965
|
- !ruby/object:Gem::Version
|
966
966
|
version: 1.8.23
|
967
967
|
requirements: []
|
968
|
-
rubygems_version: 3.
|
969
|
-
signing_key:
|
968
|
+
rubygems_version: 3.3.7
|
969
|
+
signing_key:
|
970
970
|
specification_version: 4
|
971
971
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|
972
972
|
test_files: []
|