Hi,
I'm working to upgrade to cap2.  I have some tasks where I would like
to be able to pass values in using "cap my_task -s tag=rel_1-1-6" for
example (FWIW, I am using a variation of the theme proposed by Mike
Clark[1]).

Using cap _1.4.1_ I was able to do this:

rails_tag = configuration.variables[:rails_tag] || 'rel_1-2-3'

but when I execute the task I get and error:
/opt/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/
configuration/variables.rb:122:in `method_missing': undefined local
variable or method `configuration' for #<Capistrano::Configuration:
0x13c9f00> (NameError)

if I change it to:

rails_tag = variables[:rails_tag] || 'rel_1-2-3'

it works as expected.

This was somewhat counter intuitive to me.  Is the preferred method to
access configuration variables simply the 'variables' hash rather than
'configuration.variables'?

Just looking to clarify.

Thanks in advance,
Tom

[1] http://clarkware.com/cgi/blosxom/2007/01/18#ManagingVersionsWithCap


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to