Merge pull request #12766 from mkllnk/magick-dep

Remove direct dependency on MiniMagick
This commit is contained in:
Konrad
2024-08-18 18:39:48 +02:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@@ -1,7 +1,5 @@
# frozen_string_literal: false
require "mini_magick"
class Enterprise < ApplicationRecord
SELLS = %w(unspecified none own any).freeze
ENTERPRISE_SEARCH_RADIUS = 100
@@ -479,7 +477,7 @@ class Enterprise < ApplicationRecord
return unless image.variable?
image_variant_url_for(image.variant(name))
rescue ActiveStorage::Error, MiniMagick::Error, ActionView::Template::Error => e
rescue StandardError => e
Bugsnag.notify "Enterprise ##{id} #{image.try(:name)} error: #{e.message}"
Rails.logger.error(e.message)

View File

@@ -1,7 +1,5 @@
# frozen_string_literal: true
require "mini_magick"
module Spree
class Image < Asset
has_one_attached :attachment, service: image_service do |attachment|
@@ -35,7 +33,7 @@ module Spree
return self.class.default_image_url(size) unless attachment.attached?
image_variant_url_for(variant(size))
rescue ActiveStorage::Error, MiniMagick::Error, ActionView::Template::Error => e
rescue StandardError => e
Bugsnag.notify "Product ##{viewable_id} Image ##{id} error: #{e.message}"
Rails.logger.error(e.message)