mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
59097b207f
Over the years we accrued many spelling mistakes in the code base. This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change - comments - test descriptions - other low risk areas
25 lines
900 B
Ruby
25 lines
900 B
Ruby
# frozen_string_literal: true
|
|
|
|
# I like guard, don't get me wrong, but it is just not working right
|
|
# architecturally it can not do what I want it to do, this is how I want
|
|
# it to behave
|
|
|
|
desc "Run all specs automatically as needed"
|
|
task "autospec" => :environment do
|
|
require 'autospec/manager'
|
|
|
|
debug = ARGV.any? { |a| a == "d" || a == "debug" } || ENV["DEBUG"]
|
|
force_polling = ARGV.any? { |a| a == "p" || a == "polling" }
|
|
latency = ((ARGV.find { |a| a =~ /l=|latency=/ } || "").split("=")[1] || 3).to_i
|
|
|
|
if force_polling
|
|
puts "Polling has been forced (slower) - checking every #{latency} #{"second".pluralize(latency)}"
|
|
else
|
|
puts "If file watching is not working, you can force polling with: bundle exec rake autospec p l=3"
|
|
end
|
|
|
|
puts "@@@@@@@@@@@@ Running in debug mode" if debug
|
|
|
|
Autospec::Manager.run(force_polling: force_polling, latency: latency, debug: debug)
|
|
end
|