ruby-lsp-rails 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -9
- data/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb +6 -4
- data/lib/ruby_lsp_rails/version.rb +1 -1
- metadata +2 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175aa77410d6d479169ab7c5c212d12d56ec2c6624d7766bd8e1575da706d7a9
|
4
|
+
data.tar.gz: 76799c42df0346b1628479e61c86914a7f52b96c656ddf39975bed904e13e459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59a4059ffdeb381dd3b8c4858e91b64a624df5e424807540b99aa6182f908f944cc6ea0ddf677776eb2d4680f8bc7c7944883fea2eb346da8252125eedd2c788
|
7
|
+
data.tar.gz: 8bdc777be1f0663cc6d7e2a450b42ceef091f5e75769cf74570ce536bc914de2c2b559cbdcd05989b55d3fc6a58a843f637b2caaf1ec165a97b4c3d0b2c7db11
|
data/README.md
CHANGED
@@ -2,8 +2,10 @@
|
|
2
2
|
|
3
3
|
Ruby LSP Rails is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) addon for extra Rails editor features, such as:
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
* Hover over an ActiveRecord model to reveal its schema.
|
6
|
+
* Run or debug a test by clicking on the code lens which appears above the test class, or an individual test.
|
7
|
+
* Navigate to associations, validations, callbacks and test cases using your editor's "Go to Symbol" feature, or outline view.
|
8
|
+
* Jump to the definition of callbacks using your editor's "Go to Definition" feature.
|
7
9
|
|
8
10
|
## Installation
|
9
11
|
|
@@ -12,13 +14,6 @@ If you haven't already done so, you'll need to first [set up Ruby LSP](https://g
|
|
12
14
|
As of v0.3.0, Ruby LSP will automatically include the Ruby LSP Rails addon in its custom bundle when a Rails app is detected.
|
13
15
|
There is no need to add the gem to your bundle.
|
14
16
|
|
15
|
-
## Features
|
16
|
-
|
17
|
-
* Hover over an ActiveRecord model to reveal its schema.
|
18
|
-
* Run or debug a test by clicking on the code lens which appears above the test class, or an individual test.
|
19
|
-
* Navigate to associations, validations, callbacks and test cases using your editor's "Go to Symbol" feature, or outline view.
|
20
|
-
* Jump to the definition of callbacks using your editor's "Go to Definition" feature.
|
21
|
-
|
22
17
|
## Documentation
|
23
18
|
|
24
19
|
See the [documentation](https://shopify.github.io/ruby-lsp-rails) for more in-depth details about the
|
@@ -88,15 +88,17 @@ module RubyLsp
|
|
88
88
|
if class_name.end_with?("Test")
|
89
89
|
command = "#{BASE_COMMAND} #{@path}"
|
90
90
|
add_test_code_lens(node, name: class_name, command: command, kind: :group)
|
91
|
+
@group_id_stack.push(@group_id)
|
92
|
+
@group_id += 1
|
91
93
|
end
|
92
|
-
|
93
|
-
@group_id_stack.push(@group_id)
|
94
|
-
@group_id += 1
|
95
94
|
end
|
96
95
|
|
97
96
|
sig { params(node: Prism::ClassNode).void }
|
98
97
|
def on_class_node_leave(node)
|
99
|
-
|
98
|
+
class_name = node.constant_path.slice
|
99
|
+
if class_name.end_with?("Test")
|
100
|
+
@group_id_stack.pop
|
101
|
+
end
|
100
102
|
end
|
101
103
|
|
102
104
|
private
|
metadata
CHANGED
@@ -1,57 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: actionpack
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '6.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '6.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: activerecord
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '6.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '6.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: railties
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '6.0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '6.0'
|
55
13
|
- !ruby/object:Gem::Dependency
|
56
14
|
name: ruby-lsp
|
57
15
|
requirement: !ruby/object:Gem::Requirement
|