spring 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spring/application.rb +2 -2
- data/lib/spring/application_manager.rb +1 -1
- data/lib/spring/boot.rb +2 -0
- data/lib/spring/client/run.rb +1 -1
- data/lib/spring/failsafe_thread.rb +14 -0
- data/lib/spring/process_title_updater.rb +1 -1
- data/lib/spring/server.rb +1 -1
- data/lib/spring/test/acceptance_test.rb +5 -5
- data/lib/spring/test/application.rb +2 -1
- data/lib/spring/test/application_generator.rb +1 -0
- data/lib/spring/version.rb +1 -1
- data/lib/spring/watcher/polling.rb +0 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85d4ab3b84aa6f12fb90e262bcd8adf394cb94ef
|
4
|
+
data.tar.gz: 69c83b9fe81004f4c25b9a429bd1222316e1d25e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 491bc17d5c922c974ebe995469c5ebaa099c95351067eab312dad022426feecc006e6dd2211955e390eabb2371392a99e8cdfa39f07dc5b6938f5de73a30d1a7
|
7
|
+
data.tar.gz: 61f6d055f6b22aa94858dbd82227c0c4edbbdd6631a933a8bd5b2ebb0499c3d9c8cff27f1d41c6dca115a084cb0ddbffedef133345385069c87df69673e44ed5
|
data/lib/spring/application.rb
CHANGED
@@ -306,7 +306,7 @@ module Spring
|
|
306
306
|
@mutex.synchronize { @waiting << pid }
|
307
307
|
|
308
308
|
# Wait in a separate thread so we can run multiple commands at once
|
309
|
-
|
309
|
+
Spring.failsafe_thread {
|
310
310
|
begin
|
311
311
|
_, status = Process.wait2 pid
|
312
312
|
log "#{pid} exited with #{status.exitstatus}"
|
@@ -320,7 +320,7 @@ module Spring
|
|
320
320
|
end
|
321
321
|
}
|
322
322
|
|
323
|
-
|
323
|
+
Spring.failsafe_thread {
|
324
324
|
while signal = client.gets.chomp
|
325
325
|
begin
|
326
326
|
Process.kill(signal, -Process.getpgid(pid))
|
@@ -116,7 +116,7 @@ module Spring
|
|
116
116
|
def start_wait_thread(pid, child)
|
117
117
|
Process.detach(pid)
|
118
118
|
|
119
|
-
|
119
|
+
Spring.failsafe_thread {
|
120
120
|
# The recv can raise an ECONNRESET, killing the thread, but that's ok
|
121
121
|
# as if it does we're no longer interested in the child
|
122
122
|
loop do
|
data/lib/spring/boot.rb
CHANGED
data/lib/spring/client/run.rb
CHANGED
data/lib/spring/server.rb
CHANGED
@@ -465,11 +465,11 @@ module Spring
|
|
465
465
|
test "changing the Gemfile works when spring calls into itself" do
|
466
466
|
File.write(app.path("script.rb"), <<-RUBY.strip_heredoc)
|
467
467
|
gemfile = Rails.root.join("Gemfile")
|
468
|
-
File.write(gemfile, "\#{gemfile.read}gem '
|
468
|
+
File.write(gemfile, "\#{gemfile.read}gem 'text'\\n")
|
469
469
|
Bundler.with_clean_env do
|
470
470
|
system(#{app.env.inspect}, "bundle install")
|
471
471
|
end
|
472
|
-
output = `\#{Rails.root.join('bin/rails')} runner 'require "
|
472
|
+
output = `\#{Rails.root.join('bin/rails')} runner 'require "text"; puts "done";'`
|
473
473
|
exit output.include? "done\n"
|
474
474
|
RUBY
|
475
475
|
|
@@ -516,10 +516,10 @@ module Spring
|
|
516
516
|
test "booting a foreground server" do
|
517
517
|
FileUtils.cd(app.root) do
|
518
518
|
assert !spring_env.server_running?
|
519
|
-
|
519
|
+
assert_success "bin/spring server &"
|
520
520
|
|
521
|
-
Timeout.timeout(
|
522
|
-
sleep 0.1 until spring_env.server_running?
|
521
|
+
Timeout.timeout(10) do
|
522
|
+
sleep 0.1 until spring_env.server_running? && spring_env.socket_path.exist?
|
523
523
|
end
|
524
524
|
|
525
525
|
assert_success app.spring_test_command
|
@@ -10,6 +10,7 @@ module Spring
|
|
10
10
|
def initialize(root)
|
11
11
|
@root = Pathname.new(root)
|
12
12
|
@spring_env = Spring::Env.new(root: root)
|
13
|
+
@times = nil
|
13
14
|
end
|
14
15
|
|
15
16
|
def exists?
|
@@ -120,7 +121,7 @@ module Spring
|
|
120
121
|
@times << (Time.now - start_time) if @times
|
121
122
|
|
122
123
|
output.merge(status: status, command: command)
|
123
|
-
rescue Timeout::Error
|
124
|
+
rescue Timeout::Error
|
124
125
|
raise Timeout::Error, "While running command:\n\n#{dump_streams(command, read_streams)}"
|
125
126
|
end
|
126
127
|
|
data/lib/spring/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/spring/configuration.rb
|
87
87
|
- lib/spring/env.rb
|
88
88
|
- lib/spring/errors.rb
|
89
|
+
- lib/spring/failsafe_thread.rb
|
89
90
|
- lib/spring/json.rb
|
90
91
|
- lib/spring/process_title_updater.rb
|
91
92
|
- lib/spring/server.rb
|