gitlab-org--gitlab-foss/lib/gitlab/seeder.rb

25 lines
346 B
Ruby
Raw Normal View History

2012-11-13 15:11:56 -05:00
module Gitlab
class Seeder
def self.quiet
mute_mailer
2012-11-13 15:11:56 -05:00
SeedFu.quiet = true
yield
2012-11-13 15:11:56 -05:00
SeedFu.quiet = false
puts "\nOK".color(:green)
2012-11-13 15:11:56 -05:00
end
def self.by_user(user)
yield
end
def self.mute_mailer
code = <<-eos
2015-11-26 08:48:01 -05:00
def Notify.deliver_later
self
end
eos
eval(code)
end
2012-11-13 15:11:56 -05:00
end
end