ruby-lsp-rails 0.2.0 → 0.2.2

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: 641af662aeb7df4487d90ec7ffe3c1f26b7f8a936700a3b8dc5ec77d38eb65ba
4
- data.tar.gz: 52d1989ad1288d0e3a0d0d478cdd9a79cb0ff33a3ddf25e2757a80e6822be7d3
3
+ metadata.gz: 5133a59bd3960baa206580c91b1504a91a94089591ea6211123038f28c40eaf7
4
+ data.tar.gz: 618627944a25edf11210afebc4f45112554125f8021787048a159ac13af0d15f
5
5
  SHA512:
6
- metadata.gz: f3b5ab9bad1cd657d5f79f0ef467435f6840ee720cf5b7b332e42fed3b050170521fcd0bbc590f72d0d865fb8f73daa2b0d16b16e11e61d8e2416f1963b51f83
7
- data.tar.gz: d9f1be241d9ab18e8cfb44c62b52b09634a598bb02420dcf55a2f0de6cb8185a4aa05d41cc5d9011a5fcdbe268cf8c1178ff8d24c42b8c52abcd7d2ce225a6d4
6
+ metadata.gz: 6f3e0395d614c55814e33fd52843e714458d7dd17b1460bb0ee64a796159138e42e6d4455d7a0e9cfb5648ca3b9609df9659f663e0d426aeb18938b62ef16517
7
+ data.tar.gz: 7f3d0408b2122e4ff0a7f6ac82d4cd5e82e2c7d858f801ea19cac06c4043aca81efe4e2a75de1724d854669d1cd1e9fbe8f6b2e7258cd1e3f442868f48e382e3
@@ -61,6 +61,12 @@ module RubyLsp
61
61
  first_argument = node.arguments.parts.first
62
62
  return unless first_argument.is_a?(SyntaxTree::StringLiteral)
63
63
 
64
+ # The test name may be a blank string while the code is being typed
65
+ return if first_argument.parts.empty?
66
+
67
+ # We can't handle interpolation yet
68
+ return unless first_argument.parts.all? { |part| part.is_a?(SyntaxTree::TStringContent) }
69
+
64
70
  test_name = first_argument.parts.first.value
65
71
  return unless test_name
66
72
 
@@ -48,14 +48,14 @@ module RubyLsp
48
48
  return unless response.code == "200"
49
49
 
50
50
  JSON.parse(response.body.chomp, symbolize_names: true)
51
- rescue Errno::ECONNREFUSED, ServerAddressUnknown
51
+ rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout, ServerAddressUnknown
52
52
  nil
53
53
  end
54
54
 
55
55
  sig { void }
56
56
  def check_if_server_is_running!
57
57
  request("activate", 0.2)
58
- rescue Errno::ECONNREFUSED, ServerAddressUnknown
58
+ rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, ServerAddressUnknown
59
59
  warn(SERVER_NOT_RUNNING_MESSAGE)
60
60
  rescue Net::ReadTimeout
61
61
  # If the server is running, but the initial request is taking too long, we don't want to block the
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module Rails
6
- VERSION = "0.2.0"
6
+ VERSION = "0.2.2"
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.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails