146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# File 'lib/generators/spree/install/install_generator.rb', line 146
def populate_seed_data
if @load_seed_data
say_status :loading, "seed data"
rake_options=[]
rake_options << "AUTO_ACCEPT=1" if options[:auto_accept]
rake_options << "ADMIN_EMAIL=#{options[:admin_email]}" if options[:admin_email]
rake_options << "ADMIN_PASSWORD=#{options[:admin_password]}" if options[:admin_password]
cmd = lambda { rake("db:seed #{rake_options.join(' ')}") }
if options[:auto_accept] || (options[:admin_email] && options[:admin_password])
quietly &cmd
else
cmd.call
end
else
say_status :skipping, "seed data (you can always run rake db:seed)"
end
end
|