ruby-lsp-rspec
ruby-lsp-rspec copied to clipboard
Using with docker
Hello
is it possible to run in a project with docker?
In my case I'd need just to add this to the beginning of command:
dc-test run --rm api bin/rspec {spec_file.rb}
FYI I opened https://github.com/st0012/ruby-lsp-rspec/pull/57 as one possible approach to handling this issue
👋 FYI #57 was merged and helps with the Docker story in a few ways.
First, some clarification on the Ruby LSP supported container development setup (dev containers).
Running the Ruby LSP extension within the dev container will help with issues where the spec path given to rspec is the path on the host machine rather than within the container.
Second, this change adds support for customizing the rspec command.
If you have a unique setup where running Ruby LSP extension within the dev container is not enough, you can further customize.
For example, I have one project I work on where I need to do the following to make sure I'm using the right rspec executable within a container (it's a long story):
"rubyLsp.addonSettings": {
"Ruby LSP RSpec": {
"debug": true,
"rspecCommand": "cd /usr/src/app && rspec"
}
},