BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4f44717d
Commit
4f44717d
authored
Mar 03, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-dev-seed-time' into 'master'
Fix the `Gitlab::Seeder` monkey patch to disable mail delivery Closes #27609 See merge request !9678
parents
320ef318
a0ab45d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
13_comments.rb
db/fixtures/development/13_comments.rb
+2
-2
seeder.rb
lib/gitlab/seeder.rb
+9
-10
No files found.
db/fixtures/development/13_comments.rb
View file @
4f44717d
require
'./spec/support/sidekiq'
Gitlab
::
Seeder
.
quiet
do
Issue
.
all
.
each
do
|
issue
|
Issue
.
find_
each
do
|
issue
|
project
=
issue
.
project
project
.
team
.
users
.
each
do
|
user
|
...
...
@@ -16,7 +16,7 @@ Gitlab::Seeder.quiet do
end
end
MergeRequest
.
all
.
each
do
|
mr
|
MergeRequest
.
find_
each
do
|
mr
|
project
=
mr
.
project
project
.
team
.
users
.
each
do
|
user
|
...
...
lib/gitlab/seeder.rb
View file @
4f44717d
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
"
\n
OK"
.
color
(
:green
)
end
def
self
.
by_user
(
user
)
yield
end
def
self
.
mute_mailer
code
=
<<-
eos
def Notify.deliver_later
self
end
eos
eval
(
code
)
# rubocop:disable Security/Eval
ActionMailer
::
MessageDelivery
.
prepend
(
DeliverNever
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment