9fea43e46a
`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 |
||
---|---|---|
.. | ||
benchmarks | ||
bulk_import | ||
demon_test | ||
import_scripts | ||
.gitignore | ||
alice.txt | ||
analyze_sidekiq_queues.rb | ||
bench.rb | ||
biggest_objects.rb | ||
boot_mem.rb | ||
cache_critical_dns | ||
check_forking.rb | ||
compile_hbs.rb | ||
diff_heaps.rb | ||
discourse | ||
docker_test.rb | ||
downsize_uploads.rb | ||
measure.rb | ||
memory-analysis | ||
memstats.rb | ||
micro_bench.rb | ||
mwrap_sidekiq | ||
plugin-translations.rb | ||
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 | ||
test_pretty_text.rb | ||
thread_detective.rb | ||
user_simulator.rb | ||
version_bump.rb |