Sha256: 4d5ebad3326052733a18242e77027fbcb2c7f2536b4cee4504d2c04335f29469

Contents?: true

Size: 428 Bytes

Versions: 4

Compression:

Stored size: 428 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
      # Ignore for non-executable Launchy environment.
    ensure
      ENV['LAUNCHY_DRY_RUN'] = original
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
letter_opener_web-2.0.0 lib/letter_opener_web/delivery_method.rb
letter_opener_web-2.0.0.pre.beta lib/letter_opener_web/delivery_method.rb
letter_opener_web-2.0.0.pre.alpha1 lib/letter_opener_web/delivery_method.rb
letter_opener_web-1.4.1 lib/letter_opener_web/delivery_method.rb