ruby-lsp-rails 0.3.20 → 0.3.21

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: 17851fd3a4e5eb644fb2de5ee5f33ae07d38c4a12ffd6b8c868651002e8c3870
4
- data.tar.gz: e4f0096f8874f4c34157fe0d1cd491ea0f278ebd1cbf1445d5a13b09e8c6b725
3
+ metadata.gz: feb1936ab1a1b20409425b3d644ab0e3c158b6f21a6bdf024d73013ccac28120
4
+ data.tar.gz: f32daf2f444a0ca0fa2a55b0d2bdef2d67abfcf40b4bae5cd351eede9b50dc11
5
5
  SHA512:
6
- metadata.gz: 97fe780b035265db5f2f8b96e58e8d6f89f66b64e43d0b7450604b3920ea818932dd581b76d1e13dea202a936446ca2a26f4c2d5341736f2d4a6c15059453bd6
7
- data.tar.gz: 8a913fd58675f31da51c3175fd44b83b32ce5790a947461d8bf986e4c7e9d1de21a8b66a518e4ab16a18f6350e6b089823af5472ac6cac4e40ea3b9af734614f
6
+ metadata.gz: 72082ba3519fec8b3453201b9ffa9a270d745bdb4abff0e70edce58ad82024aae836a604bcdbdcec73f54faaae8b28e5a646ffec4bd0910c88099d425f3a6606
7
+ data.tar.gz: 4c53919cae2b20d3dbd6402721ebe9470ba89ab4a2db24cbc61f04484d8b19c23c7c99017042ac09fff55e4f3cf34c2830890a270245b89011a0691ba6ab11f1
@@ -146,8 +146,10 @@ module RubyLsp
146
146
  ::Rails.application.routes.routes.find { |route| route.requirements == requirements }
147
147
  end
148
148
 
149
- if route&.source_location
150
- file, _, line = route.source_location.rpartition(":")
149
+ source_location = route&.respond_to?(:source_location) && route.source_location
150
+
151
+ if source_location
152
+ file, _, line = source_location.rpartition(":")
151
153
  body = {
152
154
  source_location: [::Rails.root.join(file).to_s, line],
153
155
  verb: route.verb,
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module Rails
6
- VERSION = "0.3.20"
6
+ VERSION = "0.3.21"
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.20
4
+ version: 0.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-16 00:00:00.000000000 Z
11
+ date: 2024-10-23 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.21
83
+ rubygems_version: 3.5.22
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: A Ruby LSP addon for Rails