mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
don't keep installing gabbler from bench
fix ab detection
This commit is contained in:
parent
cab6a3f339
commit
6a0072d36e
2 changed files with 10 additions and 10 deletions
|
@ -28,6 +28,12 @@ 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'
|
||||
|
@ -37,8 +43,6 @@ rescue LoadError
|
|||
unbundled_require 'gabbler'
|
||||
end
|
||||
|
||||
user_id = nil
|
||||
|
||||
def sentence
|
||||
@gabbler ||= Gabbler.new.tap do |gabbler|
|
||||
story = File.read(File.dirname(__FILE__) + "/alice.txt")
|
||||
|
@ -72,12 +76,6 @@ 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
|
||||
|
||||
puts "Creating 100 users"
|
||||
users = 100.times.map do |i|
|
||||
putc "."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue