spring 2.0.0 → 2.0.1
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 -1
- data/lib/spring/client/binstub.rb +2 -1
- data/lib/spring/test/acceptance_test.rb +8 -0
- data/lib/spring/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bddca3c690cbffa39ebba5555a9117fb2d967c2
|
4
|
+
data.tar.gz: 0cd7e5f1cb515f90dc9f7c30c2b54d4c6989d170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e4343e2e31bb23ca71fdc2d125859d84a421fedb14fd67f480e3ce2e933528f1dcb24b5bb7cc8cc29f77addeaf6fc647816277db6878606dce00b8c212d8a50
|
7
|
+
data.tar.gz: 35306479eefb76d7a0ca9c5dfc4ee6ccce8d7563c429edb84f1912e0e2627d5512b46f45cc981bcb0b5362b897257cbd8ce945fc3359ee0004f84abef1ecda95
|
data/lib/spring/application.rb
CHANGED
@@ -295,10 +295,11 @@ module Spring
|
|
295
295
|
def with_pty
|
296
296
|
PTY.open do |master, slave|
|
297
297
|
[STDOUT, STDERR, STDIN].each { |s| s.reopen slave }
|
298
|
-
|
298
|
+
reader_thread = Spring.failsafe_thread { master.read }
|
299
299
|
begin
|
300
300
|
yield
|
301
301
|
ensure
|
302
|
+
reader_thread.kill
|
302
303
|
reset_streams
|
303
304
|
end
|
304
305
|
end
|
@@ -34,7 +34,8 @@ unless defined?(Spring)
|
|
34
34
|
require 'bundler'
|
35
35
|
|
36
36
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
37
|
-
|
37
|
+
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
38
|
+
if spring
|
38
39
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
39
40
|
gem 'spring', spring.version
|
40
41
|
require 'spring/binstub'
|
@@ -172,6 +172,14 @@ module Spring
|
|
172
172
|
assert_success app.spring_test_command
|
173
173
|
end
|
174
174
|
|
175
|
+
test "app gets reloaded even with abort_on_exception=true" do
|
176
|
+
assert_success app.spring_test_command
|
177
|
+
File.write(app.path("config/initializers/thread_config.rb"), "Thread.abort_on_exception = true")
|
178
|
+
|
179
|
+
app.await_reload
|
180
|
+
assert_success app.spring_test_command
|
181
|
+
end
|
182
|
+
|
175
183
|
test "app recovers when a boot-level error is introduced" do
|
176
184
|
config = app.application_config.read
|
177
185
|
|
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: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|