lib/negroku/tasks/rbenv.rake in negroku-2.0.3 vs lib/negroku/tasks/rbenv.rake in negroku-2.1.0

- old
+ new

@@ -15,16 +15,10 @@ # Set the path to rbenv set :rbenv_path, "/home/deploy/.rbenv" end end -namespace :env do - desc 'Env variables changed' - task :changed do - end -end - namespace :rbenv do namespace :vars do desc "Show current environmental variables" task :show do on release_roles :app do @@ -32,20 +26,20 @@ execute :rbenv, 'vars' end end end - desc "Add environmental variables in the form VAR=value" - task :add, [:variable] => 'deploy:check:directories' do |t, args| + desc "Sets environmental variables in the form VAR=value" + task :set, [:variable] => 'deploy:check:directories' do |t, args| vars = [args.variable] + args.extras on release_roles :app do within shared_path do vars.compact.each do |var| key, value = var.split('=') - cmd = build_add_var_cmd("#{shared_path}/.rbenv-vars", key, value) + cmd = build_set_var_cmd("#{shared_path}/.rbenv-vars", key, value) execute cmd end end if test "[ -d #{current_path} ]" @@ -53,11 +47,11 @@ end end end - desc "Remove environmental variable" - task :remove, [:key] do |t, args| + desc "Unset environmental variable" + task :unset, [:key] do |t, args| on release_roles :app do within shared_path do execute :sed, "-i", "/^#{args[:key]}=/d", ".rbenv-vars" end