Sha256: 1c0c78d4d354507246edc3263e4f139a5791762904f0368ce82f2570b861f532
Contents?: true
Size: 1.75 KB
Versions: 5
Compression:
Stored size: 1.75 KB
Contents
require 'ostruct' module Capstrap module RVM RUBIES = [ OpenStruct.new(:ruby => "ruby-1.8.7", :title => "MRI 1.8.7"), OpenStruct.new(:ruby => "ruby-1.9.2", :title => "MRI 1.9.2"), OpenStruct.new(:ruby => "ree-1.8.7", :title => "REE 1.8.7"), ] def self.load_into(configuration) configuration.load do namespace :rvm do namespace :install do desc "Installs system-wide rvm from github." task :system_base do unless rvm_installed? run %{bash < <( curl -L http://bit.ly/rvm-install-system-wide )}, :shell => "bash" end end desc "Installs basic rvm/gem/irb configs." task :sugar do run %{bash < <( curl -L http://bit.ly/rvm_sugar )}, :shell => "bash" end RUBIES.each do |r| desc "Installs latest #{r.title} ruby." task r.ruby do unless rvm_installed? apt.install.rvm_depends rvm.install.system_base rvm.install.sugar end unless ruby_installed?(r.ruby) apt.install.mri_depends rvm_run %{#{r.ruby} install} end end end end namespace :default do RUBIES.each do |r| desc "Sets #{r.title} as default ruby." task :"#{r.ruby}" do rvm_run %{#{r.ruby} --default} end end end end end end end end if Capistrano::Configuration.instance Capstrap::RVM.load_into(Capistrano::Configuration.instance) end
Version data entries
5 entries across 5 versions & 1 rubygems