spree_core 4.6.3 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/finders/spree/countries/find.rb +1 -1
  3. data/app/finders/spree/products/find.rb +1 -1
  4. data/app/finders/spree/taxons/find.rb +3 -9
  5. data/app/helpers/spree/base_helper.rb +1 -5
  6. data/app/helpers/spree/products_helper.rb +3 -3
  7. data/app/models/concerns/spree/metadata.rb +7 -2
  8. data/app/models/concerns/spree/user_roles.rb +3 -3
  9. data/app/models/spree/address.rb +5 -3
  10. data/app/models/spree/base.rb +5 -1
  11. data/app/models/spree/cms/sections/image_gallery.rb +1 -7
  12. data/app/models/spree/cms/sections/side_by_side_images.rb +1 -7
  13. data/app/models/spree/country.rb +2 -2
  14. data/app/models/spree/digital_link.rb +5 -1
  15. data/app/models/spree/order.rb +4 -4
  16. data/app/models/spree/payment.rb +4 -12
  17. data/app/models/spree/preference.rb +5 -1
  18. data/app/models/spree/product.rb +3 -11
  19. data/app/models/spree/product_property.rb +1 -1
  20. data/app/models/spree/return_item.rb +5 -1
  21. data/app/models/spree/stock/splitter/weight.rb +1 -1
  22. data/app/models/spree/store.rb +2 -2
  23. data/app/models/spree/wishlist.rb +5 -1
  24. data/app/models/spree/zone.rb +1 -1
  25. data/app/services/spree/seeds/countries.rb +12 -27
  26. data/app/services/spree/seeds/states.rb +8 -17
  27. data/app/services/spree/stock_locations/stock_items/create.rb +12 -18
  28. data/app/validators/db_maximum_length_validator.rb +2 -6
  29. data/config/initializers/rails61_fixes.rb +1 -3
  30. data/config/locales/en.yml +6 -0
  31. data/lib/spree/core/configuration.rb +1 -1
  32. data/lib/spree/core/controller_helpers/auth.rb +1 -1
  33. data/lib/spree/core/controller_helpers/common.rb +5 -5
  34. data/lib/spree/core/engine.rb +1 -0
  35. data/lib/spree/core/preferences/preferable_class_methods.rb +1 -1
  36. data/lib/spree/core/version.rb +1 -1
  37. data/lib/spree/testing_support/controller_requests.rb +10 -10
  38. data/spree_core.gemspec +3 -3
  39. metadata +22 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfc76e7ab1af8b397215184841f2d4303ee2407111799e9c5c5b042fac17898b
4
- data.tar.gz: b1da196aebc88f74e6c17dea7e4df41fc56c68797e8691dfa8ab2a968fd5143b
3
+ metadata.gz: b694ef25dfdd98db89c6c36a42cc50de19b6dab09cc827c5273e57dc066f38d6
4
+ data.tar.gz: '09ecb007e8e2181ace749a1b6776c8fe62eafdb07f321238d5fd69670f209206'
5
5
  SHA512:
6
- metadata.gz: 70240708a3c284ea4c4ef0894be9f3ec90b3665882e6d492c1d682373250c3e186bb0b32c81bfde362cdfe75e146afb27bfbd49d1b6722c28037e9e5507dc31a
7
- data.tar.gz: a612ea4fce2402684bdda0d6da721406b63161659f41827e8e9e05d42b1f899ac248d4b5e12ee5bbf8ca204a17c13c310787677cc7d0c41e87acd225d83e5ac6
6
+ metadata.gz: 3620378de0b17967f36b2d0a4c72e302aa25dae3f700aaf09e2d9b9cec73bf4b924a81a273beb9da245571c1c48128e5ad53c26539a7f8de04b0c38cdbb31d20
7
+ data.tar.gz: f902de746ff1dfbeef5f778f6cc204db4c47477fd76c8a0eeea60874fa45a188be8cf33ca1462240f636f57394cf790f71ce6dbdd2ac48bf756aa4e3379b059f
@@ -8,7 +8,7 @@ module Spree
8
8
  end
9
9
 
10
10
  def call
11
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
11
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
12
12
  Spree::Countries::Find.new.call is deprecated and will be removed in Spree 5.0.
13
13
  Please use Spree::Countries::Find.new.execute instead
14
14
  DEPRECATION
@@ -5,7 +5,7 @@ module Spree
5
5
  @scope = scope
6
6
 
7
7
  if current_currency.present?
8
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
8
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
9
9
  `current_currency` param is deprecated and will be removed in Spree 5.
10
10
  Please pass `:currency` in `params` hash instead.
11
11
  DEPRECATION
@@ -65,15 +65,9 @@ module Spree
65
65
  def by_parent_permalink(taxons)
66
66
  return taxons unless parent_permalink?
67
67
 
68
- if Rails::VERSION::STRING >= '6.1'
69
- taxons.joins(:parent).
70
- join_translation_table(Taxon, 'parents_spree_taxons').
71
- where(["#{Taxon.translation_table_alias}.permalink = ?", parent_permalink])
72
- else
73
- taxons.joins("INNER JOIN #{Spree::Taxon.table_name} AS parent_taxon ON parent_taxon.id = #{Spree::Taxon.table_name}.parent_id").
74
- join_translation_table(Taxon, 'parent_taxon').
75
- where(["#{Taxon.translation_table_alias}.permalink = ?", parent_permalink])
76
- end
68
+ taxons.joins(:parent).
69
+ join_translation_table(Taxon, 'parents_spree_taxons').
70
+ where(["#{Taxon.translation_table_alias}.permalink = ?", parent_permalink])
77
71
  end
