ruby-lsp-shoulda-context 0.4.0 → 0.4.1
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: ef2bd21652b42fa017e458daa37597860937f8672d23f2deebf021a2530d5b34
|
4
|
+
data.tar.gz: 7cecc4559f69900a160f7649532b9d38696f70a0b29bc9ccc89edd3917d4a459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fdd797ef37150b665104c90861fd78f1ddc525face38977876acd3edc50d7b5f4f345846b7f6df810d472d56538a307fc1928d3d96b8facda64c8df7cddbddc
|
7
|
+
data.tar.gz: 5486b8f7f137177809cfa9424dfc08909c82320835df82f01b5b23e97732dbad03a5d789c4f72c1e80cca600f9bee6cdd71df68e57cd74122873cc6d10d49bbb
|
data/.env.development
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
RUBY_LSP_SHOULDA_CONTEXT=true
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
## [Unreleased]
|
2
|
+
## [0.4.0] - 2024-02-10
|
3
|
+
- Added support to ruby on rails
|
4
|
+
- Fixed Class Run on terminal whith wrong pattern
|
5
|
+
|
2
6
|
## [0.3.0] - 2024-02-10
|
3
7
|
- Removed collisions from different should/context methods that have the same name at different levels
|
4
8
|
## [0.2.0] - 2024-02-07
|
data/Readme.md
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
+
[](https://badge.fury.io/rb/ruby-lsp-shoulda-context)
|
2
|
+

|
3
|
+
|
1
4
|
# RubyLsp::ShouldaContext
|
2
5
|
|
3
6
|
This gem provides support for [shoulda-context](https://github.com/thoughtbot/shoulda-context) using [ruby-lsp](https://github.com/Shopify/ruby-lsp/blob/main/lib/rubocop/cop/ruby_lsp/use_register_with_handler_method.rb)
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
Install the gem and add to the application's Gemfile by executing:
|
10
|
+
Add the gem to the application's Gemfile `:development` group:
|
10
11
|
|
11
|
-
|
12
|
+
gem 'ruby-lsp-shoulda-context', '~> 0.4.0', require: false
|
12
13
|
|
13
14
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
15
|
|
@@ -41,7 +42,7 @@ Everyone interacting in the RubyLsp::ShouldaContext project's codebases, issue t
|
|
41
42
|
- [x] Make context runnable
|
42
43
|
- [x] Make should with string runnable
|
43
44
|
- [x] Make should with method runnable
|
44
|
-
- [
|
45
|
+
- [x] Make exec method conditional to rails or Minitest setup
|
45
46
|
- [x] Make inner context or inner should with collissions with outer DSL not collide using full name of the test (Currently if 2 tests have the same name both are executed)
|
46
47
|
- [x] Provide grouping with classes that ends with "..Test" syntax (Note: The codelens is duplicated becuase lsp support minitest by default and LSP responses are merged)
|
47
48
|
- [ ] Provide support for Inner Classes
|
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require "ruby_lsp/addon"
|
5
5
|
require "ruby_lsp/internal"
|
6
|
+
require "dotenv/load"
|
6
7
|
|
7
8
|
require_relative "code_lens"
|
8
9
|
|
@@ -14,7 +15,9 @@ module RubyLsp
|
|
14
15
|
extend T::Sig
|
15
16
|
|
16
17
|
sig { override.params(message_queue: Thread::Queue).void }
|
17
|
-
def activate(message_queue)
|
18
|
+
def activate(message_queue)
|
19
|
+
Dotenv.load(".env.development.local", ".env.development")
|
20
|
+
end
|
18
21
|
|
19
22
|
sig { override.void }
|
20
23
|
def deactivate; end
|
@@ -29,6 +29,8 @@ module RubyLsp
|
|
29
29
|
|
30
30
|
sig { params(uri: URI::Generic, dispatcher: Prism::Dispatcher).void }
|
31
31
|
def initialize(uri, dispatcher)
|
32
|
+
return if ENV["RUBY_LSP_SHOULDA_CONTEXT"] == "false"
|
33
|
+
|
32
34
|
@_response = T.let([], ResponseType)
|
33
35
|
# Listener is only initialized if uri.to_standardized_path is valid
|
34
36
|
@path = T.let(T.must(uri.to_standardized_path), String)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp-shoulda-context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domingo Edwards
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-lsp
|
@@ -37,6 +37,7 @@ executables: []
|
|
37
37
|
extensions: []
|
38
38
|
extra_rdoc_files: []
|
39
39
|
files:
|
40
|
+
- ".env.development"
|
40
41
|
- ".rubocop.yml"
|
41
42
|
- ".ruby-version"
|
42
43
|
- CHANGELOG.md
|