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.017 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.016 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.015 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.014 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.013 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.012 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.011 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.010 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.009 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.008 lib/deprec/recipes/rvm.rb
le1t0-deprec-2.1.6.007 lib/deprec/recipes/rvm.rb