spring.rb 857 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. Spring.watch(
  3. '.ruby-version',
  4. '.rbenv-vars',
  5. 'tmp/restart.txt',
  6. 'tmp/caching-dev.txt',
  7. )
  8. module Spring
  9. module Commands
  10. class SchedulerRb
  11. def call
  12. load ::Rails.root.join('script/scheduler.rb')
  13. end
  14. end
  15. Spring.register_command 'scheduler.rb', Spring::Commands::SchedulerRb.new
  16. end
  17. end
  18. module Spring
  19. module Commands
  20. class WebsocketServerRb
  21. def call
  22. load ::Rails.root.join('script/websocket-server.rb')
  23. end
  24. end
  25. Spring.register_command 'websocket-server.rb', Spring::Commands::WebsocketServerRb.new
  26. end
  27. end
  28. module Spring
  29. module Commands
  30. class RailsServer < Rails
  31. def command_name
  32. 'server'
  33. end
  34. end
  35. Spring.register_command 'rails_server', RailsServer.new
  36. end
  37. end