spree_core 3.4.6 → 3.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. data/app/assets/javascripts/spree.js.coffee +1 -1
  3. data/app/helpers/spree/base_helper.rb +4 -0
  4. data/app/models/concerns/spree/named_type.rb +1 -1
  5. data/app/models/concerns/spree/user_methods.rb +21 -4
  6. data/app/models/concerns/spree/user_reporting.rb +2 -2
  7. data/app/models/spree/address.rb +6 -12
  8. data/app/models/spree/adjustable/adjustments_updater.rb +2 -1
  9. data/app/models/spree/country.rb +2 -1
  10. data/app/models/spree/line_item.rb +8 -2
  11. data/app/models/spree/log_entry.rb +1 -1
  12. data/app/models/spree/order.rb +8 -6
  13. data/app/models/spree/order/checkout.rb +1 -0
  14. data/app/models/spree/order_contents.rb +20 -12
  15. data/app/models/spree/order_inventory.rb +24 -12
  16. data/app/models/spree/payment/processing.rb +2 -2
  17. data/app/models/spree/preferences/preferable.rb +1 -1
  18. data/app/models/spree/product/scopes.rb +1 -1
  19. data/app/models/spree/promotion.rb +15 -1
  20. data/app/models/spree/promotion/rules/option_value.rb +13 -5
  21. data/app/models/spree/promotion/rules/product.rb +2 -1
  22. data/app/models/spree/promotion/rules/taxon.rb +3 -1
  23. data/app/models/spree/promotion_action_line_item.rb +3 -0
  24. data/app/models/spree/promotion_handler/promotion_duplicator.rb +52 -0
  25. data/app/models/spree/refund.rb +1 -1
  26. data/app/models/spree/reimbursement.rb +1 -1
  27. data/app/models/spree/reimbursement/reimbursement_type_engine.rb +7 -18
  28. data/app/models/spree/reimbursement_performer.rb +3 -7
  29. data/app/models/spree/reimbursement_type/original_payment.rb +2 -2
  30. data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +3 -7
  31. data/app/models/spree/reimbursement_type/store_credit.rb +2 -10
  32. data/app/models/spree/shipment.rb +10 -4
  33. data/app/models/spree/stock/availability_validator.rb +1 -1
  34. data/app/models/spree/stock/packer.rb +1 -1
  35. data/app/models/spree/stock/splitter/backordered.rb +5 -7
  36. data/app/models/spree/stock/splitter/base.rb +1 -0
  37. data/app/models/spree/stock/splitter/shipping_category.rb +9 -16
  38. data/app/models/spree/stock/splitter/weight.rb +18 -20
  39. data/app/models/spree/stock_transfer.rb +2 -1
  40. data/app/models/spree/store_credit_category.rb +13 -0
  41. data/app/models/spree/taxon.rb +7 -0
  42. data/app/models/spree/variant.rb +1 -1
  43. data/app/validators/email_validator.rb +7 -0
  44. data/config/locales/en.yml +18 -27
  45. data/db/default/spree/states.rb +9 -27
  46. data/db/migrate/20150128032538_remove_environment_from_tracker.rb +2 -0
  47. data/db/migrate/20171004223836_remove_icon_from_taxons.rb +8 -0
  48. data/db/migrate/20180222133746_add_unique_index_on_spree_promotions_code.rb +6 -0
  49. data/lib/generators/spree/dummy_model/dummy_model_generator.rb +23 -0
  50. data/lib/generators/spree/dummy_model/templates/migration.rb.tt +10 -0
  51. data/lib/generators/spree/dummy_model/templates/model.rb.tt +6 -0
  52. data/lib/spree/core/controller_helpers/auth.rb +1 -1
  53. data/lib/spree/core/controller_helpers/common.rb +4 -0
  54. data/lib/spree/core/controller_helpers/order.rb +6 -5
  55. data/lib/spree/core/engine.rb +10 -10
  56. data/lib/spree/core/environment_extension.rb +3 -0
  57. data/lib/spree/core/importer/order.rb +1 -1
  58. data/lib/spree/core/validators/email.rb +1 -0
  59. data/lib/spree/core/version.rb +1 -1
  60. data/lib/spree/money.rb +1 -5
  61. data/lib/spree/permitted_attributes.rb +1 -1
  62. data/lib/spree/testing_support/capybara_ext.rb +16 -13
  63. data/lib/spree/testing_support/common_rake.rb +4 -1
  64. data/lib/spree/testing_support/factories/inventory_unit_factory.rb +7 -0
  65. data/lib/spree/testing_support/factories/taxon_factory.rb +1 -1
  66. data/spree_core.gemspec +1 -1
  67. data/vendor/assets/javascripts/jsuri.js +458 -2
  68. metadata +13 -7
  69. data/app/models/spree/tracker.rb +0 -25
  70. data/lib/spree/testing_support/factories/tracker_factory.rb +0 -7
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.6
4
+ version: 3.5.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 5.1.4
229
+ version: 5.1.5
230
230
  type: :runtime
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 5.1.4
236
+ version: 5.1.5
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: ransack
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -462,6 +462,7 @@ files:
462
462
  - app/models/spree/promotion_handler/coupon.rb
463
463
  - app/models/spree/promotion_handler/free_shipping.rb
464
464
  - app/models/spree/promotion_handler/page.rb
465
+ - app/models/spree/promotion_handler/promotion_duplicator.rb
465
466
  - app/models/spree/promotion_rule.rb
466
467
  - app/models/spree/promotion_rule_taxon.rb
467
468
  - app/models/spree/promotion_rule_user.rb
@@ -538,12 +539,12 @@ files:
538
539
  - app/models/spree/taxon.rb
539
540
  - app/models/spree/taxon_icon.rb
540
541
  - app/models/spree/taxonomy.rb
541
- - app/models/spree/tracker.rb
542
542
  - app/models/spree/validations/db_maximum_length_validator.rb
543
543
  - app/models/spree/variant.rb
544
544
  - app/models/spree/zone.rb
545
545
  - app/models/spree/zone_member.rb
546
546
  - app/validators/db_maximum_length_validator.rb
547
+ - app/validators/email_validator.rb
547
548
  - app/views/layouts/spree/base_mailer.html.erb
548
549
  - app/views/spree/order_mailer/_adjustment.html.erb
549
550
  - app/views/spree/order_mailer/_subtotal.html.erb
@@ -836,6 +837,8 @@ files:
836
837
  - db/migrate/20170413211707_change_indexes_on_friendly_id_slugs.rb
837
838
  - db/migrate/20170722102643_add_analytics_kind_to_spree_trackers.rb
838
839
  - db/migrate/20170727103056_rename_tracker_kind_field.rb
840
+ - db/migrate/20171004223836_remove_icon_from_taxons.rb
841
+ - db/migrate/20180222133746_add_unique_index_on_spree_promotions_code.rb
839
842
  - db/seeds.rb
840
843
  - lib/friendly_id/slug_rails5_patch.rb
841
844
  - lib/generators/spree/custom_user/custom_user_generator.rb
@@ -851,6 +854,9 @@ files:
851
854
  - lib/generators/spree/dummy/templates/rails/routes.rb
852
855
  - lib/generators/spree/dummy/templates/rails/script/rails
853
856
  - lib/generators/spree/dummy/templates/rails/test.rb
857
+ - lib/generators/spree/dummy_model/dummy_model_generator.rb
858
+ - lib/generators/spree/dummy_model/templates/migration.rb.tt
859
+ - lib/generators/spree/dummy_model/templates/model.rb.tt
854
860
  - lib/generators/spree/install/install_generator.rb
855
861
  - lib/generators/spree/install/templates/config/initializers/spree.rb
856
862
  - lib/generators/spree/install/templates/vendor/assets/javascripts/spree/backend/all.js
@@ -945,7 +951,6 @@ files:
945
951
  - lib/spree/testing_support/factories/tax_rate_factory.rb
946
952
  - lib/spree/testing_support/factories/taxon_factory.rb
947
953
  - lib/spree/testing_support/factories/taxonomy_factory.rb
948
- - lib/spree/testing_support/factories/tracker_factory.rb
949
954
  - lib/spree/testing_support/factories/user_factory.rb
950
955
  - lib/spree/testing_support/factories/variant_factory.rb
951
956
  - lib/spree/testing_support/factories/zone_factory.rb
@@ -984,7 +989,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
984
989
  - !ruby/object:Gem::Version
985
990
  version: 1.8.23
986
991
  requirements: []
987
- rubygems_version: 3.0.2
992
+ rubyforge_project:
993
+ rubygems_version: 2.6.14
988
994
  signing_key:
989
995
  specification_version: 4
990
996
  summary: The bare bones necessary for Spree.
@@ -1,25 +0,0 @@
1
- module Spree
2
- class Tracker < Spree::Base
3
- TRACKING_ENGINES = %i(google_analytics segment).freeze
4
- enum engine: TRACKING_ENGINES
5
-
6
- after_commit :clear_cache
7
-
8
- validates :analytics_id, presence: true, uniqueness: { scope: :engine, case_sensitive: false }
9
-
10
- scope :active, -> { where(active: true) }
11
-
12
- def self.current(engine = TRACKING_ENGINES.first)
13
- tracker = Rails.cache.fetch("current_tracker/#{engine}") do
14
- send(engine).active.first
15
- end
16
- tracker.analytics_id.present? ? tracker : nil if tracker
17
- end
18
-
19
- def clear_cache
20
- TRACKING_ENGINES.each do |engine|
21
- Rails.cache.delete("current_tracker/#{engine}")
22
- end
23
- end
24
- end
25
- end
@@ -1,7 +0,0 @@
1
- FactoryBot.define do
2
- factory :tracker, class: Spree::Tracker do
3
- analytics_id 'A100'
4
- active true
5
- engine :google_analytics
6
- end
7
- end