discourse/script
David Taylor 9fea43e46a
DEV: Remove use of `cd` in the app (#8337)
`FileUtils.cd` and `Dir.chdir` cause the working directory to change for the entire process. We run sidekiq jobs, hijacked requests and deferred jobs in threads, which can make working directory changes have unintended side-effects.

- Add a rubocop rule to warn about usage of Dir.chdir and FileUtils.cd
- Added rubocop:disable for scripts used outside the app
- Refactored code using cd to use alternative methods
- Temporarily skipped the rubocop check for lib/backup_restore. This will require more complex refactoring, so I will create a separate PR for review
2019-11-13 09:57:39 +00:00
..
benchmarks
bulk_import
demon_test FIX: Revert Demon::DemonBase back to Demon::Base (#8132) 2019-10-02 14:54:08 +10:00
import_scripts import_scripts: add fluxbb prefix to missing query (#8163) 2019-10-08 11:46:00 +11:00
.gitignore
alice.txt
analyze_sidekiq_queues.rb
bench.rb DEV: correct rake task used to grab admin key 2019-11-11 10:23:14 +11:00
biggest_objects.rb DEV: add debugging scripts for memory leaks 2019-10-03 16:36:31 +10:00
boot_mem.rb
cache_critical_dns
check_forking.rb
compile_hbs.rb
diff_heaps.rb
discourse FIX: Correct path to ImportExport module (#8227) 2019-10-23 17:27:14 +11:00
docker_test.rb DEV: Move warmup inside docker rake task 2019-10-25 16:31:05 -03:00
downsize_uploads.rb FIX: downsize_uploads script 2019-10-10 16:37:55 +02:00
measure.rb
memory-analysis
memstats.rb
micro_bench.rb DEV: undo pluck_first changes to micro benchmark 2019-10-21 12:21:24 +01:00
mwrap_sidekiq DEV: add missing ultra low queue to mwrap sidekiq 2019-09-18 11:18:35 +10:00
plugin-translations.rb DEV: Remove use of `cd` in the app (#8337) 2019-11-13 09:57:39 +00:00
profile_db_generator.rb
pull_translations.rb
push_translations.rb
rails
redis_memory.rb
require_profiler.rb
switch_container_ruby
test_email_settings.rb
test_hbs_compiler.rb
test_mem.rb
test_memory_leak.rb DEV: improve diagnostics on mem leak checker 2019-10-04 09:47:33 +10:00
test_pretty_text.rb
thread_detective.rb
user_simulator.rb
version_bump.rb