Sha256: 4c1e41fe8ab108e51b58e7d5d3edbc7c2a9f810ec54a78933406dafb50961d9f
Contents?: true
Size: 1.62 KB
Versions: 2
Compression:
Stored size: 1.62 KB
Contents
###################################################################### # RVM CHECKS # ###################################################################### Capistrano::Configuration.instance(:must_exist).load do extend ChickenSoup namespace :capabilities do namespace :variable do namespace :check do desc <<-DESC [internal] Checks to see if all necessary RVM variables have been set up. DESC task :rvm do required_variables = [ :rvmrc_file, :ruby_version, :ruby_gemset, :full_ruby_environment_string, ] verify_variables(required_variables) end end end namespace :deployment do namespace :check do task :rvm do abort "Could not find an .rvmrc file at #{rvmrc_file}. To use the RVM capability, you must have a valid local .rvmrc file." unless File.exist?(rvmrc_file) rvmrc_file_contents = capture("cat #{current_path}/.rvmrc", :roles => :app) set :current_ruby_environment_string, rvmrc_file_contents.match(ChickenSoup::RVM_INFO_FORMAT)[1] unless ruby_version_update_pending abort "'#{full_ruby_environment_string}' does not match the version currently installed on the server (#{current_ruby_environment_string}). Please run 'cap <environment> ruby:update deploy:subzero' if you would like to upgrade your Ruby version prior to deploying." unless current_ruby_environment_string == full_ruby_environment_string end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chicken_soup-0.6.1 | lib/chicken_soup/capabilities/rvm/rvm-checks.rb |
chicken_soup-0.6.0 | lib/chicken_soup/capabilities/rvm/rvm-checks.rb |