Skip to content
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: 3 additions & 1 deletion admin/lib/solidus_admin/testing_support/admin_assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
RSpec.configure do |config|
config.when_first_matching_example_defined(solidus_admin: true) do
config.before(:suite) do
system('bin/rails solidus_admin:tailwindcss:build') or abort 'Failed to build Tailwind CSS'
# rubocop:disable Rails/Exit
system("bin/rails solidus_admin:tailwindcss:build") or abort "Failed to build Tailwind CSS"
# rubocop:enable Rails/Exit
Rails.application.precompiled_assets
end
end
Expand Down
2 changes: 1 addition & 1 deletion core/app/models/spree/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def amount=(amount)
when String
separator = I18n.t('number.currency.format.separator')
number = amount.delete("^0-9-#{separator}\.").tr(separator, '.')
number.to_d if number.present?
number.presence&.to_d
end || amount
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
user_class.classify.constantize
rescue NameError
say_status :error, "Can't find an existing user class named #{user_class.classify}, plese set up one before using this authentication option.", :red
# rubocop:disable Rails/Exit
abort
# rubocop:enable Rails/Exit
end

generate "spree:custom_user #{user_class.shellescape}"
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def sale_promotions

def promotion_code(promotion)
order_promotion = order.order_promotions.detect { |op| op.promotion_id == promotion.id }
order_promotion.present? ? order_promotion.promotion_code : nil
order_promotion.presence&.promotion_code
end

def promotion_includes
Expand Down
Loading