spring.rb 681 B

12345678910111213141516171819202122232425262728293031323334353637
  1. module Spring
  2. module Commands
  3. class SchedulerRb
  4. def call
  5. load ::Rails.root.join('script/scheduler.rb')
  6. end
  7. end
  8. Spring.register_command 'scheduler.rb', Spring::Commands::SchedulerRb.new
  9. end
  10. end
  11. module Spring
  12. module Commands
  13. class WebsocketServerRb
  14. def call
  15. load ::Rails.root.join('script/websocket-server.rb')
  16. end
  17. end
  18. Spring.register_command 'websocket-server.rb', Spring::Commands::WebsocketServerRb.new
  19. end
  20. end
  21. module Spring
  22. module Commands
  23. class RailsServer < Rails
  24. def command_name
  25. 'server'
  26. end
  27. end
  28. Spring.register_command 'rails_server', RailsServer.new
  29. end
  30. end