debian-mirror-gitlab/lib/gitlab/seeder.rb
2017-08-17 22:00:37 +05:30

23 lines
335 B
Ruby

module DeliverNever
def deliver_later
self
end
end
module Gitlab
class Seeder
def self.quiet
mute_mailer
SeedFu.quiet = true
yield
SeedFu.quiet = false
puts "\nOK".color(:green)
end
def self.mute_mailer
ActionMailer::MessageDelivery.prepend(DeliverNever)
end
end
end