Sha256: f4a1171f435b46081db062597ff6e04f26e830146313a46e11e777b835046dee

Contents?: true

Size: 1.13 KB

Versions: 51

Compression:

Stored size: 1.13 KB

Contents

# Copyright 2010 by le1t0@github. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :rvm do
      
      set :rvm_rubies, %w(ruby-1.8.7-p160) # First ruby will be set as default if rvm_default_ruby is nil or empty
      set :rvm_default_ruby, nil
      
      desc "Install Rvm"
      task :install do
        run <<-EOF
        version=$(curl http://rvm.beginrescueend.com/releases/stable-version.txt) ;
        mkdir -p ~/.rvm/src/ && curl -O http://rvm.beginrescueend.com/releases/rvm-${version}.tar.gz | tar zxf - && cd rvm-${version} && ./install
        
EOF
      end
      
      desc "Install rubies"
      task :install_rubies do
        rvm_rubies.each_with_index do |ruby, i|
          run "rvm install #{ruby}"
          run "rvm --default #{ruby}" if i == 0 && (rvm_default_ruby.nil? || rvm_default_ruby.empty?)
        end
        if !(rvm_default_ruby.nil? || rvm_default_ruby.empty?)
          set_default = rvm_default_ruby == "system" ? rvm_default_ruby : "--default #{rvm_default_ruby}"
          run "rvm #{set_default}"
        end
      end
      
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
le1t0-deprec-2.1.6.057 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.056 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.055 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.054 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.053 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.052 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.051 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.050 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.049 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.048 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.047 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.046 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.045 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.044 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.043 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.042 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.041 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.040 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.039 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.038 lib/deprec/recipes/rvm.rb