solidus_core 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 230b3381580409e57183114635859cadf3a87f95
4
- data.tar.gz: 5d5c36600b0a347d48704541db654fa13df20fff
3
+ metadata.gz: 09e11d086ed1dd97b17e5c5cf72d546d5a80fc0d
4
+ data.tar.gz: 1b3f4c7bc481f39eeb4555e1f07b3017dfb33e45
5
5
  SHA512:
6
- metadata.gz: 271be6c98555a1782033872a437bf979919ff06a2d94cf6f5a0b31f2ca98f0ca41d770342a28140a9724dd8bde8a2ef1d6a1845759e161b3922082964d50d289
7
- data.tar.gz: b61583b962acfc39e26ceb869a4179921e5979bfbfb48f43f17056a9814ed381e6e0e392874b2507ceaa2a5ac549e8a910c58f527f47f5510bb33bd7366c3a4f
6
+ metadata.gz: ecc25b96d2b0ab0d4c44ff369544c13bd59c3ab71f62007b3be308b826615cc031ab766d650171e78a105007ecad763df4ab7daacbf7b702930fb20a90f34a7c
7
+ data.tar.gz: 8786ed0bc75a690a6f57741f05039c4063f8e7ec9d61e79d8cfd3355dbd0206b20e43f7204153a2589d0cdab36da0a38c50fa5a7888e0ef14cb9c557cc4a7aef
@@ -1,5 +1,6 @@
1
1
  module Spree
2
2
  class ProductProperty < Spree::Base
3
+ acts_as_list
3
4
  belongs_to :product, touch: true, class_name: 'Spree::Product', inverse_of: :product_properties
4
5
  belongs_to :property, class_name: 'Spree::Property', inverse_of: :product_properties
5
6
 
@@ -4,10 +4,9 @@ module Spree
4
4
  class User < PromotionRule
5
5
  belongs_to :user, class_name: Spree::UserClassHandle.new
6
6
 
7
- has_and_belongs_to_many :users, class_name: Spree::UserClassHandle.new,
8
- join_table: 'spree_promotion_rules_users',
9
- foreign_key: 'promotion_rule_id',
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)
@@ -0,0 +1,8 @@
1
+ module Spree
2
+ class PromotionRuleUser < Spree::Base
3
+ self.table_name = 'spree_promotion_rules_users'
4
+
5
+ belongs_to :promotion_rule, class_name: 'Spree::PromotionRule'
6
+ belongs_to :user, class_name: Spree::UserClassHandle.new
7
+ end
8
+ end
@@ -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
- unless Spree.user_class.included_modules.include?(Spree::UserMethods)
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.rc1
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-31 00:00:00.000000000 Z
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