78
72
 
79
73
  def by_taxonomy(taxons)
@@ -55,7 +55,7 @@ module Spree
55
55
  end
56
56
 
57
57
  def logo(image_path = nil, options = {})
58
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
58
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
59
59
  `BaseHelper#logo` is deprecated and will be removed in Spree 5.0.
60
60
  Please use `FrontendHelper#logo` instead
61
61
  DEPRECATION
@@ -174,10 +174,6 @@ module Spree
174
174
  Spree::Core::Engine.frontend_available?
175
175
  end
176
176
 
177
- def rails_5?
178
- Rails::VERSION::STRING < '6.0'
179
- end
180
-
181
177
  def spree_storefront_resource_url(resource, options = {})
182
178
  if defined?(locale_param) && locale_param.present?
183
179
  options.merge!(locale: locale_param)
@@ -53,7 +53,7 @@ module Spree
53
53
  end
54
54
 
55
55
  def cache_key_for_products(products = @products, additional_cache_key = nil)
56
- max_updated_at = (products.except(:group, :order).maximum(:updated_at) || Date.today).to_s(:number)
56
+ max_updated_at = (products.except(:group, :order).maximum(:updated_at) || Date.today).to_formatted_s(:number)
57
57
  products_cache_keys = "spree/products/#{products.map(&:id).join('-')}-#{params[:page]}-#{params[:sort_by]}-#{max_updated_at}-#{@taxon&.id}"
58
58
  (common_product_cache_keys + [products_cache_keys] + [additional_cache_key]).compact.join('/')
59
59
  end
@@ -76,7 +76,7 @@ module Spree
76
76
 
77
77
  # will return a human readable string
78
78
  def available_status(product)
79
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
79
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
80
80
  `Spree::ProductsHelper#available_status` method from spree/core is deprecated and will be removed.
81
81
  Please use `Spree::Admin::ProductsHelper#available_status` from spree_backend instead.
82
82
  DEPRECATION
@@ -140,7 +140,7 @@ module Spree
140
140
  end
141
141
 
142
142
  def related_products
143
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
143
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
144
144
  ProductsHelper#related_products is deprecated and will be removed in Spree 5.0.
145
145
  Please use ProductsHelper#relations from now on.
146
146
  DEPRECATION
@@ -5,8 +5,13 @@ module Spree
5
5
  included do
6
6
  attribute :public_metadata, default: {}
7
7
  attribute :private_metadata, default: {}
8
- serialize :public_metadata, HashSerializer
9
- serialize :private_metadata, HashSerializer
8
+ if Rails::VERSION::STRING >= '7.1.0'
9
+ serialize :public_metadata, coder: HashSerializer
10
+ serialize :private_metadata, coder: HashSerializer
11
+ else
12
+ serialize :public_metadata, HashSerializer
13
+ serialize :private_metadata, HashSerializer
14
+ end
10
15
  end
11
16
 
12
17
  # https://nandovieira.com/using-postgresql-and-jsonb-with-ruby-on-rails
@@ -14,19 +14,19 @@ module Spree
14
14
  end
15
15
 
16
16
  def self.admin
17
- ActiveSupport::Deprecation.warn('`User#admin` is deprecated and will be removed in Spree 5. Please use `User#spree_admin`')
17
+ Spree::Deprecation.warn('`User#admin` is deprecated and will be removed in Spree 5. Please use `User#spree_admin`')
18
18
 
19
19
  spree_admin
20
20
  end
21
21
 
22
22
  def self.admin_created?
23
- ActiveSupport::Deprecation.warn('`User#admin_created?` is deprecated and will be removed in Spree 5. Please use `User#spree_admin_created?`')
23
+ Spree::Deprecation.warn('`User#admin_created?` is deprecated and will be removed in Spree 5. Please use `User#spree_admin_created?`')
24
24
 
25
25
  spree_admin_created?
26
26
  end
27
27
 
28
28
  def admin?
29
- ActiveSupport::Deprecation.warn('`User#admin?` is deprecated and will be removed in Spree 5. Please use `User#spree_admin?`')
29
+ Spree::Deprecation.warn('`User#admin?` is deprecated and will be removed in Spree 5. Please use `User#spree_admin?`')
30
30
 
31
31
  spree_admin?
32
32
  end
@@ -10,7 +10,9 @@ module Spree
10
10
  include Spree::Security::Addresses
11
11
  end
12
12
 
13
- if Rails::VERSION::STRING >= '6.1'
13
+ if Rails::VERSION::STRING >= '7.1.0'
14
+ serialize :preferences, type: Hash, coder: YAML, default: {}
15
+ else
14
16
  serialize :preferences, Hash, default: {}
15
17
  end
16
18
 
@@ -67,7 +69,7 @@ module Spree
67
69
  self.whitelisted_ransackable_associations = %w[country state user]
68
70
 
69
71
  def self.build_default
70
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
72
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
71
73
  `Address#build_default` is deprecated and will be removed in Spree 5.0.
72
74
  Please use standard rails `Address.new(country: current_store.default_country)`
73
75
  DEPRECATION
@@ -75,7 +77,7 @@ module Spree
75
77
  end
76
78
 
