2017-03-02 18:18:50 -05:00
|
|
|
module DeliverNever
|
|
|
|
def deliver_later
|
|
|
|
self
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-11-13 15:11:56 -05:00
|
|
|
module Gitlab
|
|
|
|
class Seeder
|
|
|
|
def self.quiet
|
2014-03-15 05:39:35 -04:00
|
|
|
mute_mailer
|
2012-11-13 15:11:56 -05:00
|
|
|
SeedFu.quiet = true
|
2017-03-02 18:18:50 -05:00
|
|
|
|
2014-11-10 09:17:04 -05:00
|
|
|
yield
|
2017-03-02 18:18:50 -05:00
|
|
|
|
2012-11-13 15:11:56 -05:00
|
|
|
SeedFu.quiet = false
|
2016-06-01 18:37:15 -04:00
|
|
|
puts "\nOK".color(:green)
|
2012-11-13 15:11:56 -05:00
|
|
|
end
|
2014-03-15 05:39:35 -04:00
|
|
|
|
|
|
|
def self.mute_mailer
|
2017-03-02 18:18:50 -05:00
|
|
|
ActionMailer::MessageDelivery.prepend(DeliverNever)
|
2014-03-15 05:39:35 -04:00
|
|
|
end
|
2012-11-13 15:11:56 -05:00
|
|
|
end
|
|
|
|
end
|