-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to customize the rspec command. #8
Conversation
This is needed because people might want to run rspec using foreman or docker like `foreman run bundle exec rspec --color`
I just found out that we can overwrite any settings per project using the |
@@ -94,6 +95,10 @@ function bundleRspecLastExecuted() { | |||
} | |||
} | |||
|
|||
function getRSpecCommand(): string { | |||
return vscode.workspace.getConfiguration().get(SETTINGS_RSPEC_COMMAND_KEY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasprag if configuration is empty or not exists? we should be return default value "bundle exec rspec --color" right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, I did that in my first version, but eventually I saw that there is an option to set the default in the configuration file so I did it here.
Docs: https://code.visualstudio.com/api/references/contribution-points#contributes.configuration
@@ -94,6 +95,10 @@ function bundleRspecLastExecuted() { | |||
} | |||
} | |||
|
|||
function getRSpecCommand(): string { | |||
return vscode.workspace.getConfiguration().get(SETTINGS_RSPEC_COMMAND_KEY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return vscode.workspace.getConfiguration().get(SETTINGS_RSPEC_COMMAND_KEY); | |
let configCommand = vscode.workspace | |
.getConfiguration() | |
.get(SETTINGS_RSPEC_COMMAND_KEY); | |
return configCommand || "bundle exec rspec --color"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't need this based on my comment above, thanks =)
This is exactly what I was looking for, thanks both for all your efforts! Can't wait to give this a go as we run our projects from inside Docker and so need to configure the command too <3 |
This is needed because people might want to run rspec using
foreman or docker like
foreman run bundle exec rspec --color
Hi 👋
Thanks for building this great extension. I was using it and I felt the need to customize the rspec command to prepend
foreman
. I've seen in plugins for other editors that they just let the user be able to customize the entire command so I did exactly that.As the updated readme says the user can customize the rspec command using the vscode settings like:
and the default is
bundle exec rspec --color
Maybe in the future we can update the rspec command based on projects somehow.
Thanks for reviewing @thadeu =)