Sha256: 2e2a4247cb184a749d87dd78ebae1018899c5f9d40cdd69d023d64257bf23a13

Contents?: true

Size: 871 Bytes

Versions: 6

Compression:

Stored size: 871 Bytes

Contents

require 'rubygems' unless defined?(Rubygems)
require 'capistrano' unless defined?(Capistrano)

unless Capistrano::Configuration.respond_to?(:instance)
  abort "capistrano/railsless_mailer requires Capistrano 2"
end

require 'action_mailer' unless defined?(ActionMailer)

require 'cap_railsless_mailer' unless defined?(CapRailslessMailer)


module Capistrano
  class Configuration
    module RailslessCapistranoMailer
      def send_notification_email(cap, config = {}, *args)
        if CapRailslessMailer.respond_to? :notification_email
          CapRailslessMailer.notification_email(cap, config, args).deliver
        else
          CapRailslessMailer.deliver_notification_email(cap, config, args)
        end
      end
    end

    include RailslessCapistranoMailer
  end
end

Capistrano.plugin :railsless_mailer, Capistrano::Configuration::RailslessCapistranoMailer

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
capistrano_mailer_railsless-3.2.11 lib/capistrano/railsless_mailer.rb
capistrano_mailer_railsless-3.2.10 lib/capistrano/railsless_mailer.rb
capistrano_mailer_railsless-3.2.9 lib/capistrano/railsless_mailer.rb
capistrano_mailer_railsless-3.2.8 lib/capistrano/railsless_mailer.rb
capistrano_mailer_railsless-3.2.7 lib/capistrano/railsless_mailer.rb
capistrano_mailer_railsless-3.2.6 lib/capistrano/railsless_mailer.rb