Skip to content

Commit

Permalink
Merge pull request #4366 from nebulab/waiting-for-dev/ruby_31
Browse files Browse the repository at this point in the history
Support for Ruby 3.1
  • Loading branch information
waiting-for-dev authored May 5, 2022
2 parents 0e410a5 + 1e173d3 commit 093fad1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions api/spec/requests/spree/api/checkouts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ module Spree::Api
end

it "can update addresses and transition from address to delivery" do
pending "SQLite adapter fails to provide a unique index" if ActiveRecord::Base.connection.adapter_name == "SQLite"

put spree.api_checkout_path(order),
params: { order_token: order.guest_token, order: {
bill_address_attributes: address,
Expand All @@ -107,6 +109,8 @@ module Spree::Api

# Regression test for https://github.com/spree/spree/issues/4498
it "does not contain duplicate variant data in delivery return" do
pending "SQLite adapter fails to provide a unique index" if ActiveRecord::Base.connection.adapter_name == "SQLite"

put spree.api_checkout_path(order),
params: { order_token: order.guest_token, order: {
bill_address_attributes: address,
Expand Down
2 changes: 1 addition & 1 deletion core/app/models/spree/log_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class LogEntry < Spree::Base
belongs_to :source, polymorphic: true, optional: true

def parsed_details
@details ||= YAML.load(details)
@details ||= YAML.safe_load(details, permitted_classes: [ActiveMerchant::Billing::Response])
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# line_item_quantity = 3
# adjustment_amount = 10
# 100 - (10 / 3) = 96.66666666666666667
expect(subject).to eq BigDecimal('96.66666666666666667')
expect(subject.round(17)).to eq BigDecimal('96.66666666666666667')
end
end

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
context: .dockerdev
dockerfile: Dockerfile
args:
RUBY_VERSION: "2.7.4"
RUBY_VERSION: "3.1"
PG_VERSION: 13
NODE_VERSION: 14
MYSQL_VERSION: "8.0"
Expand Down

0 comments on commit 093fad1

Please sign in to comment.