ruby-lsp-rails 0.3.12 → 0.3.13
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2543aa7d39f0a6b231112f9ddb365692c7e8d06eb14681da551ab55fd8f5a4d
|
4
|
+
data.tar.gz: e466ccd6d90934e083e638efdcedfb5d6b8f85fbce70b139e1542eeb2ab8a139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f7c82462682d93fd6b944c2705c8b62b424b4abc3636d1f2540eeee1ab9f7e2896eb77d338697bb65a0a64752529085f38e49bd5a75bfc668fa9d31dd5b0d10
|
7
|
+
data.tar.gz: a8978fdebb07ba8b76dd10a725b3b3c736961f103cefa806fbc0302b494516e0a196105bf7fac9d114c963a62c8a706959d53f1509a4ed343e2e9d24633c4372
|
@@ -41,6 +41,7 @@ module RubyLsp
|
|
41
41
|
|
42
42
|
sig { void }
|
43
43
|
def initialize
|
44
|
+
@mutex = T.let(Mutex.new, Mutex)
|
44
45
|
# Spring needs a Process session ID. It uses this ID to "attach" itself to the parent process, so that when the
|
45
46
|
# parent ends, the spring process ends as well. If this is not set, Spring will throw an error while trying to
|
46
47
|
# set its own session ID
|
@@ -176,7 +177,9 @@ module RubyLsp
|
|
176
177
|
message[:params] = params if params
|
177
178
|
json = message.to_json
|
178
179
|
|
179
|
-
@
|
180
|
+
@mutex.synchronize do
|
181
|
+
@stdin.write("Content-Length: #{json.length}\r\n\r\n", json)
|
182
|
+
end
|
180
183
|
rescue Errno::EPIPE
|
181
184
|
# The server connection died
|
182
185
|
end
|
@@ -187,13 +190,16 @@ module RubyLsp
|
|
187
190
|
|
188
191
|
sig { overridable.returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
189
192
|
def read_response
|
190
|
-
|
191
|
-
|
193
|
+
raw_response = @mutex.synchronize do
|
194
|
+
headers = @stdout.gets("\r\n\r\n")
|
195
|
+
raise IncompleteMessageError unless headers
|
196
|
+
|
197
|
+
content_length = headers[/Content-Length: (\d+)/i, 1].to_i
|
198
|
+
raise EmptyMessageError if content_length.zero?
|
192
199
|
|
193
|
-
|
194
|
-
|
200
|
+
@stdout.read(content_length)
|
201
|
+
end
|
195
202
|
|
196
|
-
raw_response = @stdout.read(content_length)
|
197
203
|
response = JSON.parse(T.must(raw_response), symbolize_names: true)
|
198
204
|
|
199
205
|
if response[:error]
|
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-lsp
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
|
-
rubygems_version: 3.5.
|
83
|
+
rubygems_version: 3.5.17
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: A Ruby LSP addon for Rails
|