My inclination is to not address it. It's better we use the methods and
attributed as they were designed creating aliases in code just makes for
tougher refactors.
Keep in mind it's not failing silently. You are editing an arbitrary hash. You
could have just as easily said :goober => true and somehere else :only => {
:goober => true }
Some things in the options hash have meaning to capistrano. The rest is for you
to extend the framework.
To say throw an error with an options hash if it's not understood would create
a very shallow and inflexible framework. You should know those options hash may
be tossed around going 3 to 5 levels deep. Level 3 may not understand :goober.
But the 5th level may.
On Jan 29, 2013, at 6:31 PM, Jonathan Rochkind <[email protected]> wrote:
> Have you in particular done the :role instead of :roles typo many times?
>
> If this is common, should we patch to introduce :role as a synonym for
> :roles? Especially since if you get it wrong, it just fails silently with no
> hints as to why.
> From: [email protected] [[email protected]] on behalf of
> Donovan Bray [[email protected]]
> Sent: Tuesday, January 29, 2013 8:02 PM
> To: [email protected]
> Subject: Re: [capistrano] tasks being executed on unexpected servers
>
> The school of hard knocks; leaves marks.... I've done that to myself many
> times.
>
> On Tue, Jan 29, 2013 at 7:12 AM, Jonathan Rochkind <[email protected]> wrote:
> Aha, thank you!
>
>
>
> On 1/28/2013 10:54 PM, Donovan Bray wrote:
> It should be:
>
> task :deploy, :roles .....
>
> Note the 's'
>
> :roles => :app
> :roles => [:app]
> :roles => [:app, :web]
>
> Are all valid on a task object
>
>
> On Jan 28, 2013, at 1:05 PM, Jonathan Rochkind <[email protected]> wrote:
>
> Okay, I'm not sure if I've confused about the basic way cap roles work, or
> something else is going on, or what.
>
> I have two servers, defined like:
>
> server "main.example.org", :app, :web, :db, :primary => true
>
> role :my_custom_role, "special.example.org"
>
>
> Then I have a custom task, defined like:
>
> namespace :my_custom_thing do
> task :deploy, :role => :app do
> # do some things, including
> top.upload(some_file, some_destination_path)
> end
> end
>
> I had thought that if I ran "cap my_custom_thing:deploy", it would only
> execute that task on servers with role app, meaning only try to run that
> manual 'upload' to main.example.org (which has role :app), and not upload it
> to special.example.org (which does not have role :app).
>
> Yet, when I role it... it tries to upload the file to BOTH main.example.org,
> and special.example.org.
>
> Am I fundamentally misunderstanding how this stuff works? Or from what I've
> described, ought it to be only doing the upload to the single server called
> main.example.org with role :app ?
>
> --
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
> --- You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group, send email to
> [email protected].
> 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 post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
> --- 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].
>
> 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 post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
> ---
> 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].
> 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 post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
> ---
> 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].
> 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 post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en
---
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].
For more options, visit https://groups.google.com/groups/opt_out.