Class: Gitlab::Seeder

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/seeder.rb

Class Method Summary collapse

Class Method Details

.by_user(user) ⇒ Object


11
12
13
# File 'lib/gitlab/seeder.rb', line 11

def self.by_user(user)
  yield
end

.mute_mailerObject


15
16
17
18
19
20
21
22
# File 'lib/gitlab/seeder.rb', line 15

def self.mute_mailer
  code = <<-eos
def Notify.deliver_later
  self
end
  eos
  eval(code)
end

.quietObject


3
4
5
6
7
8
9
# File 'lib/gitlab/seeder.rb', line 3

def self.quiet
  mute_mailer
  SeedFu.quiet = true
  yield
  SeedFu.quiet = false
  puts "\nOK".green
end