Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with Spree 3.4 #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSubscribableToSpreeProducts < ActiveRecord::Migration
class AddSubscribableToSpreeProducts < ActiveRecord::Migration[4.2]
def change
add_column :spree_products, :subscribable, :boolean
add_index :spree_products, :subscribable
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160229104012_create_spree_subscriptions.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSpreeSubscriptions < ActiveRecord::Migration
class CreateSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
create_table :spree_subscriptions do |t|
t.references :variant, index: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSpreeOrderSubscriptions < ActiveRecord::Migration
class CreateSpreeOrderSubscriptions < ActiveRecord::Migration[4.2]
def change
create_table :spree_order_subscriptions do |t|
t.references :subscription, index: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveFrequencyFromSpreeSubscriptions < ActiveRecord::Migration
class RemoveFrequencyFromSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
remove_column :spree_subscriptions, :frequency, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSpreeSubscriptionFrequencies < ActiveRecord::Migration
class CreateSpreeSubscriptionFrequencies < ActiveRecord::Migration[4.2]
def change
create_table :spree_subscription_frequencies do |t|
t.string :title
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSpreeProductSubscriptionFrequencies < ActiveRecord::Migration
class CreateSpreeProductSubscriptionFrequencies < ActiveRecord::Migration[4.2]
def change
create_table :spree_product_subscription_frequencies do |t|
t.references :product, index: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDefaultToSubscribableInProducts < ActiveRecord::Migration
class AddDefaultToSubscribableInProducts < ActiveRecord::Migration[4.2]
def up
change_column_default :spree_products, :subscribable, false
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddEnabledToSpreeSubscriptions < ActiveRecord::Migration
class AddEnabledToSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :spree_subscriptions, :enabled, :boolean, default: false
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSubscriptionFrequencyReferenceToSpreSubscriptions < ActiveRecord::Migration
class AddSubscriptionFrequencyReferenceToSpreSubscriptions < ActiveRecord::Migration[4.2]
def change
add_reference :spree_subscriptions, :subscription_frequency, index: true
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPaymentReferenceToSpreeSubscriptions < ActiveRecord::Migration
class AddPaymentReferenceToSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
add_reference :spree_subscriptions, :source, index: true
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ChangeNamesOfTablesAndColumns < ActiveRecord::Migration
class ChangeNamesOfTablesAndColumns < ActiveRecord::Migration[4.2]
def up
change_column_default :spree_subscriptions, :quantity, 0
change_column_null :spree_subscriptions, :quantity, false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddColumnsToSpreeSubscriptions < ActiveRecord::Migration
class AddColumnsToSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :spree_subscriptions, :number, :string
add_column :spree_subscriptions, :cancellation_reasons, :text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddMonthsCountColumnToSpreeSubscriptionFrequencies < ActiveRecord::Migration
class AddMonthsCountColumnToSpreeSubscriptionFrequencies < ActiveRecord::Migration[4.2]
def change
add_column :spree_subscription_frequencies, :months_count, :integer
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPolymorphicSourceReferenceToSubscription < ActiveRecord::Migration
class AddPolymorphicSourceReferenceToSubscription < ActiveRecord::Migration[4.2]
def change
remove_reference :spree_subscriptions, :source
add_reference :spree_subscriptions, :source, polymorphic: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveEndDateFromSubscriptions < ActiveRecord::Migration
class RemoveEndDateFromSubscriptions < ActiveRecord::Migration[4.2]
def change
remove_column :spree_subscriptions, :end_date, :datetime
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDeliveryNumberToSpreeSubscriptions < ActiveRecord::Migration
class AddDeliveryNumberToSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :spree_subscriptions, :delivery_number, :integer
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPauseAndDayColumnToSpreeSubscriptions < ActiveRecord::Migration
class AddPauseAndDayColumnToSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :spree_subscriptions, :pause, :boolean, default: false
add_column :spree_subscriptions, :delivery_day, :integer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddNextOccurrenceAtColumnToSpreeSubscriptions < ActiveRecord::Migration
class AddNextOccurrenceAtColumnToSpreeSubscriptions < ActiveRecord::Migration[4.2]
def change
remove_column :spree_subscriptions, :last_occurrence_at, :datetime
remove_column :spree_subscriptions, :delivery_day, :integer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenamePauseInSpreeSubscriptions < ActiveRecord::Migration
class RenamePauseInSpreeSubscriptions < ActiveRecord::Migration[4.2]
def up
rename_column :spree_subscriptions, :pause, :paused
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ChangePauseNullInSpreeSubscriptions < ActiveRecord::Migration
class ChangePauseNullInSpreeSubscriptions < ActiveRecord::Migration[4.2]
def up
change_column_null :spree_subscriptions, :paused, false
add_index :spree_subscriptions, :paused
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPriorNotificationTimeToSubscription < ActiveRecord::Migration
class AddPriorNotificationTimeToSubscription < ActiveRecord::Migration[4.2]
def change
add_column :spree_subscriptions, :prior_notification_days_gap, :integer, default: 7, null: false
end
Expand Down
2 changes: 1 addition & 1 deletion spree_product_subscriptions.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

s.add_dependency 'spree_core', '~> 3.2.0.rc2'
s.add_dependency 'spree_core', '> 3.2.0.rc2'

s.add_development_dependency 'capybara', '~> 2.4'
s.add_development_dependency 'coffee-rails', '~> 4.2'
Expand Down