ruby-lsp-rails 0.3.24 → 0.3.25
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 +12 -11
- data/lib/ruby_lsp_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03b28222188faf1ac819337e73c244ba0a3cb588acfb286554246151b4beaa1a
|
4
|
+
data.tar.gz: 5558fe8142c90eaa53991f99a54da04b1cf1fe2ded213ae737b55cc9ad8acd78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb20529701e3008b9f38ba4840446aed72aad85b9e623bc93f691a7bee1ce0418d0b2bfabef085d5446fced0f645c0f6325dd4e78925f2e3ab20cc43e1d34543
|
7
|
+
data.tar.gz: e8507ef9f18e3987c667f1c45a3419171677f318bfb4ba5572153efea73bf2ec2922a0ec62865d3aabc9e49117af8e86951975a9eadc68d7848ce6d57f75fdb2
|
@@ -43,8 +43,9 @@ module RubyLsp
|
|
43
43
|
end
|
44
44
|
|
45
45
|
class InitializationError < StandardError; end
|
46
|
-
class
|
47
|
-
class
|
46
|
+
class MessageError < StandardError; end
|
47
|
+
class IncompleteMessageError < MessageError; end
|
48
|
+
class EmptyMessageError < MessageError; end
|
48
49
|
|
49
50
|
extend T::Sig
|
50
51
|
|
@@ -115,7 +116,7 @@ module RubyLsp
|
|
115
116
|
sig { params(server_addon_path: String).void }
|
116
117
|
def register_server_addon(server_addon_path)
|
117
118
|
send_notification("server_addon/register", server_addon_path: server_addon_path)
|
118
|
-
rescue
|
119
|
+
rescue MessageError
|
119
120
|
log_message(
|
120
121
|
"Ruby LSP Rails failed to register server addon #{server_addon_path}",
|
121
122
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -126,7 +127,7 @@ module RubyLsp
|
|
126
127
|
sig { params(name: String).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
127
128
|
def model(name)
|
128
129
|
make_request("model", name: name)
|
129
|
-
rescue
|
130
|
+
rescue MessageError
|
130
131
|
log_message(
|
131
132
|
"Ruby LSP Rails failed to get model information",
|
132
133
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -146,7 +147,7 @@ module RubyLsp
|
|
146
147
|
model_name: model_name,
|
147
148
|
association_name: association_name,
|
148
149
|
)
|
149
|
-
rescue
|
150
|
+
rescue MessageError
|
150
151
|
log_message(
|
151
152
|
"Ruby LSP Rails failed to get association location",
|
152
153
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -157,7 +158,7 @@ module RubyLsp
|
|
157
158
|
sig { params(name: String).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
158
159
|
def route_location(name)
|
159
160
|
make_request("route_location", name: name)
|
160
|
-
rescue
|
161
|
+
rescue MessageError
|
161
162
|
log_message(
|
162
163
|
"Ruby LSP Rails failed to get route location",
|
163
164
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -168,7 +169,7 @@ module RubyLsp
|
|
168
169
|
sig { params(controller: String, action: String).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
169
170
|
def route(controller:, action:)
|
170
171
|
make_request("route_info", controller: controller, action: action)
|
171
|
-
rescue
|
172
|
+
rescue MessageError
|
172
173
|
log_message(
|
173
174
|
"Ruby LSP Rails failed to get route information",
|
174
175
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -191,7 +192,7 @@ module RubyLsp
|
|
191
192
|
def pending_migrations_message
|
192
193
|
response = make_request("pending_migrations_message")
|
193
194
|
response[:pending_migrations_message] if response
|
194
|
-
rescue
|
195
|
+
rescue MessageError
|
195
196
|
log_message(
|
196
197
|
"Ruby LSP Rails failed when checking for pending migrations",
|
197
198
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -202,7 +203,7 @@ module RubyLsp
|
|
202
203
|
sig { returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
203
204
|
def run_migrations
|
204
205
|
make_request("run_migrations")
|
205
|
-
rescue
|
206
|
+
rescue MessageError
|
206
207
|
log_message(
|
207
208
|
"Ruby LSP Rails failed to run migrations",
|
208
209
|
type: RubyLsp::Constant::MessageType::ERROR,
|
@@ -225,7 +226,7 @@ module RubyLsp
|
|
225
226
|
request_name: request_name,
|
226
227
|
**params,
|
227
228
|
)
|
228
|
-
rescue
|
229
|
+
rescue MessageError
|
229
230
|
nil
|
230
231
|
end
|
231
232
|
|
@@ -233,7 +234,7 @@ module RubyLsp
|
|
233
234
|
def trigger_reload
|
234
235
|
log_message("Reloading Rails application")
|
235
236
|
send_notification("reload")
|
236
|
-
rescue
|
237
|
+
rescue MessageError
|
237
238
|
log_message(
|
238
239
|
"Ruby LSP Rails failed to trigger reload",
|
239
240
|
type: RubyLsp::Constant::MessageType::ERROR,
|