spring.rb 793 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. %w[
  2. .ruby-version
  3. .rbenv-vars
  4. tmp/restart.txt
  5. tmp/caching-dev.txt
  6. ].each { |path| Spring.watch(path) }
  7. module Spring
  8. module Commands
  9. class SchedulerRb
  10. def call
  11. load ::Rails.root.join('script/scheduler.rb')
  12. end
  13. end
  14. Spring.register_command 'scheduler.rb', Spring::Commands::SchedulerRb.new
  15. end
  16. end
  17. module Spring
  18. module Commands
  19. class WebsocketServerRb
  20. def call
  21. load ::Rails.root.join('script/websocket-server.rb')
  22. end
  23. end
  24. Spring.register_command 'websocket-server.rb', Spring::Commands::WebsocketServerRb.new
  25. end
  26. end
  27. module Spring
  28. module Commands
  29. class RailsServer < Rails
  30. def command_name
  31. 'server'
  32. end
  33. end
  34. Spring.register_command 'rails_server', RailsServer.new
  35. end
  36. end