BigW Consortium Gitlab

seeder.rb 355 Bytes
Newer Older
1
# :nocov:
2 3 4 5 6 7
module DeliverNever
  def deliver_later
    self
  end
end

8 9 10
module Gitlab
  class Seeder
    def self.quiet
11
      mute_mailer
12
      SeedFu.quiet = true
13

14
      yield
15

16
      SeedFu.quiet = false
17
      puts "\nOK".color(:green)
18
    end
19 20

    def self.mute_mailer
21
      ActionMailer::MessageDelivery.prepend(DeliverNever)
22
    end
23 24
  end
end
25
# :nocov: