Add test results.
[tails/vicves.git] / features / .rvmrc
blobc03bb282cc2b41fc6f89a1fa6caec3a7998380ee
1 #!/usr/bin/env bash
3 # This is an RVM Project .rvmrc file, used to automatically load the ruby
4 # development environment upon cd'ing into the directory
6 # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7 # Only full ruby name is supported here, for short names use:
8 # echo "rvm use jruby" > .rvmrc
9 environment_id="jruby-1.6.8"
11 # Uncomment the following lines if you want to verify rvm version per project
12 # rvmrc_rvm_version="1.14.1 ()" # 1.10.1 seams as a safe start
13 # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14 # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15 # return 1
16 # }
18 # Uncomment following line if you want options to be set only for given project.
19 PROJECT_JRUBY_OPTS=( --1.9 )
20 # The variable PROJECT_JRUBY_OPTS requires the following to be run in shell:
21 # chmod +x ${rvm_path}/hooks/after_use_jruby_opts
23 # First we attempt to load the desired environment directly from the environment
24 # file. This is very fast and efficient compared to running through the entire
25 # CLI and selector. If you want feedback on which environment was used then
26 # insert the word 'use' after --create as this triggers verbose mode.
27 if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
28 && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
29 then
30 \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
31 [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
32 \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
33 if [[ $- == *i* ]] # check for interactive shells
34 then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
35 else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
37 else
38 # If the environment file has not yet been created, use the RVM CLI to select.
39 rvm --create use "$environment_id" || {
40 echo "Failed to create RVM environment '${environment_id}'."
41 return 1