77
79
  def self.default(user = nil, kind = 'bill')
78
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
80
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
79
81
  `Address#default` is deprecated and will be removed in Spree 5.0.
80
82
  DEPRECATION
81
83
  if user && user_address = user.public_send(:"#{kind}_address")
@@ -1,6 +1,10 @@
1
1
  class Spree::Base < ApplicationRecord
2
2
  include Spree::Preferences::Preferable
3
- serialize :preferences, Hash
3
+ if Rails::VERSION::STRING >= '7.1.0'
4
+ serialize :preferences, type: Hash, coder: YAML
5
+ else
6
+ serialize :preferences, Hash
7
+ end
4
8
 
5
9
  include Spree::RansackableAttributes
6
10
  include Spree::TranslatableResourceScopes
@@ -3,11 +3,7 @@ module Spree::Cms::Sections
3
3
  after_initialize :default_values
4
4
  validate :reset_multiple_link_attributes
5
5
 
6
- LINKED_RESOURCE_TYPE = if Rails::VERSION::STRING < '6.0'
7
- ['Spree::Taxon'].freeze
8
- else
9
- ['Spree::Taxon', 'Spree::Product'].freeze
10
- end
6
+ LINKED_RESOURCE_TYPE = ['Spree::Taxon', 'Spree::Product'].freeze
11
7
 
12
8
  LAYOUT_OPTIONS = ['Default', 'Reversed'].freeze
13
9
  LABEL_OPTIONS = ['Show', 'Hide'].freeze
@@ -71,8 +67,6 @@ module Spree::Cms::Sections
71
67
  private
72
68
 
73
69
  def reset_multiple_link_attributes
74
- return if Rails::VERSION::STRING < '6.0'
75
-
76
70
  if link_type_one_changed?
77
71
  return if link_type_one_was.nil?
78
72
 
@@ -3,11 +3,7 @@ module Spree::Cms::Sections
3
3
  after_initialize :default_values
4
4
  validate :reset_multiple_link_attributes
5
5
 
6
- LINKED_RESOURCE_TYPE = if Rails::VERSION::STRING < '6.0'
7
- ['Spree::Taxon'].freeze
8
- else
9
- ['Spree::Taxon', 'Spree::Product'].freeze
10
- end
6
+ LINKED_RESOURCE_TYPE = ['Spree::Taxon', 'Spree::Product'].freeze
11
7
 
12
8
  store :content, accessors: [:link_type_one, :link_one, :title_one, :subtitle_one,
13
9
  :link_type_two, :link_two, :title_two, :subtitle_two], coder: JSON
@@ -49,8 +45,6 @@ module Spree::Cms::Sections
49
45
  private
50
46
 
51
47
  def reset_multiple_link_attributes
52
- return if Rails::VERSION::STRING < '6.0'
53
-
54
48
  if link_type_one_changed?
55
49
  return if link_type_one_was.nil?
56
50
 
@@ -19,7 +19,7 @@ module Spree
19
19
  validates :name, :iso_name, :iso, :iso3, presence: true, uniqueness: { case_sensitive: false, scope: spree_base_uniqueness_scope }
20
20
 
21
21
  def self.default(store = nil)
22
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
22
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
23
23
  `Country#default` is deprecated and will be removed in Spree 5.0.
24
24
  Please use `current_store.default_country` instead
25
25
  DEPRECATION
@@ -49,7 +49,7 @@ module Spree
49
49
  private
50
50
 
51
51
  def ensure_not_default
52
- ActiveSupport::Deprecation.warn('Country#ensure_not_default is deprecated and will be removed in Spree v5')
52
+ Spree::Deprecation.warn('Country#ensure_not_default is deprecated and will be removed in Spree v5')
53
53
 
54
54
  if id.eql?(Spree::Config[:default_country_id])
55
55
  errors.add(:base, Spree.t(:default_country_cannot_be_deleted))
@@ -1,6 +1,10 @@
1
1
  module Spree
2
2
  class DigitalLink < Spree::Base
3
- has_secure_token
3
+ if Rails::VERSION::STRING >= '7.1.0'
4
+ has_secure_token on: :save
5
+ else
6
+ has_secure_token
7
+ end
4
8
 
5
9
  if defined?(Spree::Webhooks)
6
10
  include Spree::Webhooks::HasWebhooks
@@ -415,7 +415,7 @@ module Spree
415
415
 
416
416
  def available_payment_methods(store = nil)
417
417
  if store.present?
418
- ActiveSupport::Deprecation.warn('The `store` parameter is deprecated and will be removed in Spree 5. Order is already associated with Store')
418
+ Spree::Deprecation.warn('The `store` parameter is deprecated and will be removed in Spree 5. Order is already associated with Store')
419
419
  end
420
420
 
421
421
  @available_payment_methods ||= collect_payment_methods(store)
@@ -449,7 +449,7 @@ module Spree
449
449
  end
450
450
 
451
451
  def empty!
452
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
452
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
453
453
  `Order#empty!` is deprecated and will be removed in Spree 5.0.
454
454
  Please use `Spree::Cart::Empty.call(order: order)` instead.
455
455
  DEPRECATION
@@ -647,7 +647,7 @@ module Spree
647
647
  end
648
648
 
649
649
  def validate_payments_attributes(attributes)
650
- ActiveSupport::Deprecation.warn('`Order#validate_payments_attributes` is deprecated and will be removed in Spree 5')
650
+ Spree::Deprecation.warn('`Order#validate_payments_attributes` is deprecated and will be removed in Spree 5')
651
651
 
