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

Compatibility with Rails 5.2.1 & Ransack #2826

Merged
merged 3 commits into from
Aug 28, 2018
Merged
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
4 changes: 2 additions & 2 deletions core/solidus_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Gem::Specification.new do |s|
s.add_dependency 'discard', '~> 1.0'
s.add_dependency 'friendly_id', '~> 5.0'
s.add_dependency 'kaminari-activerecord', '~> 1.1'
s.add_dependency 'monetize', '~> 1.1'
s.add_dependency 'monetize', '~> 1.8.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion would be to add a comment as to why this is locked with a link to the issue that needs to be resolved until it can be relaxed again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, I've documented that in the commit message. I prefer not to add comments in the code and if we forgot and keep monetize locked to 1.8 is not that critical. If someone will need to update monetize to 1.9 a git blame will document the why of this. Does it make sense?

s.add_dependency 'paperclip', ['>= 4.2', '< 6']
s.add_dependency 'paranoia', '~> 2.4'
s.add_dependency 'ransack', '~> 1.8'
s.add_dependency 'ransack', '~> 2.0'
s.add_dependency 'state_machines-activerecord', '~> 0.4'
end
9 changes: 5 additions & 4 deletions core/spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,13 @@ def merge!(other_order, user = nil)

it "does nothing if any shipments are ready" do
shipment = create(:shipment, order: subject, state: "ready")
expect { subject.ensure_updated_shipments }.not_to change { subject.reload.shipments }
expect { subject.ensure_updated_shipments }.not_to change { subject.reload.shipments.pluck(:id) }
expect { shipment.reload }.not_to raise_error
end

it "does nothing if any shipments are shipped" do
shipment = create(:shipment, order: subject, state: "shipped")
expect { subject.ensure_updated_shipments }.not_to change { subject.reload.shipments }
expect { subject.ensure_updated_shipments }.not_to change { subject.reload.shipments.pluck(:id) }
expect { shipment.reload }.not_to raise_error
end
end
Expand Down Expand Up @@ -1102,11 +1102,12 @@ def generate

it "raises an error if any shipments are ready" do
shipment = create(:shipment, order: subject, state: "ready")

expect {
expect {
subject.create_proposed_shipments
}.to raise_error(Spree::Order::CannotRebuildShipments)
}.not_to change { subject.reload.shipments }
}.not_to change { subject.reload.shipments.pluck(:id) }

expect { shipment.reload }.not_to raise_error
end
Expand All @@ -1117,7 +1118,7 @@ def generate
expect {
subject.create_proposed_shipments
}.to raise_error(Spree::Order::CannotRebuildShipments)
}.not_to change { subject.reload.shipments }
}.not_to change { subject.reload.shipments.pluck(:id) }

expect { shipment.reload }.not_to raise_error
end
Expand Down