spring 4.2.1 → 4.4.0
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 -1
- data/lib/spring/application_manager.rb +3 -2
- data/lib/spring/json.rb +3 -3
- data/lib/spring/version.rb +1 -1
- metadata +5 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98db88859d325bff2e76e6569e05eb10bf89baf2a07ab47f43eb6548e8ca8f1c
|
4
|
+
data.tar.gz: 01e6ec88fa814c0bfe8f737a71164301b59681ea909de9bcf9fe5516eca1a2ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebb7f95463b29f0e8c2995e19b101f0730cd0aa98ea51496fb6f8bd624253a3e4536dd5664ad2ea8ec5348cf074eb9b79f798b4b3b38adb6c717cc3ad73ca6b1
|
7
|
+
data.tar.gz: e01d2b58bbace569bfdcacec81b852427a5bdf5efdf724be560598f13dbabbf32502aec90aa899d0fdf3b16e0255a1ada40d9b0ac7a4cb74a3d3f6f1352342c4
|
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: 6.0
|
19
|
+
* Ruby versions: MRI 3.1+
|
20
|
+
* Rails versions: 6.0+
|
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,6 +129,11 @@ module Spring
|
|
124
129
|
|
125
130
|
if defined?(Rails) && Rails.application
|
126
131
|
watcher.add Rails.application.paths["config/initializers"]
|
132
|
+
Rails::Engine.descendants.each do |engine|
|
133
|
+
if engine.root.to_s.start_with?(Rails.root.to_s)
|
134
|
+
watcher.add engine.paths["config/initializers"].expanded
|
135
|
+
end
|
136
|
+
end
|
127
137
|
watcher.add Rails.application.paths["config/database"]
|
128
138
|
if secrets_path = Rails.application.paths["config/secrets"]
|
129
139
|
watcher.add secrets_path
|
@@ -315,6 +325,7 @@ module Spring
|
|
315
325
|
if $!
|
316
326
|
lib = File.expand_path("..", __FILE__)
|
317
327
|
$!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen?
|
328
|
+
$!.backtrace_locations.reject! { |line| line.path&.start_with?(lib) } unless $!.backtrace_locations.frozen?
|
318
329
|
end
|
319
330
|
end
|
320
331
|
end
|
@@ -326,6 +337,7 @@ module Spring
|
|
326
337
|
if $!
|
327
338
|
lib = File.expand_path("..", __FILE__)
|
328
339
|
$!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen?
|
340
|
+
$!.backtrace_locations.reject! { |line| line.path&.start_with?(lib) } unless $!.backtrace_locations.frozen?
|
329
341
|
end
|
330
342
|
end
|
331
343
|
end
|
@@ -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"
|
@@ -126,7 +126,8 @@ module Spring
|
|
126
126
|
# as if it does we're no longer interested in the child
|
127
127
|
loop do
|
128
128
|
IO.select([child])
|
129
|
-
|
129
|
+
peek = child.recv(1, Socket::MSG_PEEK)
|
130
|
+
break if peek.nil? || peek.empty?
|
130
131
|
sleep 0.01
|
131
132
|
end
|
132
133
|
|
data/lib/spring/json.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# ### WHY SPRING VENDORS A JSON LIBRARY ###
|
4
4
|
#
|
@@ -13,7 +13,7 @@
|
|
13
13
|
module Spring
|
14
14
|
module JSON
|
15
15
|
def self.load(string)
|
16
|
-
string.force_encoding("utf-8")
|
16
|
+
string = string.dup.force_encoding("utf-8") unless string.encoding == Encoding::UTF_8
|
17
17
|
OkJson.decode(string)
|
18
18
|
end
|
19
19
|
|
@@ -364,7 +364,7 @@ private
|
|
364
364
|
end
|
365
365
|
end
|
366
366
|
if rubydoesenc?
|
367
|
-
a[w] = '' << uchar
|
367
|
+
a[w] = +'' << uchar
|
368
368
|
w += 1
|
369
369
|
else
|
370
370
|
w += ucharenc(a, w, uchar)
|
data/lib/spring/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: Preloads your application so things like console, rake and tests run
|
14
13
|
faster
|
@@ -57,7 +56,7 @@ licenses:
|
|
57
56
|
- MIT
|
58
57
|
metadata:
|
59
58
|
rubygems_mfa_required: 'true'
|
60
|
-
|
59
|
+
changelog_uri: https://github.com/rails/spring/blob/main/CHANGELOG.md
|
61
60
|
rdoc_options: []
|
62
61
|
require_paths:
|
63
62
|
- lib
|
@@ -65,15 +64,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
66
65
|
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
67
|
+
version: 3.1.0
|
69
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
69
|
requirements:
|
71
70
|
- - ">="
|
72
71
|
- !ruby/object:Gem::Version
|
73
72
|
version: '0'
|
74
73
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
76
|
-
signing_key:
|
74
|
+
rubygems_version: 3.6.7
|
77
75
|
specification_version: 4
|
78
76
|
summary: Rails application preloader
|
79
77
|
test_files: []
|