1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

deprecated uppercase variable names

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2007-02-24 20:06:45 +00:00
parent aa4d8ffcd3
commit f12c534f15
2 changed files with 3 additions and 0 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Deprecated upper-cased variables [Jamis Buck]
* Make sure Actor#get does not close the SFTP channel (so subsequent SFTP operations work) [Dov Murik]
* Add :env option to 'run' (and friends) so that you can specify environment variables to be injected into the new process' environment [Mathieu Lajugie]

View file

@ -68,6 +68,7 @@ module Capistrano
# actor. This is to allow uppercase "variables" to be set and referenced
# in recipes.
if variable.to_s[0].between?(?A, ?Z)
warn "[DEPRECATION] You setting an upper-cased variable, `#{variable}'. Variables should start with a lower-case letter. Support for upper-cased variables will be removed in version 2."
klass = @actor.metaclass
klass.send(:remove_const, variable) if klass.const_defined?(variable)
klass.const_set(variable, value)