crafterm/sprinkle — Issue #57: Is it possible to reference Capistrano config variables?
Author: sbleon
Created: 2011-12-27 18:55:11+00:00
State: open

Some of my packages need to know where I'm deploying my Rails app to so that they can create directories, write config files, etc. I can't figure out how to refer to Capistrano's "deploy_to" variable from inside my packages.

I can reference "deploy_to" from within the deployment definition as @style.config.fetch(:deploy_to). It also looks like the instance of Deployment (that contains @style) is passed into Package#process (http://rubydoc.info/gems/sprinkle/0.4.2/Sprinkle/Package/Package:process).

Is there a good way (or even a bad way, frankly) to refer to "deploy_to" and other Cap variables?