Sha256: 38bea3c8044c6fb4c4b62c9cfbd95aabb6ce18fd5d4100fea188f5cfe2ef8088

Contents?: true

Size: 738 Bytes

Versions: 11

Compression:

Stored size: 738 Bytes

Contents

# rbenv vars tasks

namespace :rbenv do
  namespace :vars do
    desc "Show current rbenv vars"
    task :show, :roles => :app do
      run "sh -c 'cd #{shared_path} && cat .rbenv-vars'"
    end

    desc "Add rbenv vars"
    task :add, :roles => :app do
      run "if awk < #{shared_path}/.rbenv-vars -F= '{print $1}' | grep --quiet #{key}; then sed -i 's/^#{key}=.*/#{key}=#{value}/g' #{shared_path}/.rbenv-vars; else echo '#{key}=#{value}' >> #{shared_path}/.rbenv-vars; fi"
    end

    after "deploy:finalize_update", "rbenv:vars:symlink"
    desc "Symlink rbenv-vars file into the current release"
    task :symlink, :roles => :app do
      run "ln -nfs '#{shared_path}/.rbenv-vars' '#{release_path}/.rbenv-vars'"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
negroku-1.1.11 lib/negroku/tasks/rbenv.rb
negroku-1.1.10 lib/negroku/tasks/rbenv.rb
negroku-1.1.9 lib/negroku/tasks/rbenv.rb
negroku-1.1.8 lib/negroku/tasks/rbenv.rb
negroku-1.1.7 lib/negroku/tasks/rbenv.rb
negroku-1.1.6 lib/negroku/tasks/rbenv.rb
negroku-1.1.5 lib/negroku/tasks/rbenv.rb
negroku-1.1.4 lib/negroku/tasks/rbenv.rb
negroku-1.1.3 lib/negroku/tasks/rbenv.rb
negroku-1.1.2 lib/negroku/tasks/rbenv.rb
negroku-1.1.1 lib/negroku/tasks/rbenv.rb