ruby-lsp-rails 0.3.25 → 0.3.26

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: 03b28222188faf1ac819337e73c244ba0a3cb588acfb286554246151b4beaa1a
4
- data.tar.gz: 5558fe8142c90eaa53991f99a54da04b1cf1fe2ded213ae737b55cc9ad8acd78
3
+ metadata.gz: df7c6791cb1fc007fc4705e034eb60cde1d5905a1771b145c2d4bb6f36224658
4
+ data.tar.gz: 1fdd80b7787bf31a237aa9f9f196c3170ee5e612ce8105c2fc20a63fd9027f73
5
5
  SHA512:
6
- metadata.gz: fb20529701e3008b9f38ba4840446aed72aad85b9e623bc93f691a7bee1ce0418d0b2bfabef085d5446fced0f645c0f6325dd4e78925f2e3ab20cc43e1d34543
7
- data.tar.gz: e8507ef9f18e3987c667f1c45a3419171677f318bfb4ba5572153efea73bf2ec2922a0ec62865d3aabc9e49117af8e86951975a9eadc68d7848ce6d57f75fdb2
6
+ metadata.gz: 8de8df639f440b7bcedb854e03ead56eb56517569dc31938759593cce32ff87d968b07b88598de01939fab8d3e1b8bb73108cf21b85c7f30493093d1f8d2973a
7
+ data.tar.gz: 69550bcd5575bf7d8f6f82e7e738e53392fd776534dc88495274ab500e9ea3e11472e1008d05fe27de3ae40beee9a43d039be49866902e569ec7fdd0c91af161
@@ -19,6 +19,7 @@ module RubyLsp
19
19
  # Log a message to the editor's output panel
20
20
  def log_message(message)
21
21
  $stderr.puts(message)
22
+ send_message({ result: nil })
22
23
  end
23
24
  end
24
25
 
@@ -103,6 +104,9 @@ module RubyLsp
103
104
  end
104
105
 
105
106
  def execute(request, params)
107
+ request_name = request
108
+ request_name = "#{params[:server_addon_name]}##{params[:request_name]}" if request == "server_addon/delegate"
109
+
106
110
  case request
107
111
  when "shutdown"
108
112
  @running = false
@@ -128,11 +132,11 @@ module RubyLsp
128
132
  request_name = params[:request_name]
129
133
  ServerAddon.delegate(server_addon_name, request_name, params.except(:request_name, :server_addon_name))
130
134
  end
131
- request_name = request
132
- request_name = "#{params[:server_addon_name]}##{params[:request_name]}" if request == "server_addon/delegate"
133
135
  # Since this is a common problem, we show a specific error message to the user, instead of the full stack trace.
134
136
  rescue ActiveRecord::ConnectionNotEstablished
135
137
  log_message("Request #{request_name} failed because database connection was not established.")
138
+ rescue ActiveRecord::NoDatabaseError
139
+ log_message("Request #{request_name} failed because the database does not exist.")
136
140
  rescue => e
137
141
  log_message("Request #{request_name} failed:\n" + e.full_message(highlight: false))
138
142
  end
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module Rails
6
- VERSION = "0.3.25"
6
+ VERSION = "0.3.26"
7
7
  end
8
8
  end
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.25
4
+ version: 0.3.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-06 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-lsp