execute a rubymine run configuration from rake task?

Is there any way to execute a RubyMine run/debug configuration from a rake task?  For example, I have a node.js run configuration which starts a server in a particular test mode.  I have rake tasks which run various tests.  I'd like to be able to run the node.js run configuration before the test tasks to fully automated the procedure.

Only options I can see thus far are abandoning the run configurations and doing everything from rake or duplicating the logic.

2 comments

If you just need to run the command analogous to the RubyMine configuration, I've noticed that the RubyMine command line shows up in the console.  You may get what you want by duplicating that command (modulo correct PATH, et al.) in your rake task.  I'm pretty sure there's not too much hidden magic to get it working.  For instance, when you change some options in the configuration, you can see the changes in the executed command.

If you need it to dynamically change (according to changes in configuration settings), that would be different.

0

This is helpful in helping me ensure the command I use in my rake task matches what is being done when the run configuration is
used (thanks for pointing that out).

However, it isn't exactly what I was looking for as it doesn't solve the duplication of information problem.  That is, if I modify my run configuration I would still have to manually update the rake task as well (with whatever the modified result is shown in the console window).   What I was hoping for was some way to invoke a rubymine run configuration by name (or some other identifier) from within a rake task so there is a single source of truth.

0

Please sign in to leave a comment.