2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FEATURE: add rss to bench

BUGFIX: profile db generator require ordering
This commit is contained in:
Sam 2014-01-03 11:51:12 +11:00
parent 9f2150faea
commit 90a7cb9dc3
2 changed files with 19 additions and 16 deletions

View file

@ -28,21 +28,6 @@ def unbundled_require(gem)
end
end
# by default, Discourse has a "system" account
if User.count > 1
puts "Only run this script against an empty DB"
exit
end
require 'optparse'
begin
unbundled_require 'gabbler'
rescue LoadError
puts "installing gabbler gem"
puts `gem install gabbler`
unbundled_require 'gabbler'
end
def sentence
@gabbler ||= Gabbler.new.tap do |gabbler|
story = File.read(File.dirname(__FILE__) + "/alice.txt")
@ -76,6 +61,21 @@ unless Rails.env == "profile"
exit
end
# by default, Discourse has a "system" account
if User.count > 1
puts "Only run this script against an empty DB"
exit
end
require 'optparse'
begin
unbundled_require 'gabbler'
rescue LoadError
puts "installing gabbler gem"
puts `gem install gabbler`
unbundled_require 'gabbler'
end
puts "Creating 100 users"
users = 100.times.map do |i|
putc "."