ruby-lsp-rails 0.3.1 → 0.3.2
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/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb +14 -2
- data/lib/ruby_lsp_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b68f8a0b2e4d7d4fa32aa2712865dea5c4734c86aa6a490c2a7ace718e3405a
|
4
|
+
data.tar.gz: a146d2ff4091073a9517147dffd3f5326337b947563ed39848d3a823662b5fdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8902056649daff38b9c6e73231ecc0fb55485d4789d52b9dbf92afe4983104082a959b242b1a9f898d3697344663a678da952b0c0a4f76db026ef07c4744fe52
|
7
|
+
data.tar.gz: 7550880a0a82da99734d38178c5aa47a1909b1787f2070bbf960f2b70ea177a3dd330484428b220de10d3d511a93b7f87a736dfbaf5c47bd12c50f547da15858
|
@@ -31,6 +31,7 @@ module RubyLsp
|
|
31
31
|
# parent ends, the spring process ends as well. If this is not set, Spring will throw an error while trying to
|
32
32
|
# set its own session ID
|
33
33
|
begin
|
34
|
+
Process.setpgrp
|
34
35
|
Process.setsid
|
35
36
|
rescue Errno::EPERM
|
36
37
|
# If we can't set the session ID, continue
|
@@ -52,6 +53,16 @@ module RubyLsp
|
|
52
53
|
warn("Ruby LSP Rails booting server")
|
53
54
|
read_response
|
54
55
|
warn("Finished booting Ruby LSP Rails server")
|
56
|
+
|
57
|
+
unless ENV["RAILS_ENV"] == "test"
|
58
|
+
at_exit do
|
59
|
+
if @wait_thread.alive?
|
60
|
+
warn("Ruby LSP Rails is force killing the server")
|
61
|
+
sleep(0.5) # give the server a bit of time if we already issued a shutdown notification
|
62
|
+
Process.kill(T.must(Signal.list["TERM"]), @wait_thread.pid)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
55
66
|
rescue Errno::EPIPE, IncompleteMessageError
|
56
67
|
raise InitializationError, @stderr.read
|
57
68
|
end
|
@@ -66,8 +77,9 @@ module RubyLsp
|
|
66
77
|
|
67
78
|
sig { void }
|
68
79
|
def shutdown
|
69
|
-
|
70
|
-
|
80
|
+
warn("Ruby LSP Rails shutting down server")
|
81
|
+
send_message("shutdown")
|
82
|
+
sleep(0.5) # give the server a bit of time to shutdown
|
71
83
|
[@stdin, @stdout, @stderr].each(&:close)
|
72
84
|
end
|
73
85
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|