solidus_core 1.0.0.rc1 → 1.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/spree/product_property.rb +1 -0
- data/app/models/spree/promotion/rules/user.rb +3 -4
- data/app/models/spree/promotion_rule_user.rb +8 -0
- data/config/initializers/spree_user.rb +1 -1
- data/db/migrate/20150806190833_add_id_and_timestamp_to_promotion_rule_user.rb +13 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 09e11d086ed1dd97b17e5c5cf72d546d5a80fc0d
|
|
4
|
+
data.tar.gz: 1b3f4c7bc481f39eeb4555e1f07b3017dfb33e45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ecc25b96d2b0ab0d4c44ff369544c13bd59c3ab71f62007b3be308b826615cc031ab766d650171e78a105007ecad763df4ab7daacbf7b702930fb20a90f34a7c
|
|
7
|
+
data.tar.gz: 8786ed0bc75a690a6f57741f05039c4063f8e7ec9d61e79d8cfd3355dbd0206b20e43f7204153a2589d0cdab36da0a38c50fa5a7888e0ef14cb9c557cc4a7aef
|
|
@@ -4,10 +4,9 @@ module Spree
|
|
|
4
4
|
class User < PromotionRule
|
|
5
5
|
belongs_to :user, class_name: Spree::UserClassHandle.new
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
association_foreign_key: :user_id
|
|
7
|
+
has_many :promotion_rule_users, class_name: 'Spree::PromotionRuleUser',
|
|
8
|
+
foreign_key: :promotion_rule_id
|
|
9
|
+
has_many :users, through: :promotion_rule_users, class_name: Spree::UserClassHandle.new
|
|
11
10
|
|
|
12
11
|
def applicable?(promotable)
|
|
13
12
|
promotable.is_a?(Spree::Order)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# are still doing for compatability, but with a warning.
|
|
4
4
|
|
|
5
5
|
Spree::Core::Engine.config.to_prepare do
|
|
6
|
-
|
|
6
|
+
if Spree.user_class && !Spree.user_class.included_modules.include?(Spree::UserMethods)
|
|
7
7
|
ActiveSupport::Deprecation.warn "#{Spree.user_class} must include Spree::UserMethods"
|
|
8
8
|
Spree.user_class.include Spree::UserMethods
|
|
9
9
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class AddIdAndTimestampToPromotionRuleUser < ActiveRecord::Migration
|
|
2
|
+
def up
|
|
3
|
+
add_column :spree_promotion_rules_users, :id, :primary_key
|
|
4
|
+
add_column :spree_promotion_rules_users, :created_at, :datetime
|
|
5
|
+
add_column :spree_promotion_rules_users, :updated_at, :datetime
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def down
|
|
9
|
+
remove_column :spree_promotion_rules_users, :updated_at
|
|
10
|
+
remove_column :spree_promotion_rules_users, :created_at
|
|
11
|
+
remove_column :spree_promotion_rules_users, :id
|
|
12
|
+
end
|
|
13
|
+
end
|
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: 1.0.0.
|
|
4
|
+
version: 1.0.0.rc2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Solidus Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07
|
|
11
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemerchant
|
|
@@ -505,6 +505,7 @@ files:
|
|
|
505
505
|
- app/models/spree/promotion_handler/free_shipping.rb
|
|
506
506
|
- app/models/spree/promotion_handler/page.rb
|
|
507
507
|
- app/models/spree/promotion_rule.rb
|
|
508
|
+
- app/models/spree/promotion_rule_user.rb
|
|
508
509
|
- app/models/spree/property.rb
|
|
509
510
|
- app/models/spree/prototype.rb
|
|
510
511
|
- app/models/spree/refund.rb
|
|
@@ -864,6 +865,7 @@ files:
|
|
|
864
865
|
- db/migrate/20150630175644_copy_order_bill_address_to_credit_card.rb
|
|
865
866
|
- db/migrate/20150723224133_remove_unnecessary_indexes.rb
|
|
866
867
|
- db/migrate/20150724163716_remove_state_lock_version_from_order.rb
|
|
868
|
+
- db/migrate/20150806190833_add_id_and_timestamp_to_promotion_rule_user.rb
|
|
867
869
|
- db/seeds.rb
|
|
868
870
|
- lib/generators/spree/custom_user/custom_user_generator.rb
|
|
869
871
|
- lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
|