Also, because I'm quite new to cap3 as well I might be missing the option
switch that allows you to define a setting on the command line. --help
though does not give any indication to it's existence.
No, you're not missing anything. Rather than a broad discussion about
settings on the command line, I'd rather see us solve the underlying
problem, which appears to be "I need different settings when I run Cap"
which implies that maybe more than one stage is in order, or a setup task
which prepares the environment, i.e:
cap production mysetup_a deploy
Where mysetup_a is a version controlled task definition which sets up what
you need (in exactly the same way that `production` is a task which sets up
what deploy needs.)
Issues to discuss problems, and solutions welcome at GH.
Lee Hambley
--
http://lee.hambley.name/
+49 (0) 170 298 5667
On 16 October 2013 22:47, Vassilis Rizopoulos <[email protected]>wrote:
> There are settings.
>
> There's the set, fetch pair which works nice
>
> set :setting, "value"
> fetch(:setting,"default value")
>
> I'd put that stuff in the deploy.rb and use environment variables to
> override.
>
> A neat way to override would be
>
> set :setting,ENV['VAR']
>
> fetch (:setting,"Default value")
>
> Unfortunately fetch will return nil as :setting is defined, even though it
> is nil. Grrr, I'm so hooked on the NullObject pattern that I don't like to
> see nils anymore.
> @Lee do you think it would be a good idea to have a fetch!() that returns
> the default value if key exists or value==nil?
>
> Also, because I'm quite new to cap3 as well I might be missing the option
> switch that allows you to define a setting on the command line. --help
> though does not give any indication to it's existence.
> Cheers,
> V.-
>
> --
> --
> * 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.