Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring command not going trough its socket? #157

Open
emilebosch opened this issue Jul 9, 2019 · 1 comment
Open

Spring command not going trough its socket? #157

emilebosch opened this issue Jul 9, 2019 · 1 comment

Comments

@emilebosch
Copy link

Maybe I am understanding it wrong. But isn't the spring command supposed to go trough the spring socket. Now it needs to escape to a shell, boot ruby, to finally pass trough the spring socket. Seems a bit unnecessary in terms of milliseconds or am I wrong?

Thanks a lot

The runner code:

https://github.com/guard/guard-minitest/blob/master/lib/guard/minitest/runner.rb

And how the spring client talks to spring

https://github.com/rails/spring/blob/master/lib/spring/client/run.rb#L26
@emilebosch
Copy link
Author

emilebosch commented Jul 9, 2019

Aaaaaand here is the guard free patch 😗

task :yolo => :environment do
  Thread::abort_on_exception = true
  listener = Listen.to("test/") do |modified, added, removed|
    begin
      Spring::Client::run(["rails","test"])
    rescue SystemExit
      puts "Lol rly?"
    end
  end
  listener.start
  puts "Watching for test changes"
  sleep
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant