ruby-lsp-shoulda-context 0.4.0 → 0.4.1

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: 8112ca7fa20b49f281d1b3b89975e7cab08adbdc93d753daaa0b275423adff19
4
- data.tar.gz: 7a175a8727300cc49bedf73b82e7263330262e319a8df36083215b4deed11f23
3
+ metadata.gz: ef2bd21652b42fa017e458daa37597860937f8672d23f2deebf021a2530d5b34
4
+ data.tar.gz: 7cecc4559f69900a160f7649532b9d38696f70a0b29bc9ccc89edd3917d4a459
5
5
  SHA512:
6
- metadata.gz: 443dcb56b9542410765f47fc3a22d7135fa09ad71abb6e9d2308eee42566b5854c16564abc2f515e4e0433be5e830d1de5ff18c25b41e6612f6d3991129139dc
7
- data.tar.gz: 1d9353e3befef9ee4b5f9e7f11cca6e44034fd8cd64c2af0250bacd7716b1113f7eaba9985003a909038c7d2dbddcac021fa5041eb26506c777776a9cdb72833
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
+ [![Gem Version](https://badge.fury.io/rb/ruby-lsp-shoulda-context.svg)](https://badge.fury.io/rb/ruby-lsp-shoulda-context)
2
+ ![Build Status](https://github.com/domingo2000/ruby-lsp-shoulda-context/actions/workflows/main.yml/badge.svg)
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
- TODO: Replace `ruby-lsp-shoulda-context` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
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
- bundle add ruby-lsp-shoulda-context
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
- - [ ] Make exec method conditional to rails or Minitest setup
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); end
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)
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module ShouldaContext
6
- VERSION = "0.4.0"
6
+ VERSION = "0.4.1"
7
7
  end
8
8
  end
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.0
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 00:00:00.000000000 Z
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