discourse/bin/rake
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00

14 lines
388 B
Ruby
Executable File

#!/usr/bin/env ruby
# frozen_string_literal: true
if ENV['RAILS_ENV'] == 'test' && ENV['LOAD_PLUGINS'].nil?
if ARGV.include?('db:migrate')
STDERR.puts "You are attempting to run migrations in your test environment and are not loading plugins, setting LOAD_PLUGINS to 1"
ENV['LOAD_PLUGINS'] = '1'
end
end
require_relative '../config/boot'
require 'rake'
Rake.application.run