I'm new to Capistrano and Ruby/Rake as well.
Since I work locally in Windows, I'm having quite a hard time now and then.. I'm running capistrano-wpcli to push and pull my Wordpress database.
The script do use gunzip in the process, which works fine in Unix, but not in Windows. I found that I can configure the SSHkit by adding this line:
SSHKit.config.command_map[:gunzip] = "gzip -d"
That works fine if I only pull the database, but when I'm pushing, I still want gunzip to be executed on the remote host.
Can I somehow hook into cap wpcli:db:pull to set the config only if that command is run, or if the command is being executed on localhost?