652
652
  # Ensure the payment methods specified are allowed for this user
653
653
  payment_method_ids = available_payment_methods.map(&:id).map(&:to_s)
@@ -745,7 +745,7 @@ module Spree
745
745
 
746
746
  def collect_payment_methods(store = nil)
747
747
  if store.present?
748
- ActiveSupport::Deprecation.warn('The `store` parameter is deprecated and will be removed in Spree 5. Order is already associated with Store')
748
+ Spree::Deprecation.warn('The `store` parameter is deprecated and will be removed in Spree 5. Order is already associated with Store')
749
749
  end
750
750
  store ||= self.store
751
751
 
@@ -222,18 +222,10 @@ module Spree
222
222
 
223
223
  def validate_source
224
224
  if source && !source.valid?
225
- if Rails::VERSION::STRING >= '6.1'
226
- source.errors.map { |error| { field: error.attribute, message: error&.message } }.each do |err|
227
- next if err[:field].blank? || err[:message].blank?
228
-
229
- add_source_error(err[:field], err[:message])
230
- end
231
- else
232
- source.errors.messages.each do |field, error|
233
- next if field.blank? || error.empty?
234
-
235
- add_source_error(field, error.first)
236
- end
225
+ source.errors.map { |error| { field: error.attribute, message: error&.message } }.each do |err|
226
+ next if err[:field].blank? || err[:message].blank?
227
+
228
+ add_source_error(err[:field], err[:message])
237
229
  end
238
230
  end
239
231
  !errors.present?
@@ -1,5 +1,9 @@
1
1
  class Spree::Preference < Spree::Base
2
- serialize :value
2
+ if Rails::VERSION::STRING >= '7.1.0'
3
+ serialize :value, coder: YAML
4
+ else
5
+ serialize :value
6
+ end
3
7
 
4
8
  validates :key, presence: true,
5
9
  uniqueness: { case_sensitive: false, allow_blank: true, scope: spree_base_uniqueness_scope }
@@ -507,18 +507,10 @@ module Spree
507
507
  # We call master.default_price here to ensure price is initialized.
508
508
  # Required to avoid Variant#check_price validation failing on create.
509
509
  unless master.default_price && master.valid?
510
- if Rails::VERSION::STRING >= '6.1'
511
- master.errors.map { |error| { field: error.attribute, message: error&.message } }.each do |err|
512
- next if err[:field].blank? || err[:message].blank?
510
+ master.errors.map { |error| { field: error.attribute, message: error&.message } }.each do |err|
511
+ next if err[:field].blank? || err[:message].blank?
513
512
 
514
- errors.add(err[:field], err[:message])
515
- end
516
- else
517
- master.errors.messages.each do |field, error|
518
- next if field.blank? || error.empty?
519
-
520
- errors.add(field, error.first)
521
- end
513
+ errors.add(err[:field], err[:message])
522
514
  end
523
515
  end
524
516
  end
@@ -33,7 +33,7 @@ module Spree
33
33
  delegate :name, :presentation, to: :property, prefix: true, allow_nil: true
34
34
 
35
35
  def property_name=(name)
36
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
36
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
37
37
  `ProductProperty#property_name=` is deprecated and will be removed in Spree 5.0.
38
38
  DEPRECATION
39
39
  if name.present?
@@ -62,7 +62,11 @@ module Spree
62
62
  scope :exchange_required, -> { eager_load(:exchange_inventory_units).where(spree_inventory_units: { original_return_item_id: nil }).distinct }
63
63
  scope :resellable, -> { where resellable: true }
64
64
 
65
- serialize :acceptance_status_errors
65
+ if Rails::VERSION::STRING >= '7.1.0'
66
+ serialize :acceptance_status_errors, coder: YAML
67
+ else
68
+ serialize :acceptance_status_errors
69
+ end
66
70
 
67
71
  delegate :eligible_for_return?, :requires_manual_intervention?, to: :validator
68
72
  delegate :variant, to: :inventory_unit
@@ -15,7 +15,7 @@ module Spree
15
15
  private
16
16
 
17
17
  def reduce(package)
18
- contents = split_package_contents_over_threshold(package).sort { |x, y| y.weight <=> x.weight }
18
+ contents = split_package_contents_over_threshold(package).sort_by(&:weight).reverse
19
19
  # Treat current package as one of the generated packages for convenience and add the heaviest item
20
20
  # This also prevents an additional package if no fit is possible
21
21
  package.contents.clear
@@ -112,7 +112,7 @@ module Spree
112
112
  alias_attribute :contact_email, :customer_support_email
113
113
 
114
114
  def self.current(url = nil)
115
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
115
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
116
116
  `Spree::Store.current` is deprecated and will be removed in Spree 5.0
117
117
  Please use `Spree::Stores::FindCurrent.new(url: "https://example.com").execute` instead
118
118
  DEPRECATION
@@ -194,7 +194,7 @@ module Spree
194
194
  end
195
195
 
196
196
  def checkout_zone_or_default
197
- ActiveSupport::Deprecation.warn('Store#checkout_zone_or_default is deprecated and will be removed in Spree 5')
197
+ Spree::Deprecation.warn('Store#checkout_zone_or_default is deprecated and will be removed in Spree 5')
198
198
 
199
199
  @checkout_zone_or_default ||= checkout_zone || Spree::Zone.default_checkout_zone
