ruby-lsp-rails 0.3.24 → 0.3.25

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: 48996127a800b5450baaa8ace61a91fd292005d73ee607ce8577b028e451838e
4
- data.tar.gz: be8de3ba4b390495d7075948f2e5698cf162930b4e4bf7c53855590d0519d3f7
3
+ metadata.gz: 03b28222188faf1ac819337e73c244ba0a3cb588acfb286554246151b4beaa1a
4
+ data.tar.gz: 5558fe8142c90eaa53991f99a54da04b1cf1fe2ded213ae737b55cc9ad8acd78
5
5
  SHA512:
6
- metadata.gz: 70aaa8e246313469a5277aa0353b49e08ec5aec3fdeb551f08aa3414241986b38920b6c56bc502c84986a420a256866c9ab7fd005e643e9ea9b12b6afe54bab1
7
- data.tar.gz: ae9de99e7de876062d2b2c6eb60fce7b2ed9e6dad51177485f5fcff7750fb87c2107987df6a80a9791bc39f4bd56eb5a2c74d4fa1cba70ccd6ea3fe356062387
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 IncompleteMessageError < StandardError; end
47
- class EmptyMessageError < StandardError; end
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
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 IncompleteMessageError
237
+ rescue MessageError
237
238
  log_message(
238
239
  "Ruby LSP Rails failed to trigger reload",
239
240
  type: RubyLsp::Constant::MessageType::ERROR,
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module Rails
6
- VERSION = "0.3.24"
6
+ VERSION = "0.3.25"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.24
4
+ version: 0.3.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify