Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 43 lines (36 sloc) 1.379 kb
4c2eefc Wayne E. Seguin Added rvmrc, after_deploy.
wayneeseguin authored
1 #!/usr/bin/env bash
2
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
3 # This is an RVM Project .rvmrc file, used to automatically load the ruby
4 # development environment upon cd'ing into the directory
67632f1 Wayne E. Seguin ruby-1.9.1-p378
wayneeseguin authored
5
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
6 # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
7 environment_id="ruby-1.9.2-p290@rvm-site"
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
8
9 #
10 # First we attempt to load the desired environment directly from the environment
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
11 # file. This is very fast and efficient compared to running through the entire
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
12 # CLI and selector. If you want feedback on which environment was used then
13 # insert the word 'use' after --create as this triggers verbose mode.
14 #
15 if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
16 && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
17 then
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
18 \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
19
20 if [[ -s ".rvm/hooks/after_use" ]]
21 then
22 . ".rvm/hooks/after_use"
23 fi
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
24 else
25 # If the environment file has not yet been created, use the RVM CLI to select.
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
26 if ! rvm --create "$environment_id"
27 then
28 echo "Failed to create RVM environment '$environment_id'."
29 fi
2ab7943 Wayne E. Seguin Updated gems. Thank you Nicholas Stowe.
wayneeseguin authored
30 fi
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
31
32 #
33 # If you use an RVM gemset file to install a list of gems (*.gems), you can have
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
34 # it be automatically loaded. Uncomment the following and adjust the filename if
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
35 # necessary.
36 #
e926df7 Wayne E. Seguin Gems gems everywhere and not a one to sell...
wayneeseguin authored
37 filename=".gems"
38 if [[ -s "$filename" ]]
39 then
40 rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
41 fi
66b8ebe Wayne E. Seguin Thank you Jochen Hartz!
wayneeseguin authored
42
Something went wrong with that request. Please try again.