200
200
  end
@@ -5,7 +5,11 @@ module Spree
5
5
  include Spree::Webhooks::HasWebhooks
6
6
  end
7
7
 
8
- has_secure_token
8
+ if Rails::VERSION::STRING >= '7.1.0'
9
+ has_secure_token on: :save
10
+ else
11
+ has_secure_token
12
+ end
9
13
 
10
14
  belongs_to :user, class_name: "::#{Spree.user_class}", touch: true
11
15
  belongs_to :store, class_name: 'Spree::Store'
@@ -74,7 +74,7 @@ module Spree
74
74
  end
75
75
 
76
76
  def self.default_checkout_zone
77
- ActiveSupport::Deprecation.warn('Spree::Zone.default_checkout_zone is deprecated and will be removed in Spree 5')
77
+ Spree::Deprecation.warn('Spree::Zone.default_checkout_zone is deprecated and will be removed in Spree 5')
78
78
 
79
79
  first
80
80
  end
@@ -9,34 +9,19 @@ module Spree
9
9
 
10
10
  def call
11
11
  ApplicationRecord.transaction do
12
- if Rails::VERSION::MAJOR >= 6
13
- new_countries = Carmen::Country.all.map do |country|
14
- # Skip the creation of some territories, uninhabited islands and the Antarctic.
15
- next if EXCLUDED_COUNTRIES.include?(country.alpha_2_code)
12
+ new_countries = Carmen::Country.all.map do |country|
13
+ # Skip the creation of some territories, uninhabited islands and the Antarctic.
14
+ next if EXCLUDED_COUNTRIES.include?(country.alpha_2_code)
16
15
 
17
- Hash[
18
- 'name': country.name,
19
- 'iso3': country.alpha_3_code,
20
- 'iso': country.alpha_2_code,
21
- 'iso_name': country.name.upcase,
22
- 'numcode': country.numeric_code,
23
- ]
24
- end.compact.uniq
25
- Spree::Country.insert_all(new_countries)
26
- else
27
- Carmen::Country.all.each do |country|
28
- # Skip the creation of some territories, uninhabited islands and the Antarctic.
29
- next if EXCLUDED_COUNTRIES.include?(country.alpha_2_code)
30
-
31
- Spree::Country.where(
32
- name: country.name,
33
- iso3: country.alpha_3_code,
34
- iso: country.alpha_2_code,
35
- iso_name: country.name.upcase,
36
- numcode: country.numeric_code
37
- ).first_or_create!
38
- end
39
- end
16
+ Hash[
17
+ 'name': country.name,
18
+ 'iso3': country.alpha_3_code,
19
+ 'iso': country.alpha_2_code,
20
+ 'iso_name': country.name.upcase,
21
+ 'numcode': country.numeric_code,
22
+ ]
23
+ end.compact.uniq
24
+ Spree::Country.insert_all(new_countries)
40
25
 
41
26
  # Find countries that do not use postal codes (by iso) and set 'zipcode_required' to false for them.
42
27
  Spree::Country.where(iso: Spree::Address::NO_ZIPCODE_ISO_CODES).update_all(zipcode_required: false)
@@ -49,23 +49,14 @@ module Spree
49
49
  end
50
50
 
51
51
  def province_level(country, subregion)
52
- if Rails::VERSION::MAJOR >= 6
53
- new_states = subregion.subregions.map do |province|
54
- Hash[
55
- name: province.name,
56
- abbr: province.code,
57
- country_id: country.id
58
- ]
59
- end.compact.uniq
60
- Spree::State.insert_all(new_states)
61
- else
62
- subregion.subregions.each do |province|
63
- country.states.where(
64
- name: province.name,
65
- abbr: province.code
66
- ).first_or_create!
67
- end
68
- end
52
+ new_states = subregion.subregions.map do |province|
53
+ Hash[
54
+ name: province.name,
55
+ abbr: province.code,
56
+ country_id: country.id
57
+ ]
58
+ end.compact.uniq
59
+ Spree::State.insert_all(new_states)
69
60
  end
70
61
  end
71
62
  end
@@ -5,24 +5,18 @@ module Spree
5
5
  prepend Spree::ServiceModule::Base
6
6
 
7
7
  def call(stock_location:, variants_scope: Spree::Variant)
8
- if Rails::VERSION::MAJOR >= 6
9
- prepared_stock_items = variants_scope.ids.map do |variant_id|
10
- Hash[
11
- 'stock_location_id', stock_location.id,
12
- 'variant_id', variant_id,
13
- 'backorderable', stock_location.backorderable_default,
14
- 'created_at', Time.current,
15
- 'updated_at', Time.current
16
- ]
17
- end
18
- if prepared_stock_items.any?
19
- stock_location.stock_items.insert_all(prepared_stock_items)
20
- variants_scope.touch_all
21
- end
22
- else
23
- variants_scope.find_each do |variant|
24
- stock_location.propagate_variant(variant)
25
- end
8
+ prepared_stock_items = variants_scope.ids.map do |variant_id|
9
+ Hash[
10
+ 'stock_location_id', stock_location.id,
11
+ 'variant_id', variant_id,
12
+ 'backorderable', stock_location.backorderable_default,
13
+ 'created_at', Time.current,
14
+ 'updated_at', Time.current
15
+ ]
16
+ end
17
+ if prepared_stock_items.any?
18
+ stock_location.stock_items.insert_all(prepared_stock_items)
19
+ variants_scope.touch_all
26
20
  end
27
21
  end
28
22
  end
@@ -2,16 +2,12 @@
2
2
  # Validates a field based on the maximum length of the underlying DB field, if there is one.
3
3
  class DbMaximumLengthValidator < ActiveModel::EachValidator
4
4
  def validate_each(record, attribute, value)
5
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
5
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
6
6
  `DbMaximumLengthValidator` is deprecated and will be removed in Spree 5.0.
7
7
  Please remove any `db_maximum_length: true` validations from your codebase
8
8
  DEPRECATION
9
9
 
10
- limit = if defined?(Globalize)
11
- record.class.translation_class.columns_hash[attribute.to_s].limit
12
- else
13
- record.class.columns_hash[attribute.to_s].limit
14
- end
10
+ limit = record.class.columns_hash[attribute.to_s].limit
15
11
  value = record[attribute.to_sym]
16
12
  if value && limit && value.to_s.length > limit
17
13
  record.errors.add(attribute.to_sym, :too_long, count: limit)
@@ -1,3 +1 @@
1
- if Rails::VERSION::STRING >= '6.1'
2
- ActiveRecord::Base.has_many_inversing = false
3
- end
1
+ ActiveRecord::Base.has_many_inversing = false
@@ -1,6 +1,8 @@
1
1
  en:
2
2
  activemodel:
3
3
  errors:
4
+ messages:
5
+ blank: can't be blank
4
6
  models:
5
7
  spree/fulfilment_changer:
6
8
  attributes:
@@ -309,6 +311,8 @@ en:
309
311
  one: Zone
310
312
  other: Zones
311
313
  errors:
314
+ messages:
315
+ blank: can't be blank
312
316
  models:
313
317
  spree/calculator/tiered_flat_rate:
314
318
  attributes:
@@ -1572,6 +1576,7 @@ en:
1572
1576
  starting_from: Starts at
1573
1577
  state: State
1574
1578
  state_based: State Based
1579
+ state_changes: State Changes
1575
1580
  states: States
1576
1581
  state_machine_states:
1577
1582
  accepted: Accepted
@@ -1750,6 +1755,7 @@ en:
1750
1755
  transfer_from_location: Transfer From
1751
1756
  transfer_stock: Transfer Stock
1752
1757
  transfer_to_location: Transfer To
1758
+ translations: Translations
1753
1759
  tree: Tree
1754
1760
  type: Type
1755
1761
  type_to_search: Type to search
@@ -76,7 +76,7 @@ module Spree
76
76
 
77
77
  # searcher_class allows spree extension writers to provide their own Search class
78
78
  def searcher_class
79
- ActiveSupport::Deprecation.warn('`Spree::Config.searcher_class` is deprecated and will be removed in Spree v5, please use `Spree.searcher_class` instead.')
79
+ Spree::Deprecation.warn('`Spree::Config.searcher_class` is deprecated and will be removed in Spree v5, please use `Spree.searcher_class` instead.')
80
80
  @searcher_class ||= Spree.searcher_class
81
81
  end
82
82
 
@@ -75,7 +75,7 @@ module Spree
75
75
  # Override this method in your controllers if you want to have special behavior in case the user is not authorized
76
76
  # to access the requested action. For example, a popup window might simply close itself.
77
77
  def redirect_unauthorized_access
78
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
78
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
79
79
  Core::ControllerHelpers#redirect_unauthorized_access is deprecated and will be removed in Spree 5.0.
80
80
  This method is implemented differently for Storefront and Admin
81
81
  DEPRECATION
@@ -17,7 +17,7 @@ module Spree
17
17
  attr_writer :title
18
18
 
19
19
  def title
20
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
20
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
21
21
  ControllerHelpers::Common is deprecated and will be removed in Spree 5.0.
22
22
  DEPRECATION
23
23
  title_string = @title.present? ? @title : accurate_title
@@ -33,7 +33,7 @@ module Spree
33
33
  end
34
34
 
35
35
  def default_title
36
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
36
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
37
37
  ControllerHelpers::Common is deprecated and will be removed in Spree 5.0.
38
38
  DEPRECATION
39
39
  current_store.name
@@ -41,7 +41,7 @@ module Spree
41
41
 
42
42
  # this is a hook for subclasses to provide title
43
43
  def accurate_title
44
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
44
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
45
45
  ControllerHelpers::Common is deprecated and will be removed in Spree 5.0.
46
46
  DEPRECATION
47
47
  current_store.seo_title
@@ -50,7 +50,7 @@ module Spree
50
50
  private
51
51
 
52
52
  def set_user_language
53
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
53
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
54
54
  ControllerHelpers::Common#set_user_language is deprecated and will be removed in Spree 5.0.
55
55
  Please use `before_action :set_locale` instead
56
56
  DEPRECATION
@@ -65,7 +65,7 @@ module Spree
65
65
  # Default layout is: +app/views/spree/layouts/spree_application+
66
66
  #
67
67
  def get_layout
68
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
68
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
69
69
  ControllerHelpers::Common is deprecated and will be removed in Spree 5.0.
70
70
  DEPRECATION
71
71
  return unless defined?(Spree::Frontend)
@@ -27,6 +27,7 @@ module Spree
27
27
  app.config.active_record.yaml_column_permitted_classes = [Symbol, BigDecimal]
28
28
  Spree::Config = app.config.spree.preferences
29
29
  Spree::Dependencies = app.config.spree.dependencies
30
+ Spree::Deprecation = ActiveSupport::Deprecation.new
30
31
  end
31
32
 
32
33
  initializer 'spree.register.calculators', before: :after_initialize do |app|
@@ -19,7 +19,7 @@ module Spree::Preferences
19
19
  value = convert_preference_value(value, type)
20
20
  preferences[name] = value
21
21
 
22
- ActiveSupport::Deprecation.warn("`#{name}` is deprecated. #{deprecated}") if deprecated
22
+ Spree::Deprecation.warn("`#{name}` is deprecated. #{deprecated}") if deprecated
23
23
 
24
24
  # If this is an activerecord object, we need to inform
25
25
  # ActiveRecord::Dirty that this value has changed, since this is an
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '4.6.3'.freeze
2
+ VERSION = '4.7.0'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -8,7 +8,7 @@ module Spree
8
8
  end
9
9
 
10
10
  def spree_get(action, parameters = nil, session = nil, flash = nil)
11
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
11
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
12
12
  ControllerRequests#spree_get is deprecated and will be removed in Spree 5.0.
13
13
  Please use get, params: {}
14
14
  DEPRECATION
@@ -17,7 +17,7 @@ module Spree
17
17
 
18
18
  # Executes a request simulating POST HTTP method and set/volley the response
19
19
  def spree_post(action, parameters = nil, session = nil, flash = nil)
20
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
20
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
21
21
  ControllerRequests#spree_post is deprecated and will be removed in Spree 5.0.
22
22
  Please use post, params: {}
23
23
  DEPRECATION
@@ -26,7 +26,7 @@ module Spree
26
26
 
27
27
  # Executes a request simulating PUT HTTP method and set/volley the response
28
28
  def spree_put(action, parameters = nil, session = nil, flash = nil)
29
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
29
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
30
30
  ControllerRequests#spree_put is deprecated and will be removed in Spree 5.0.
31
31
  Please use put, params: {}
32
32
  DEPRECATION
@@ -35,7 +35,7 @@ module Spree
35
35
 
36
36
  # # Executes a request simulating PATCH HTTP method and set/volley the response
37
37
  def spree_patch(action, parameters = nil, session = nil, flash = nil)
38
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
38
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
39
39
  ControllerRequests#spree_patch is deprecated and will be removed in Spree 5.0.
40
40
  Please use patch, params: {}
41
41
  DEPRECATION
@@ -44,7 +44,7 @@ module Spree
44
44
 
45
45
  # Executes a request simulating DELETE HTTP method and set/volley the response
46
46
  def spree_delete(action, parameters = nil, session = nil, flash = nil)
47
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
47
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
48
48
  ControllerRequests#spree_delete is deprecated and will be removed in Spree 5.0.
49
49
  Please use delete, params: {}
50
50
  DEPRECATION
@@ -52,35 +52,35 @@ module Spree
52
52
  end
53
53
 
54
54
  def spree_xhr_get(action, parameters = nil, session = nil, flash = nil)
55
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
55
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
56
56
  ControllerRequests#spree_xhr_get is deprecated and will be removed in Spree 5.0.
57
57
  DEPRECATION
58
58
  process_spree_xhr_action(action, parameters, session, flash, :get)
59
59
  end
60
60
 
61
61
  def spree_xhr_post(action, parameters = nil, session = nil, flash = nil)
62
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
62
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
63
63
  ControllerRequests#spree_xhr_post is deprecated and will be removed in Spree 5.0.
64
64
  DEPRECATION
65
65
  process_spree_xhr_action(action, parameters, session, flash, :post)
66
66
  end
67
67
 
68
68
  def spree_xhr_put(action, parameters = nil, session = nil, flash = nil)
69
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
69
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
70
70
  ControllerRequests#spree_xhr_put is deprecated and will be removed in Spree 5.0.
71
71
  DEPRECATION
72
72
  process_spree_xhr_action(action, parameters, session, flash, :put)
73
73
  end
74
74
 
75
75
  def spree_xhr_patch(action, parameters = nil, session = nil, flash = nil)
76
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
76
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
77
77
  ControllerRequests#spree_xhr_patch is deprecated and will be removed in Spree 5.0.
78
78
  DEPRECATION
79
79
  process_spree_xhr_action(action, parameters, session, flash, :patch)
80
80
  end
81
81
 
82
82
  def spree_xhr_delete(action, parameters = nil, session = nil, flash = nil)
83
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
83
+ Spree::Deprecation.warn(<<-DEPRECATION, caller)
84
84
  ControllerRequests#spree_xhr_delete is deprecated and will be removed in Spree 5.0.
85
85
  DEPRECATION
86
86
  process_spree_xhr_action(action, parameters, session, flash, :delete)
data/spree_core.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  "source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
21
21
  }
22
22
 
23
- s.required_ruby_version = '>= 2.5.0'
23
+ s.required_ruby_version = '>= 3.0'
24
24
  s.required_rubygems_version = '>= 1.8.23'
25
25
 
26
26
  s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
  actionpack actionview activejob activemodel activerecord
31
31
  activestorage activesupport railties
32
32
  ].each do |rails_gem|
33
- s.add_dependency rails_gem, '>= 6.1', '< 7.1'
33
+ s.add_dependency rails_gem, '>= 6.1', '< 7.2'
34
34
  end
35
35
 
36
36
  s.add_dependency 'activemerchant', '~> 1.67'
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
45
45
  s.add_dependency 'money', '~> 6.13'
46
46
  s.add_dependency 'monetize', '~> 1.9'
47
47
  s.add_dependency 'paranoia', '~> 2.4'
48
- s.add_dependency 'ransack', '>= 2.3', '< 3.0'
48
+ s.add_dependency 'ransack', '>= 4.1'
49
49
  s.add_dependency 'rexml'
50
50
  s.add_dependency 'state_machines-activerecord', '~> 0.6'
51
51
  s.add_dependency 'state_machines-activemodel', '~> 0.7'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.3
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '6.1'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '7.1'
23
+ version: '7.2'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '6.1'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '7.1'
33
+ version: '7.2'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: actionview
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: '6.1'
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '7.1'
43
+ version: '7.2'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  version: '6.1'
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '7.1'
53
+ version: '7.2'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: activejob
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -60,7 +60,7 @@ dependencies:
60
60
  version: '6.1'
61
61
  - - "<"
62
62
  - !ruby/object:Gem::Version
63
- version: '7.1'
63
+ version: '7.2'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
@@ -70,7 +70,7 @@ dependencies:
70
70
  version: '6.1'
71
71
  - - "<"
72
72
  - !ruby/object:Gem::Version
73
- version: '7.1'
73
+ version: '7.2'
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: activemodel
76
76
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +80,7 @@ dependencies:
80
80
  version: '6.1'
81
81
  - - "<"
82
82
  - !ruby/object:Gem::Version
83
- version: '7.1'
83
+ version: '7.2'
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  version: '6.1'
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
- version: '7.1'
93
+ version: '7.2'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: activerecord
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: '6.1'
101
101
  - - "<"
102
102
  - !ruby/object:Gem::Version
103
- version: '7.1'
103
+ version: '7.2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: '6.1'
111
111
  - - "<"
112
112
  - !ruby/object:Gem::Version
113
- version: '7.1'
113
+ version: '7.2'
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: activestorage
116
116
  requirement: !ruby/object:Gem::Requirement
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: '6.1'
121
121
  - - "<"
122
122
  - !ruby/object:Gem::Version
123
- version: '7.1'
123
+ version: '7.2'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ dependencies:
130
130
  version: '6.1'
131
131
  - - "<"
132
132
  - !ruby/object:Gem::Version
133
- version: '7.1'
133
+ version: '7.2'
134
134
  - !ruby/object:Gem::Dependency
135
135
  name: activesupport
136
136
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +140,7 @@ dependencies:
140
140
  version: '6.1'
141
141
  - - "<"
142
142
  - !ruby/object:Gem::Version
143
- version: '7.1'
143
+ version: '7.2'
144
144
  type: :runtime
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
@@ -150,7 +150,7 @@ dependencies:
150
150
  version: '6.1'
151
151
  - - "<"
152
152
  - !ruby/object:Gem::Version
153
- version: '7.1'
153
+ version: '7.2'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: railties
156
156
  requirement: !ruby/object:Gem::Requirement
@@ -160,7 +160,7 @@ dependencies:
160
160
  version: '6.1'
161
161
  - - "<"
162
162
  - !ruby/object:Gem::Version
163
- version: '7.1'
163
+ version: '7.2'
164
164
  type: :runtime
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ dependencies:
170
170
  version: '6.1'
171
171
  - - "<"
172
172
  - !ruby/object:Gem::Version
173
- version: '7.1'
173
+ version: '7.2'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: activemerchant
176
176
  requirement: !ruby/object:Gem::Requirement
@@ -357,20 +357,14 @@ dependencies:
357
357
  requirements:
358
358
  - - ">="
359
359
  - !ruby/object:Gem::Version
360
- version: '2.3'
361
- - - "<"
362
- - !ruby/object:Gem::Version
363
- version: '3.0'
360
+ version: '4.1'
364
361
  type: :runtime
365
362
  prerelease: false
366
363
  version_requirements: !ruby/object:Gem::Requirement
367
364
  requirements:
368
365
  - - ">="
369
366
  - !ruby/object:Gem::Version
370
- version: '2.3'
371
- - - "<"
372
- - !ruby/object:Gem::Version
373
- version: '3.0'
367
+ version: '4.1'
374
368
  - !ruby/object:Gem::Dependency
375
369
  name: rexml
376
370
  requirement: !ruby/object:Gem::Requirement
@@ -1127,9 +1121,9 @@ licenses:
1127
1121
  - BSD-3-Clause
1128
1122
  metadata:
1129
1123
  bug_tracker_uri: https://github.com/spree/spree/issues
1130
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.6.3
1124
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.7.0
1131
1125
  documentation_uri: https://dev-docs.spreecommerce.org/
1132
- source_code_uri: https://github.com/spree/spree/tree/v4.6.3
1126
+ source_code_uri: https://github.com/spree/spree/tree/v4.7.0
1133
1127
  post_install_message:
1134
1128
  rdoc_options: []
1135
1129
  require_paths:
@@ -1138,7 +1132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1138
1132
  requirements:
1139
1133
  - - ">="
1140
1134
  - !ruby/object:Gem::Version
1141
- version: 2.5.0
1135
+ version: '3.0'
1142
1136
  required_rubygems_version: !ruby/object:Gem::Requirement
1143
1137
  requirements:
1144
1138
  - - ">="