Something weird was happening with your Capistrano 2 setup, somewhere along
the line someone was appending the stage pseudo variable to the
deploy_tovariable.

In Capistrano 3 (as with Capistrano 2) you can achieve the same bahaviour
with:

set :deploy_to, ->() { "/var/www/my_app" + fetch(:stage) }


​The documentation covering this for Capistrano 2 can be found
here<https://github.com/capistrano/capistrano/wiki/2.x-DSL-Configuration-Variables-Set>.
In Capistrano 3 it's not explicitly documented as the generated example
templates ​include some examples, and it's a neat trick of Ruby more than
of Capistrano. The
proc/lambda<http://www.robertsosinski.com/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/>causes
execution to be delayed until the block of code contained therein is
called. When using fetch() in Capistrano (2 and 3) the result is checked to
see if it responds to
#call()<http://www.ruby-doc.org/core-2.1.0/Proc.html#method-i-call>,
if it does the process is repeated and it doesn't respond to call anymore,
there's an open issue there being tracked here:
https://github.com/capistrano/capistrano/pull/872.

​So, to make a long story short, no behaviour changed, but you've
overlooked a bit of your old Capistrano 2 config that might have been setup
by someone else, or might have syntax you didn't recognise.​


Lee Hambley
--
http://lee.hambley.name/
+49 (0) 170 298 5667


On 6 February 2014 13:18, Silumesii Maboshe <[email protected]
> wrote:

> Hello!
>
> I'm experimenting the Capistrano 3 with the Bedrock WordPress Stack (
> http://roots.io/wordpress-stack/).
>
> When using Rails, Capistrano 2 and the multi-stage extension , deploy_to
> would deploy an application to the deploy_to path with the stage.
> For example:
> set :deploy_to, "/var/www/my_app"
> Deploys to:
> /var/www/my_app/STAGE_NAME
>
> With Capistrano 3 and Bedrock, it seems deploy to does not append the
> stage name.
> For example:
> set :deploy_to, "/var/www/my_app"
> Deploys to:
> /var/www/my_app
>
> I got used to having the stage name appended in Capistrano 2 and could not
> help but notice it seems to be missing in Capistrano 3. Is this the
> expected behaviour in Capistrano 3?
>
> Thank you,
>
> Silumesii
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/21379555-6a75-437e-b42b-2f8ccb8f017d%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLX%2Bq7%3DhbV2onUgDGiuGsjYdJ5hJyuWRyw4Hypjea5PomA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to