mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 07:19:40 +08:00
FEATURE: Use amazon s3 inventory to manage upload stats (#6867)
This commit is contained in:
@ -102,4 +102,14 @@ module Helpers
|
||||
tag_group.tags << (Tag.where(name: name).first || Fabricate(:tag, name: name))
|
||||
end
|
||||
end
|
||||
|
||||
def capture_stdout
|
||||
old_stdout = $stdout
|
||||
io = StringIO.new
|
||||
$stdout = io
|
||||
yield
|
||||
io.string
|
||||
ensure
|
||||
$stdout = old_stdout
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user