Skip to content

Commit 4dd5e03

Browse files
committed
print spring client pid on command run
1 parent 2fe7c18 commit 4dd5e03

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

lib/spring/client/run.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require "spring/commands"
12
require "rbconfig"
23
require "socket"
34
require "bundler"
@@ -138,6 +139,8 @@ def run_command(client, application)
138139
if pid && !pid.empty?
139140
log "got pid: #{pid}"
140141

142+
puts "Running via Spring preloader in process #{pid}" unless Spring.quiet
143+
141144
forward_signals(pid.to_i)
142145
status = application.read.to_i
143146

lib/spring/configuration.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Spring
44
class << self
5-
attr_accessor :application_root
5+
attr_accessor :application_root, :quiet
66

77
def gemfile
88
ENV['BUNDLE_GEMFILE'] || "Gemfile"
@@ -49,4 +49,6 @@ def find_project_root(current_dir)
4949
end
5050
end
5151
end
52+
53+
self.quiet = false
5254
end

lib/spring/test/acceptance_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def exec_name
447447
system(#{app.env.inspect}, "bundle install")
448448
end
449449
output = `\#{Rails.root.join('bin/rails')} runner 'require "devise"; puts "done";'`
450-
exit output == "done\n"
450+
exit output.include? "done\n"
451451
RUBY
452452

453453
assert_success [%(bin/rails runner 'load Rails.root.join("script.rb")'), timeout: 60]

0 commit comments

Comments
 (0)