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.
- checksums.yaml +5 -5
- data/app/assets/javascripts/spree.js.coffee +1 -1
- data/app/helpers/spree/base_helper.rb +4 -0
- data/app/models/concerns/spree/named_type.rb +1 -1
- data/app/models/concerns/spree/user_methods.rb +21 -4
- data/app/models/concerns/spree/user_reporting.rb +2 -2
- data/app/models/spree/address.rb +6 -12
- data/app/models/spree/adjustable/adjustments_updater.rb +2 -1
- data/app/models/spree/country.rb +2 -1
- data/app/models/spree/line_item.rb +8 -2
- data/app/models/spree/log_entry.rb +1 -1
- data/app/models/spree/order.rb +8 -6
- data/app/models/spree/order/checkout.rb +1 -0
- data/app/models/spree/order_contents.rb +20 -12
- data/app/models/spree/order_inventory.rb +24 -12
- data/app/models/spree/payment/processing.rb +2 -2
- data/app/models/spree/preferences/preferable.rb +1 -1
- data/app/models/spree/product/scopes.rb +1 -1
- data/app/models/spree/promotion.rb +15 -1
- data/app/models/spree/promotion/rules/option_value.rb +13 -5
- data/app/models/spree/promotion/rules/product.rb +2 -1
- data/app/models/spree/promotion/rules/taxon.rb +3 -1
- data/app/models/spree/promotion_action_line_item.rb +3 -0
- data/app/models/spree/promotion_handler/promotion_duplicator.rb +52 -0
- data/app/models/spree/refund.rb +1 -1
- data/app/models/spree/reimbursement.rb +1 -1
- data/app/models/spree/reimbursement/reimbursement_type_engine.rb +7 -18
- data/app/models/spree/reimbursement_performer.rb +3 -7
- data/app/models/spree/reimbursement_type/original_payment.rb +2 -2
- data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +3 -7
- data/app/models/spree/reimbursement_type/store_credit.rb +2 -10
- data/app/models/spree/shipment.rb +10 -4
- data/app/models/spree/stock/availability_validator.rb +1 -1
- data/app/models/spree/stock/packer.rb +1 -1
- data/app/models/spree/stock/splitter/backordered.rb +5 -7
- data/app/models/spree/stock/splitter/base.rb +1 -0
- data/app/models/spree/stock/splitter/shipping_category.rb +9 -16
- data/app/models/spree/stock/splitter/weight.rb +18 -20
- data/app/models/spree/stock_transfer.rb +2 -1
- data/app/models/spree/store_credit_category.rb +13 -0
- data/app/models/spree/taxon.rb +7 -0
- data/app/models/spree/variant.rb +1 -1
- data/app/validators/email_validator.rb +7 -0
- data/config/locales/en.yml +18 -27
- data/db/default/spree/states.rb +9 -27
- data/db/migrate/20150128032538_remove_environment_from_tracker.rb +2 -0
- data/db/migrate/20171004223836_remove_icon_from_taxons.rb +8 -0
- data/db/migrate/20180222133746_add_unique_index_on_spree_promotions_code.rb +6 -0
- data/lib/generators/spree/dummy_model/dummy_model_generator.rb +23 -0
- data/lib/generators/spree/dummy_model/templates/migration.rb.tt +10 -0
- data/lib/generators/spree/dummy_model/templates/model.rb.tt +6 -0
- data/lib/spree/core/controller_helpers/auth.rb +1 -1
- data/lib/spree/core/controller_helpers/common.rb +4 -0
- data/lib/spree/core/controller_helpers/order.rb +6 -5
- data/lib/spree/core/engine.rb +10 -10
- data/lib/spree/core/environment_extension.rb +3 -0
- data/lib/spree/core/importer/order.rb +1 -1
- data/lib/spree/core/validators/email.rb +1 -0
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +1 -5
- data/lib/spree/permitted_attributes.rb +1 -1
- data/lib/spree/testing_support/capybara_ext.rb +16 -13
- data/lib/spree/testing_support/common_rake.rb +4 -1
- data/lib/spree/testing_support/factories/inventory_unit_factory.rb +7 -0
- data/lib/spree/testing_support/factories/taxon_factory.rb +1 -1
- data/spree_core.gemspec +1 -1
- data/vendor/assets/javascripts/jsuri.js +458 -2
- metadata +13 -7
- data/app/models/spree/tracker.rb +0 -25
- 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
|
+
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:
|
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.
|
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.
|
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
|
-
|
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.
|
data/app/models/spree/tracker.rb
DELETED
@@ -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
|