Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"Ruby LSP Shoulda Context": {
"enabled": true
}
}
},
"rubyLsp.featureFlags": { "fullTestDiscovery": true }
}
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ group :development do
gem "pry"
gem "sorbet-static-and-runtime"
gem "tapioca", require: false
gem "ruby-lsp", "~> 0.23.15"
gem "ruby-lsp", "~> 0.23.20"
end
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GEM
prism (~> 1.0)
rbs (>= 3.4.4)
sorbet-runtime (>= 0.5.9204)
rbs (3.9.2)
rbs (3.9.3)
logger
rdoc (6.13.1)
psych (>= 4.0.0)
Expand All @@ -83,7 +83,7 @@ GEM
rubocop (~> 1.62)
rubocop-sorbet (0.10.0)
rubocop (>= 1)
ruby-lsp (0.23.15)
ruby-lsp (0.23.20)
language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0)
rbs (>= 3, < 4)
Expand Down Expand Up @@ -137,7 +137,7 @@ DEPENDENCIES
rubocop-rake (~> 0.6.0)
rubocop-shopify (~> 2.14)
rubocop-sorbet (~> 0.7)
ruby-lsp (~> 0.23.15)
ruby-lsp (~> 0.23.20)
ruby-lsp-shoulda-context!
shoulda-context (~> 2.0)
sorbet-static-and-runtime
Expand Down
30 changes: 24 additions & 6 deletions lib/ruby_lsp/ruby-lsp-shoulda-context/addon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
require "ruby_lsp/addon"
require "ruby_lsp/internal"

require_relative "code_lens"
require_relative "../shoulda_context/version"
require_relative "listeners/test_discovery"

RubyLsp::Addon.depend_on_ruby_lsp!("~> 0.23.0")
RubyLsp::Addon.depend_on_ruby_lsp!("~> 0.23.17")

module RubyLsp
module ShouldaContext
Expand Down Expand Up @@ -41,13 +41,31 @@ def name

sig do
override.params(
response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::CodeLens],
uri: URI::Generic,
response_builder: ResponseBuilders::TestCollection,
dispatcher: Prism::Dispatcher,
uri: URI::Generic,
).void
end
def create_code_lens_listener(response_builder, uri, dispatcher)
CodeLens.new(response_builder, uri, dispatcher, T.must(@global_state), enabled: @enabled)
def create_discover_tests_listener(response_builder, dispatcher, uri)
global_state = @global_state
return unless global_state
return unless @enabled

ShouldaTestStyle.new(
response_builder,
global_state,
dispatcher,
uri,
)
end

sig do
params(
items: T::Array[T::Hash[String, T.untyped]],
).returns(T::Array[String])
end
def resolve_test_commands(items)
ShouldaTestStyle.resolve_test_commands(items)
end

sig { override.returns(String) }
Expand Down
213 changes: 0 additions & 213 deletions lib/ruby_lsp/ruby-lsp-shoulda-context/code_lens.rb

This file was deleted.

Loading
Loading