ruby-lsp-rails 0.4.4 → 0.4.6
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6864307f69d34de0709f4329a56fca1b82821117c62e245343a4f59252bda54
|
4
|
+
data.tar.gz: f474eb2f32c87df0fa8e1e4be4f1c910400d354c1d3d81ff14f1b3cfd4a84835
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 343481434aee260a0e67460c2f28da7ebe7ce5feac8f7ca26871c8bbc463064810a5d72bfe66dc59921ea6a7617006c319b95413089e7d82ad767ce7be071c5f
|
7
|
+
data.tar.gz: 62557459049c0f1a6ee0f2679a24f46c395342b0fe5f746c857dcde4fd489cfd382a64044de87c8f85c7b2fa5a933b842a64392a05b53b02d694d6d03a5181f7
|
@@ -36,7 +36,7 @@ module RubyLsp
|
|
36
36
|
resolved_class = @client.model(receiver.name.to_s)
|
37
37
|
return if resolved_class.nil?
|
38
38
|
|
39
|
-
arguments = @node_context.call_node
|
39
|
+
arguments = @node_context.call_node&.arguments&.arguments
|
40
40
|
indexed_call_node_args = {} #: Hash[String, Prism::Node]
|
41
41
|
|
42
42
|
if arguments
|
@@ -29,18 +29,20 @@ module RubyLsp
|
|
29
29
|
#: (Prism::ConstantPathNode node) -> void
|
30
30
|
def on_constant_path_node_enter(node)
|
31
31
|
entries = @index.resolve(node.slice, @nesting)
|
32
|
-
|
32
|
+
item = entries&.first
|
33
|
+
return unless item
|
33
34
|
|
34
|
-
name =
|
35
|
+
name = item.name
|
35
36
|
generate_column_content(name)
|
36
37
|
end
|
37
38
|
|
38
39
|
#: (Prism::ConstantReadNode node) -> void
|
39
40
|
def on_constant_read_node_enter(node)
|
40
41
|
entries = @index.resolve(node.name.to_s, @nesting)
|
41
|
-
|
42
|
+
item = entries&.first
|
43
|
+
return unless item
|
42
44
|
|
43
|
-
generate_column_content(
|
45
|
+
generate_column_content(item.name)
|
44
46
|
end
|
45
47
|
|
46
48
|
private
|
@@ -52,12 +52,11 @@ module RubyLsp
|
|
52
52
|
|
53
53
|
#: (ResponseBuilders::TestCollection response_builder, GlobalState global_state, Prism::Dispatcher dispatcher, URI::Generic uri) -> void
|
54
54
|
def initialize(response_builder, global_state, dispatcher, uri)
|
55
|
-
|
55
|
+
@parent_stack = [response_builder] #: Array[(Requests::Support::TestItem | ResponseBuilders::TestCollection)?]
|
56
|
+
super(response_builder, global_state, uri)
|
56
57
|
|
57
|
-
|
58
|
-
|
59
|
-
dispatcher.register(
|
60
|
-
self,
|
58
|
+
register_events(
|
59
|
+
dispatcher,
|
61
60
|
:on_class_node_enter,
|
62
61
|
:on_call_node_enter,
|
63
62
|
:on_def_node_enter,
|
@@ -401,7 +401,7 @@ module RubyLsp
|
|
401
401
|
|
402
402
|
#: (String) -> Hash[Symbol | String, untyped]?
|
403
403
|
def resolve_database_info_from_model(model_name)
|
404
|
-
const = ActiveSupport::Inflector.safe_constantize(model_name)
|
404
|
+
const = ActiveSupport::Inflector.safe_constantize(model_name) # rubocop:disable Sorbet/ConstantsFromStrings
|
405
405
|
return unless active_record_model?(const)
|
406
406
|
|
407
407
|
info = {
|
@@ -420,7 +420,7 @@ module RubyLsp
|
|
420
420
|
|
421
421
|
#: (Hash[Symbol | String, untyped]) -> Hash[Symbol | String, untyped]?
|
422
422
|
def resolve_association_target(params)
|
423
|
-
const = ActiveSupport::Inflector.safe_constantize(params[:model_name])
|
423
|
+
const = ActiveSupport::Inflector.safe_constantize(params[:model_name]) # rubocop:disable Sorbet/ConstantsFromStrings
|
424
424
|
return unless active_record_model?(const)
|
425
425
|
|
426
426
|
association_klass = const.reflect_on_association(params[:association_name].intern).klass
|
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.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
@@ -15,20 +15,20 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0.
|
18
|
+
version: 0.24.0
|
19
19
|
- - "<"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.25.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.24.0
|
29
29
|
- - "<"
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: 0.
|
31
|
+
version: 0.25.0
|
32
32
|
description: A Ruby LSP addon that adds extra editor functionality for Rails applications
|
33
33
|
email:
|
34
34
|
- ruby@shopify.com
|