spring 4.3.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/spring/application.rb +13 -5
- data/lib/spring/application_manager.rb +1 -1
- data/lib/spring/client/run.rb +8 -3
- data/lib/spring/json.rb +1 -0
- data/lib/spring/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c0e16193bfb18c7246f5d4fd0789f03134c2b013ae204578f2771b460fb2e86
|
|
4
|
+
data.tar.gz: 84221a6cc9097b6c7762bbbab9ab1ed89e57c2783346807dc6c8fcc22d405bf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8fbb8005a56cc2d9a24f33a0f2e5d7a3f318a5d99819402aa239f8dd13ef08f85d4409d5c2969a216bf91a46f8585b884122454c05f0dcc22068174fc72ff674
|
|
7
|
+
data.tar.gz: 10eda5daa0ba53c15f30894df2c48942f06287e94e663a0d10972ba1f49e8aa29c6fcb52747c70ce5db98c6736d62c7f11d9d8731842fd089aeb60118ded4a31
|
data/README.md
CHANGED
|
@@ -16,8 +16,8 @@ boot it every time you run a test, rake task or migration.
|
|
|
16
16
|
|
|
17
17
|
## Compatibility
|
|
18
18
|
|
|
19
|
-
* Ruby versions: MRI
|
|
20
|
-
* Rails versions:
|
|
19
|
+
* Ruby versions: MRI 3.1+
|
|
20
|
+
* Rails versions: 7.1+
|
|
21
21
|
* Bundler v2.1+
|
|
22
22
|
|
|
23
23
|
Spring makes extensive use of `Process.fork`, so won't be able to
|
data/lib/spring/application.rb
CHANGED
|
@@ -102,9 +102,14 @@ module Spring
|
|
|
102
102
|
|
|
103
103
|
Rails::Application.initializer :ensure_reloading_is_enabled, group: :all do
|
|
104
104
|
if Rails.application.config.cache_classes
|
|
105
|
+
config_name, set_to = if Rails.application.config.respond_to?(:enable_reloading=)
|
|
106
|
+
["enable_reloading", "true"]
|
|
107
|
+
else
|
|
108
|
+
["cache_classes", "false"]
|
|
109
|
+
end
|
|
105
110
|
raise <<-MSG.strip_heredoc
|
|
106
111
|
Spring reloads, and therefore needs the application to have reloading enabled.
|
|
107
|
-
Please, set config
|
|
112
|
+
Please, set config.#{config_name} to #{set_to} in config/environments/#{Rails.env}.rb.
|
|
108
113
|
MSG
|
|
109
114
|
end
|
|
110
115
|
end
|
|
@@ -124,8 +129,9 @@ module Spring
|
|
|
124
129
|
|
|
125
130
|
if defined?(Rails) && Rails.application
|
|
126
131
|
watcher.add Rails.application.paths["config/initializers"]
|
|
127
|
-
Rails
|
|
128
|
-
|
|
132
|
+
rails_root = Rails.root.to_s
|
|
133
|
+
Rails::Engine.subclasses.each do |engine|
|
|
134
|
+
if engine.root.to_s.start_with?(rails_root)
|
|
129
135
|
watcher.add engine.paths["config/initializers"].expanded
|
|
130
136
|
end
|
|
131
137
|
end
|
|
@@ -320,6 +326,7 @@ module Spring
|
|
|
320
326
|
if $!
|
|
321
327
|
lib = File.expand_path("..", __FILE__)
|
|
322
328
|
$!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen?
|
|
329
|
+
$!.backtrace_locations.reject! { |line| line.path&.start_with?(lib) } unless $!.backtrace_locations.frozen?
|
|
323
330
|
end
|
|
324
331
|
end
|
|
325
332
|
end
|
|
@@ -331,6 +338,7 @@ module Spring
|
|
|
331
338
|
if $!
|
|
332
339
|
lib = File.expand_path("..", __FILE__)
|
|
333
340
|
$!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen?
|
|
341
|
+
$!.backtrace_locations.reject! { |line| line.path&.start_with?(lib) } unless $!.backtrace_locations.frozen?
|
|
334
342
|
end
|
|
335
343
|
end
|
|
336
344
|
end
|
|
@@ -370,10 +378,10 @@ module Spring
|
|
|
370
378
|
Spring.failsafe_thread {
|
|
371
379
|
begin
|
|
372
380
|
_, status = Process.wait2 pid
|
|
373
|
-
log "#{pid} exited with #{status.exitstatus}"
|
|
381
|
+
log "#{pid} exited with #{status.exitstatus || status.inspect}"
|
|
374
382
|
|
|
375
383
|
streams.each(&:close)
|
|
376
|
-
client.puts(status.exitstatus)
|
|
384
|
+
client.puts(status.exitstatus || status.to_i)
|
|
377
385
|
client.close
|
|
378
386
|
ensure
|
|
379
387
|
@mutex.synchronize { @waiting.delete pid }
|
|
@@ -42,7 +42,7 @@ module Spring
|
|
|
42
42
|
if alive?
|
|
43
43
|
begin
|
|
44
44
|
yield
|
|
45
|
-
rescue Errno::ECONNRESET, Errno::EPIPE
|
|
45
|
+
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL
|
|
46
46
|
# The child has died but has not been collected by the wait thread yet,
|
|
47
47
|
# so start a new child and try again.
|
|
48
48
|
log "child dead; starting"
|
data/lib/spring/client/run.rb
CHANGED
|
@@ -184,11 +184,16 @@ module Spring
|
|
|
184
184
|
suspend_resume_on_tstp_cont(pid)
|
|
185
185
|
|
|
186
186
|
forward_signals(application)
|
|
187
|
-
status = application.read
|
|
187
|
+
status = application.read
|
|
188
|
+
log "got exit status #{status.inspect}"
|
|
188
189
|
|
|
189
|
-
|
|
190
|
+
# Status should always be an integer. If it is empty, something unexpected must have happened to the server.
|
|
191
|
+
if status.to_s.strip.empty?
|
|
192
|
+
log "unexpected empty exit status, app crashed?"
|
|
193
|
+
exit 1
|
|
194
|
+
end
|
|
190
195
|
|
|
191
|
-
exit status
|
|
196
|
+
exit status.to_i
|
|
192
197
|
else
|
|
193
198
|
log "got no pid"
|
|
194
199
|
exit 1
|
data/lib/spring/json.rb
CHANGED
data/lib/spring/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spring
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Leighton
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: Preloads your application so things like console, rake and tests run
|
|
13
13
|
faster
|
|
@@ -56,6 +56,7 @@ licenses:
|
|
|
56
56
|
- MIT
|
|
57
57
|
metadata:
|
|
58
58
|
rubygems_mfa_required: 'true'
|
|
59
|
+
changelog_uri: https://github.com/rails/spring/blob/main/CHANGELOG.md
|
|
59
60
|
rdoc_options: []
|
|
60
61
|
require_paths:
|
|
61
62
|
- lib
|
|
@@ -63,14 +64,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
63
64
|
requirements:
|
|
64
65
|
- - ">="
|
|
65
66
|
- !ruby/object:Gem::Version
|
|
66
|
-
version:
|
|
67
|
+
version: 3.1.0
|
|
67
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
69
|
requirements:
|
|
69
70
|
- - ">="
|
|
70
71
|
- !ruby/object:Gem::Version
|
|
71
72
|
version: '0'
|
|
72
73
|
requirements: []
|
|
73
|
-
rubygems_version:
|
|
74
|
+
rubygems_version: 4.0.3
|
|
74
75
|
specification_version: 4
|
|
75
76
|
summary: Rails application preloader
|
|
76
77
|
test_files: []
|