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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 492a555d7260fc775b233acca0a3fddfb2d20c88
4
- data.tar.gz: ccfc69cc32e5105e3de6cb75ae19538d3958b44e
3
+ metadata.gz: 1bddca3c690cbffa39ebba5555a9117fb2d967c2
4
+ data.tar.gz: 0cd7e5f1cb515f90dc9f7c30c2b54d4c6989d170
5
5
  SHA512:
6
- metadata.gz: 7bb6d3f377d2004b10b01dcba207c2b1ec285f5e04d1721edc4ad436d6e50d99337d8ba584f08d5a99daf60ef06af853435a760edf467360a5a93919ec1d35ec
7
- data.tar.gz: dea0ae70aa4e56ef9aeb525faa1350b711c1f90d87171ce1d530380469da3773b478285a50ab94b628cf6afb81e05237a8cc269cc09a1a3408275af59ff6db7c
6
+ metadata.gz: 1e4343e2e31bb23ca71fdc2d125859d84a421fedb14fd67f480e3ce2e933528f1dcb24b5bb7cc8cc29f77addeaf6fc647816277db6878606dce00b8c212d8a50
7
+ data.tar.gz: 35306479eefb76d7a0ca9c5dfc4ee6ccce8d7563c429edb84f1912e0e2627d5512b46f45cc981bcb0b5362b897257cbd8ce945fc3359ee0004f84abef1ecda95
@@ -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
- Thread.new { master.read }
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
- if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
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
 
@@ -1,3 +1,3 @@
1
1
  module Spring
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
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.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: 2016-10-01 00:00:00.000000000 Z
11
+ date: 2017-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport