Ruby variable inside shorthand array -
i trying insert variable deploy[:deploy_to]
shorthand array below.
node[:deploy].each |application, deploy| %w[ #{deploy[:deploy_to]}/current/cache #{deploy[:deploy_to]}/current/public/projects_icons ].each |path| directory path user deploy[:user] group deploy[:group] mode "0777" end end end
how can this?
%w
supports interpolation:
%w[ #{deploy[:deploy_to]}/current/cache #{deploy[:deploy_to]}/current/public/projects_icons ].each |path| directory path user deploy[:user] group deploy[:group] mode "0777" end end
Comments
Post a Comment