Sha256: 6eb9c9a1349c30bf80e89eb6348363098826c7abd535ee4f9ee312002913c34a

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true

require 'letter_opener/delivery_method'

module LetterOpenerWeb
  class DeliveryMethod < LetterOpener::DeliveryMethod
    def deliver!(mail)
      original = ENV['LAUNCHY_DRY_RUN']
      ENV['LAUNCHY_DRY_RUN'] = 'true'

      super
    rescue Launchy::CommandNotFoundError # rubocop:disable Lint/SuppressedException
      # Ignore for non-executable Launchy environment.
    ensure
      ENV['LAUNCHY_DRY_RUN'] = original
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
letter_opener_web-1.4.0 lib/letter_opener_web/delivery_method.rb