I’ve noticed Rake has been gaining some traction within the .net community as of late, or at least within a certain segment of that community.
We’re currently using Rake to automate the great bulk of an entire deployment pipeline here at VersionOne, and I know of a few teams at Quick Solutions that are doing similar things.
I believe Rake is a great tool for automating intensive processes and/or tasks and also find it to be great for handling some of the more mundane tasks we do on a daily basis. I spend a fair amount of each working day in a terminal window – running various SCM commands, compiling code, running specs, etc.
More of those trivial tasks are being replaced by simple Rake tasks. For example, I’ve started adding a Rake task something like the following to nearly every code base I work on
1: desc "Launch the solution in Visual Studio"
2: task :sln do
3: Thread.new do
4: system 'devenv #{@props[:solution_path]}'
5: end
6: end
This is a pretty simple task:
- spins up a new thread within a block
- then opens a new subshell via the
system command
- launches Visual Studio (via
devenv) passing the path to the solution file.
As long as I have Ruby and the Rake gem installed I can execute the task from anywhere within my project structure and have Visual Studio open the solution.
It may seem incredibly lazy, but it comes in very hand if you like to keep your fingers on the home row. Not to mention the time saver it is on No Mouse Thursdays!
Full Disclosure: I didn’t come up with this little time saver on my own. I was inspired & then stole it from Aaron Jensen, though I’m sure he was motivated by a similar level of laziness. :)
