gemrage 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. data/Gemfile +2 -0
  2. data/Gemfile.lock +5 -0
  3. data/VERSION +1 -1
  4. data/gemrage.gemspec +148 -3
  5. data/lib/rubygems/commands/scan_command.rb +77 -4
  6. data/vendor/ruby/1.8/bin/rvm-install +19 -0
  7. data/vendor/ruby/1.8/cache/macaddr-1.0.0.gem +0 -0
  8. data/vendor/ruby/1.8/cache/rvm-1.0.14.gem +0 -0
  9. data/vendor/ruby/1.8/gems/macaddr-1.0.0/README +33 -0
  10. data/vendor/ruby/1.8/gems/macaddr-1.0.0/gemspec.rb +27 -0
  11. data/vendor/ruby/1.8/gems/macaddr-1.0.0/install.rb +210 -0
  12. data/vendor/ruby/1.8/gems/macaddr-1.0.0/lib/macaddr.rb +69 -0
  13. data/vendor/ruby/1.8/gems/rvm-1.0.14/LICENCE +18 -0
  14. data/vendor/ruby/1.8/gems/rvm-1.0.14/README +127 -0
  15. data/vendor/ruby/1.8/gems/rvm-1.0.14/bin/rvm-install +5 -0
  16. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvm +76 -0
  17. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvm-auto-ruby +24 -0
  18. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvm-prompt +204 -0
  19. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvm-shell +35 -0
  20. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvm-update-head +35 -0
  21. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvm-update-latest +27 -0
  22. data/vendor/ruby/1.8/gems/rvm-1.0.14/binscripts/rvmsudo +24 -0
  23. data/vendor/ruby/1.8/gems/rvm-1.0.14/config/db +71 -0
  24. data/vendor/ruby/1.8/gems/rvm-1.0.14/config/known +55 -0
  25. data/vendor/ruby/1.8/gems/rvm-1.0.14/config/md5 +87 -0
  26. data/vendor/ruby/1.8/gems/rvm-1.0.14/contrib/gemset_snapshot +25 -0
  27. data/vendor/ruby/1.8/gems/rvm-1.0.14/contrib/install-system-wide +191 -0
  28. data/vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r +44 -0
  29. data/vendor/ruby/1.8/gems/rvm-1.0.14/examples/rvmrc +47 -0
  30. data/vendor/ruby/1.8/gems/rvm-1.0.14/gemsets/default.gems +1 -0
  31. data/vendor/ruby/1.8/gems/rvm-1.0.14/gemsets/global.gems +1 -0
  32. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/alias +46 -0
  33. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/benchmark +17 -0
  34. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/cleanup +23 -0
  35. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/debug +8 -0
  36. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/disk-usage +15 -0
  37. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/docs +22 -0
  38. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/exec +33 -0
  39. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/fetch +5 -0
  40. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/gem +0 -0
  41. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/gemdir +0 -0
  42. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/gemset +0 -0
  43. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/implode +0 -0
  44. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/info +64 -0
  45. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/install +0 -0
  46. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/list +0 -0
  47. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/migrate +15 -0
  48. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/monitor +0 -0
  49. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/notes +0 -0
  50. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/package +0 -0
  51. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/rake +14 -0
  52. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/remove +0 -0
  53. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/repair +23 -0
  54. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/reset +0 -0
  55. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/ruby +84 -0
  56. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/rubygems +11 -0
  57. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/rvmrc +34 -0
  58. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/snapshot +15 -0
  59. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/specs +0 -0
  60. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/srcdir +0 -0
  61. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/tests +0 -0
  62. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/tools +22 -0
  63. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/uninstall +0 -0
  64. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/update +0 -0
  65. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/upgrade +18 -0
  66. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/use +0 -0
  67. data/vendor/ruby/1.8/gems/rvm-1.0.14/help/wrapper +41 -0
  68. data/vendor/ruby/1.8/gems/rvm-1.0.14/install +631 -0
  69. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/VERSION.yml +4 -0
  70. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/capistrano.rb +45 -0
  71. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/alias.rb +69 -0
  72. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/cleanup.rb +54 -0
  73. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/configuration.rb +60 -0
  74. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/env.rb +52 -0
  75. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/gemset.rb +222 -0
  76. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/info.rb +13 -0
  77. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/list.rb +124 -0
  78. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/rubies.rb +50 -0
  79. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/sets.rb +123 -0
  80. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/tools.rb +68 -0
  81. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/utility.rb +173 -0
  82. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment/wrapper.rb +23 -0
  83. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/environment.rb +64 -0
  84. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/errors.rb +31 -0
  85. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/install_command_dumper.rb +51 -0
  86. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell/abstract_wrapper.rb +145 -0
  87. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell/calculate_rvm_path.sh +26 -0
  88. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell/result.rb +42 -0
  89. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell/shell_wrapper.sh +10 -0
  90. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell/single_shot_wrapper.rb +56 -0
  91. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell/utility.rb +37 -0
  92. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/shell.rb +25 -0
  93. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm/version.rb +19 -0
  94. data/vendor/ruby/1.8/gems/rvm-1.0.14/lib/rvm.rb +156 -0
  95. data/vendor/ruby/1.8/gems/rvm-1.0.14/man/man1/rvm.1 +385 -0
  96. data/vendor/ruby/1.8/gems/rvm-1.0.14/man/man1/rvm.1.gz +0 -0
  97. data/vendor/ruby/1.8/gems/rvm-1.0.14/rvm.gemspec +184 -0
  98. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/alias +225 -0
  99. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/aliases +4 -0
  100. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/array +32 -0
  101. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/base +49 -0
  102. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/cd +87 -0
  103. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/cleanup +58 -0
  104. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/cli +781 -0
  105. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color +49 -0
  106. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/completion +151 -0
  107. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/db +87 -0
  108. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/default +64 -0
  109. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/disk-usage +60 -0
  110. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/docs +115 -0
  111. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env +46 -0
  112. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/environment-convertor +74 -0
  113. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/fetch +229 -0
  114. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/gemsets +950 -0
  115. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/hash +37 -0
  116. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/help +46 -0
  117. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/hook +23 -0
  118. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/info +214 -0
  119. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/initialize +29 -0
  120. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/install +631 -0
  121. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/irbrc +9 -0
  122. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/irbrc.rb +63 -0
  123. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/list +315 -0
  124. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/log +38 -0
  125. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/maglev +193 -0
  126. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/manage +2094 -0
  127. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/match +6 -0
  128. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/md5 +22 -0
  129. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/migrate +175 -0
  130. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/monitor +105 -0
  131. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/notes +121 -0
  132. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/override_gem +14 -0
  133. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/package +301 -0
  134. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/patches +64 -0
  135. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/patchsets +87 -0
  136. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/repair +199 -0
  137. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/rubygems +157 -0
  138. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/rvm +120 -0
  139. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/rvm-install +631 -0
  140. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/selector +818 -0
  141. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/set +301 -0
  142. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/snapshot +262 -0
  143. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/tools +58 -0
  144. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/update +631 -0
  145. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/upgrade +144 -0
  146. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/utility +1557 -0
  147. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/version +17 -0
  148. data/vendor/ruby/1.8/gems/rvm-1.0.14/scripts/wrapper +210 -0
  149. data/vendor/ruby/1.8/specifications/macaddr-1.0.0.gemspec +27 -0
  150. data/vendor/ruby/1.8/specifications/rvm-1.0.14.gemspec +42 -0
  151. metadata +149 -4
@@ -0,0 +1,781 @@
1
+ #!/usr/bin/env bash
2
+
3
+ __rvm_usage() { ${PAGER:-less} "${rvm_path:-$HOME/.rvm}/README" ; }
4
+
5
+ __rvm_run_script()
6
+ {
7
+ local rvm_script_name="${1:-"$rvm_action"}"
8
+
9
+ eval "$rvm_path/scripts/$rvm_script_name $rvm_ruby_args"
10
+
11
+ return $?
12
+ }
13
+
14
+ __rvm_parse_args()
15
+ {
16
+ # TODO:
17
+ # Make this more robust '__rvm_history' so that it stores *unique* rvm commands.
18
+ # Otherwise this file gets big rather fast.
19
+ #echo "$@" >> $HOME/.rvm_history
20
+
21
+ if echo "$@" | \grep -q 'trace' ; then echo "$@" ; __rvm_version ; fi
22
+
23
+ rvm_action="${rvm_action:-""}"
24
+
25
+ export rvm_ruby_string
26
+
27
+ rvm_parse_break=0
28
+
29
+ while [[ -n "$next_token" ]] ; do
30
+
31
+ rvm_token="$next_token"
32
+
33
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
34
+
35
+ case "$rvm_token" in
36
+ fetch|version|srcdir|reset|debug|reload|update|monitor|notes|implode|seppuku|question|answer|env)
37
+ rvm_action=$rvm_token
38
+ ;;
39
+
40
+ package)
41
+ rvm_action="$rvm_token"
42
+ if [[ "$next_token" = "--only-path" ]]; then
43
+ shift; rvm_only_path_flag=1
44
+ fi
45
+ rvm_ruby_args="$next_token $*"
46
+ rvm_parse_break=1
47
+ ;;
48
+
49
+ use)
50
+ rvm_action="$rvm_token"
51
+ rvm_verbose_flag=1
52
+ if [[ "ruby" = "$next_token" ]] ; then
53
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
54
+ fi
55
+ ;;
56
+
57
+ install|uninstall)
58
+ export ${rvm_token}_flag=1
59
+ rvm_action=$rvm_token
60
+ export rvm_install_arguments="$(__rvm_quote_args_with_shift 1 "$@")"
61
+ ;;
62
+
63
+ rm|remove)
64
+ rvm_action="remove"
65
+ rvm_remove_flag=1
66
+ ;;
67
+
68
+ # Can likely remove this due to the *) case
69
+ jruby*|ree*|macruby*|rbx*|rubinius*|mput*|shyouhei*|ironruby*|default*|maglev*|all)
70
+ if [[ "rubinius" = "$rvm_token" ]] ; then rvm_token="rbx"; fi
71
+ rvm_ruby_interpreter="$rvm_token"
72
+ rvm_ruby_string="$rvm_token"
73
+ rvm_ruby_strings="$rvm_token"
74
+ rvm_action="${rvm_action:-use}"
75
+ if "$rvm_path/scripts"/match "$next_token" "^[0-9]\.[0-9]" ; then
76
+ rvm_ruby_version=$next_token
77
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
78
+ fi
79
+ ;;
80
+
81
+ default)
82
+
83
+ ;;
84
+
85
+ gemset)
86
+ rvm_action=$rvm_token
87
+
88
+ rvm_ruby_gem_home="${GEM_HOME:-""}"
89
+
90
+ if [[ -z "$next_token" ]] ; then
91
+ rvm_ruby_args="help"
92
+
93
+ elif [[ "clear" = "$next_token" ]] ; then
94
+ __rvm_gemset_clear
95
+ rvm_ruby_args="clear"
96
+
97
+ elif [[ "use" = "$next_token" ]] ; then
98
+ rvm_use_flag=1
99
+ rvm_ruby_args="$next_token $@"
100
+ rvm_gemset_name="$next_token"
101
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
102
+
103
+ if [[ -n "$next_token" ]] ; then rvm_gemset_name="$next_token" ; else rvm_gemset_name="" ; fi
104
+
105
+ if echo $rvm_gemset_name | \grep -q ${rvm_gemset_separator:-"@"} ; then
106
+ rvm_ruby_string=$(echo $rvm_gemset_name | sed -e 's/\(.*\)'"${rvm_gemset_separator:-"@"}"'.*/\1/')
107
+ rvm_gemset_name=$(echo $rvm_gemset_name | sed -e 's/.*'"${rvm_gemset_separator:-"@"}"'\(.*\)/\1/')
108
+
109
+ if [[ "${rvm_ruby_string:-""}" != "${rvm_gemset_name:-""}" ]] ; then
110
+ rvm_ruby_string="$rvm_ruby_string${rvm_gemset_separator:-"@"}$rvm_gemset_name"
111
+ fi
112
+
113
+ rvm_ruby_gem_home="$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}$rvm_gemset_name"
114
+ fi
115
+
116
+ elif [[ "delete" = "$next_token" ]] ; then
117
+ rvm_delete_flag=1
118
+ rvm_ruby_args="$next_token $@"
119
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
120
+ rvm_gemset_name="$next_token"
121
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
122
+
123
+ if echo "$rvm_gemset_name" | \grep -q "${rvm_gemset_separator:-"@"}" ; then
124
+ rvm_ruby_string=$(echo "$rvm_gemset_name" | sed 's/\(.*\)'"${rvm_gemset_separator:-"@"}"'.*/\1/')
125
+ rvm_gemset_name=$(echo "$rvm_gemset_name" | sed 's/.*'"${rvm_gemset_separator:-"@"}"'\(.*\)/\1/')
126
+
127
+ if [[ "$rvm_ruby_string" != "$rvm_gemset_name" ]] ; then
128
+ rvm_ruby_string="$rvm_ruby_string${rvm_gemset_separator:-"@"}$rvm_gemset_name"
129
+ fi
130
+
131
+ rvm_ruby_gem_home="$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}$rvm_gemset_name"
132
+ fi
133
+
134
+ else
135
+ if [[ "${rvm_ruby_string:-""}" != "${rvm_gemset_name:-""}" ]] ; then __rvm_ruby_string ; fi
136
+ rvm_ruby_args="$next_token $@"
137
+ fi
138
+
139
+ rvm_parse_break=1
140
+ ;;
141
+
142
+ gemdir|gempath|gemhome)
143
+ rvm_action=$rvm_token
144
+ rvm_gemdir_flag=1
145
+
146
+ if [[ "system" = "$next_token" ]] ; then
147
+ rvm_system_flag=1
148
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
149
+ fi
150
+
151
+ if [[ "user" = "$next_token" ]] ; then
152
+ rvm_user_flag=1
153
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
154
+ fi
155
+ ;;
156
+
157
+ inspect|list|info|strings)
158
+ rvm_action="$rvm_token"
159
+ rvm_ruby_args="$next_token $@"
160
+ rvm_parse_break=1
161
+ ;;
162
+
163
+ -S)
164
+ rvm_action="ruby"
165
+ rvm_ruby_args="$rvm_token $next_token $(__rvm_quote_args "$@")"
166
+ rvm_parse_break=1
167
+ ;;
168
+
169
+ -e)
170
+ rvm_action="ruby"
171
+ rvm_ruby_args="$rvm_token $next_token $(__rvm_quote_args "$@")"
172
+ rvm_parse_break=1
173
+ ;;
174
+
175
+ docs|alias|rubygems|exec|cleanup|tools|disk-usage|snapshot|repair|migrate|upgrade)
176
+ rvm_action="$rvm_token"
177
+ rvm_ruby_args="$next_token $(__rvm_quote_args "$@")"
178
+ rvm_parse_break=1
179
+ ;;
180
+
181
+ load-rvmrc)
182
+ rvm_action="rvmrc"
183
+ rvm_ruby_args="'load' $next_token $(__rvm_quote_args "$@")"
184
+ rvm_parse_break=1
185
+ ;;
186
+
187
+ rvmrc)
188
+ rvm_action="rvmrc"
189
+ rvm_ruby_args="$next_token $(__rvm_quote_args "$@")"
190
+ rvm_parse_break=1
191
+ ;;
192
+
193
+ do|ruby|rake|gem|rubydo|rakedo|gemdo)
194
+ if [[ "do" = "${rvm_action:-""}" ]] ; then rvm_action="ruby" ; fi
195
+
196
+ rvm_action=${rvm_token//do}
197
+
198
+ if [[ "rake" = "${rvm_action:-""}" || "gem" = "${rvm_action:-""}" || "ruby" = "${rvm_action:-""}" ]] ; then
199
+
200
+ if [[ -z "$next_token" ]] ; then
201
+
202
+ if [[ "gem" = "${rvm_action:-""}" ]] ; then
203
+ rvm_action="error"
204
+ rvm_error_message="'rvm $rvm_action' must be followed by arguments."
205
+ elif [[ "ruby" = "${rvm_action:-""}" ]] ; then
206
+ if echo "${rvm_ruby_strings:-""}" | \grep -q ',' ; then
207
+ rvm_action="ruby"
208
+ rvm_ruby_args=""
209
+ else
210
+ rvm_action="error"
211
+ rvm_error_message="rvm X,Y,Z '$rvm_action' must be followed by arguments."
212
+ fi
213
+ fi
214
+
215
+ elif [[ "-S" = "$next_token" ]] ; then
216
+ rvm_action="ruby"
217
+ rvm_ruby_args="$flag $next_token $(__rvm_quote_args "$@")"
218
+ rvm_parse_break=1
219
+
220
+ elif [[ "-e" = "$next_token" ]] ; then
221
+ rvm_action="ruby"
222
+ rvm_ruby_args="$flag $next_token $(__rvm_quote_args "$@")"
223
+ rvm_parse_break=1
224
+
225
+ else
226
+ rvm_ruby_args="$next_token $@"
227
+ rvm_parse_break=1
228
+ fi
229
+ else
230
+ if "$rvm_path/scripts"/match "$next_token" "^-" ; then
231
+ unset rvm_ruby_strings
232
+
233
+ else
234
+ if "$rvm_path/scripts"/match "$next_token" "^[0-9]" ; then
235
+ rvm_ruby_strings="${1//,/ }"
236
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
237
+ unset rvm_ruby_interpreter
238
+
239
+ else
240
+ case "$next_token" in
241
+
242
+ ruby|rbx|jruby|macruby|ree|rubinius|maglev|mput|shyouhei|ironruby)
243
+ rvm_ruby_strings=$next_token
244
+ rvm_ruby_interpreter=$next_token
245
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
246
+ ;;
247
+
248
+ *)
249
+ unset rvm_ruby_interpreter rvm_ruby_strings
250
+ ;;
251
+ esac
252
+ fi
253
+ fi
254
+ fi
255
+ ;;
256
+
257
+ benchmark|bench)
258
+ rvm_action="benchmark"
259
+ ;;
260
+
261
+ specs|tests)
262
+ rvm_action="rake"
263
+ rvm_ruby_args="${rvm_token/%ss/s}"
264
+ ;;
265
+
266
+ -v|--version)
267
+ if [[ -z "$next_token" ]] ; then
268
+ rvm_action="version"
269
+ else
270
+ rvm_ruby_version="$next_token"
271
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
272
+ fi
273
+ ;;
274
+
275
+ --repository|--repo|--url)
276
+ rvm_ruby_repo_url=$rvm_token
277
+ ;;
278
+
279
+ --ree-options)
280
+ if [[ ! -z "$next_token" ]] ; then
281
+ export rvm_ree_options="${1//,/ }"
282
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
283
+
284
+ else
285
+ rvm_action="error"
286
+ rvm_error_message="--ree-options *must* be followed by... well... options."
287
+ fi
288
+ ;;
289
+
290
+ --patches|--patch)
291
+ rvm_patch_names="$next_token ${rvm_patch_names:-""}"
292
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
293
+ rvm_patch_original_pwd="$PWD"
294
+ ;;
295
+
296
+ --head) rvm_head_flag=1 ;;
297
+
298
+ --bin)
299
+ if [[ "update" = "${rvm_action:-""}" ]] ; then
300
+ rvm_bin_flag=1
301
+ else
302
+ rvm_bin_path="$next_token"
303
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
304
+ fi
305
+ ;;
306
+
307
+ -r|--require)
308
+ if [[ -z "$next_token" ]] ; then
309
+ rvm_action="error"
310
+ rvm_error_message="-r|--require *must* be followed by a library name."
311
+ else
312
+ rvm_ruby_require="$rvm_ruby_require -r$next_token"
313
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
314
+ fi
315
+ ;;
316
+
317
+ --rdoc|--yard)
318
+ rvm_docs_type="$rvm_token"
319
+ rvm_docs_type
320
+ ;;
321
+
322
+ -f|--file)
323
+ rvm_action="ruby"
324
+ rvm_ruby_file="$next_token"
325
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
326
+ ;;
327
+
328
+ system|default)
329
+ rvm_action=${rvm_action:-use}
330
+ rvm_ruby_interpreter="$rvm_token"
331
+ rvm_ruby_string="$rvm_token"
332
+ rvm_ruby_strings="$rvm_token"
333
+ ;;
334
+
335
+ help)
336
+ rvm_action="$rvm_token"
337
+ rvm_ruby_args="$next_token $@"
338
+ rvm_parse_break=1
339
+ ;;
340
+
341
+ --passenger)
342
+ "$rvm_path/scripts/log" "info" \
343
+ "NOTE: If you are using Passenger 3 you no longer need the passenger_ruby,\nuse the wrapper script for your ruby instead (see 'rvm wrapper')"
344
+ rvm_wrapper_name="${rvm_token/--/}"
345
+ ;;
346
+
347
+ --editor)
348
+ rvm_wrapper_name="${rvm_token/--/}"
349
+ ;;
350
+
351
+ --alias)
352
+ if [[ -n "$next_token" ]]; then
353
+ rvm_ruby_aliases="$(echo "${rvm_ruby_aliases//,/ } ${1//,/ }" | __rvm_strip)"
354
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
355
+ fi
356
+ ;;
357
+
358
+ --symlink)
359
+ "$rvm_path/scripts/log" "warn" "--symlink has been removed, please see 'rvm wrapper'."
360
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
361
+ ;;
362
+
363
+ wrapper)
364
+ rvm_action="$rvm_token"
365
+ rvm_ruby_string="$next_token" ;
366
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
367
+ rvm_wrapper_name="$next_token"
368
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
369
+ rvm_ruby_args="$next_token $@" # list of binaries, or none
370
+ rvm_parse_break=1
371
+ ;;
372
+
373
+ -h|--help|usage)
374
+ rvm_action=help
375
+ ;;
376
+
377
+ --make)
378
+ rvm_ruby_make="$next_token"
379
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
380
+ ;;
381
+ --make-install)
382
+ rvm_ruby_make_install="$next_token" ; shift
383
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
384
+ ;;
385
+
386
+ --nice)
387
+ rvm_niceness="$next_token"
388
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
389
+ ;;
390
+
391
+ -l|--level)
392
+ rvm_ruby_patch_level="p$next_token"
393
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
394
+ ;;
395
+
396
+ --sdk)
397
+ rvm_sdk="$next_token"
398
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
399
+ ;;
400
+
401
+ --archflags)
402
+ rvm_archflags="$next_token"
403
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
404
+ ;;
405
+
406
+ --debug)
407
+ export rvm_debug_flag=1
408
+ set -o verbose
409
+ ;;
410
+
411
+ --trace|--debug)
412
+ local option
413
+
414
+ set -o noclobber
415
+ set -o nounset
416
+
417
+ if [[ -z "${ZSH_VERSION:-""}" ]] ; then
418
+ set -o errtrace
419
+ fi
420
+
421
+ # errexit pipefail
422
+ if [[ "$rvm_token" = "--trace" ]] ; then
423
+
424
+ export rvm_trace_flag=1
425
+
426
+ set -o xtrace
427
+
428
+ if [[ -z "${ZSH_VERSION:-""}" ]] ; then
429
+ export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
430
+ fi
431
+ fi
432
+ ;;
433
+
434
+ --proxy)
435
+ rvm_proxy="$next_token"
436
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
437
+ ;;
438
+
439
+ -q|--quiet) rvm_quiet_flag=1 ;;
440
+ -s|--silent) rvm_silent_flag=1 ;;
441
+ --disable-llvm|--disable-jit) rvm_llvm_flag=0 ;;
442
+ --enable-llvm|--enable-jit) rvm_llvm_flag=1 ;;
443
+ --install) rvm_install_on_use_flag=1 ;;
444
+ --pretty) rvm_pretty_print_flag=1 ;;
445
+
446
+
447
+ reboot|damnit|wtf|argh|BOOM|boom|wth) $rvm_action="reboot" ;;
448
+
449
+ --self|--gem|--rubygems|--reconfigure|--default|--force|--export|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--import|--rvmrc|--sticky|--create|--gems|--docs)
450
+ export "rvm_${rvm_token//-/}_flag"=1
451
+ ;;
452
+
453
+ --dump-environment)
454
+ export rvm_dump_environment_flag="$next_token"
455
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
456
+ ;;
457
+
458
+ --clang)
459
+ export rvm_clang_flag=1
460
+ export rvm_prior_cc="$CC"
461
+ export CC="clang"
462
+ ;;
463
+
464
+ -j)
465
+ if [[ ! -z "$next_token" ]] ; then
466
+ rvm_make_flags="$rvm_make_flags -j$next_token"
467
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
468
+
469
+ else
470
+ rvm_action="error"
471
+ rvm_error_message="-j *must* be followed by an integer (normally the # of CPU's in your machine)."
472
+ fi
473
+ ;;
474
+
475
+ --with-rubies)
476
+ rvm_ruby_strings="$next_token"
477
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
478
+
479
+ ;;
480
+
481
+ -C|--configure)
482
+ if [[ ! -z "$next_token" ]] ; then
483
+ rvm_configure_flags="${next_token//,--/ --}"
484
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
485
+
486
+ else
487
+ rvm_action="error"
488
+ rvm_error_message="--configure *must* be followed by configure flags."
489
+ fi
490
+ ;;
491
+
492
+ --with-*|--without-*|--enable-*|--disable-*)
493
+ rvm_configure_flags="${rvm_configure_flags:-""} $rvm_token"
494
+ ;;
495
+
496
+ -I|--include)
497
+ if [[ -z "$next_token" ]] ; then
498
+ rvm_action="error"
499
+ rvm_error_message="-I|--include *must* be followed by a path."
500
+ else
501
+ rvm_ruby_load_path="$rvm_ruby_load_path:$next_token"
502
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
503
+ fi
504
+ ;;
505
+
506
+ --) rvm_ruby_args="$next_token $*" ; rvm_parse_break=1 ;;
507
+
508
+ *)
509
+ if [[ -n "$rvm_token" ]] ; then
510
+
511
+
512
+ if [[ "gemset" = "$rvm_action" ]] ; then
513
+ if "$rvm_path/scripts/match" "$rvm_token" "^.+${rvm_gemset_separator:-"@"}.+$" ; then
514
+ rvm_gemset_name="${rvm_token/*${rvm_gemset_separator:-"@"}/}"
515
+ rvm_ruby_string="${rvm_token/${rvm_gemset_separator:-"@"}*/}"
516
+
517
+ elif echo "$rvm_token" | \grep -q '.gems$' ; then
518
+ rvm_file_name="${rvm_token/.gems/}.gems" # Account for possible .gems.gems
519
+ # elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
520
+ else
521
+ rvm_gemset_name="${rvm_token/.gems/}"
522
+ rvm_file_name="$rvm_gemset_name.gems"
523
+ fi
524
+
525
+ elif echo "$rvm_token" | \grep -q ',' ; then
526
+ rvm_ruby_strings="$rvm_token"
527
+ if [[ -z "${rvm_action:-""}" ]] ; then
528
+ rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
529
+ fi
530
+
531
+ elif "$rvm_path/scripts/match" "$rvm_token" "^${rvm_gemset_separator:-"@"}" ; then
532
+ rvm_action="${rvm_action:-use}"
533
+ rvm_gemset_name="${rvm_token/*${rvm_gemset_separator:-"@"}/}"
534
+ rvm_ruby_string="${rvm_ruby_string:-""}"
535
+ rvm_ruby_strings="${rvm_ruby_string}${rvm_gemset_separator:-"@"}${rvm_gemset_name}"
536
+
537
+ elif "$rvm_path/scripts/match" "$rvm_token" "^.+${rvm_gemset_separator:-"@"}.+$" ; then
538
+ gemset_name="${rvm_token/*${rvm_gemset_separator:-"@"}/}"
539
+ rvm_ruby_string="$rvm_token"
540
+ rvm_ruby_strings="$rvm_token"
541
+
542
+ elif "$rvm_path/scripts/match" "$rvm_token" "^.+\\+.+$" ; then
543
+ rvm_ruby_alias="${rvm_token/*+/}"
544
+ rvm_ruby_string="${rvm_token/+*/}"
545
+ rvm_ruby_strings="$rvm_ruby_string"
546
+
547
+ elif "$rvm_path/scripts/match" "$rvm_token" "-" ; then
548
+ rvm_ruby_string="$rvm_token"
549
+ rvm_ruby_strings="$rvm_token"
550
+
551
+ elif "$rvm_path/scripts/match" "$rvm_token" "^[0-9].[0-9]" ; then
552
+ rvm_ruby_string="$rvm_token"
553
+ rvm_ruby_strings="$rvm_token"
554
+ rvm_action="${rvm_action:-use}"
555
+
556
+ elif "$rvm_path/scripts/match" "$rvm_token" "^ree-" ; then
557
+ rvm_ruby_string="$rvm_token"
558
+ rvm_ruby_strings="$rvm_token"
559
+ rvm_action="${rvm_action:-use}"
560
+
561
+ elif [[ -L "$rvm_path/rubies/$rvm_token" ]] ; then # Alias
562
+ rvm_ruby_string=$rvm_token
563
+ rvm_ruby_strings="$rvm_token"
564
+ rvm_action="${rvm_action:-use}"
565
+
566
+ else
567
+ if "$rvm_path/scripts/match" "$rvm_token" ".rb$" ; then # we have a specified ruby script
568
+ rvm_ruby_args="$rvm_token"
569
+ rvm_ruby_file="$rvm_token"
570
+ if [[ -z "${rvm_action:-""}" ]] ; then rvm_action="ruby" ; fi
571
+ else
572
+ rvm_action="error"
573
+ rvm_error_message="Unrecognized command line argument: '$rvm_token'"
574
+ fi
575
+ fi
576
+ else
577
+ rvm_action="error"
578
+ rvm_error_message="Unrecognized command line argument(s): '$rvm_token $@'"
579
+ fi
580
+
581
+ if [[ "error" = "${rvm_action:-""}" ]] ; then break ; fi
582
+ esac
583
+
584
+ if [[ -z "${rvm_action:-""}" && -n "${rvm_ruby_string:-""}" ]] ; then rvm_action="use" ; fi
585
+
586
+ if [[ ${rvm_parse_break:-0} -eq 1 || -n "${rvm_error_message:-""}" ]] ; then break ; fi
587
+ done
588
+
589
+ # Empty args list.
590
+ while [[ $# -gt 0 ]] ; do shift ; done
591
+
592
+ if [[ -n "${rvm_error_message:-""}" ]] ; then
593
+ "$rvm_path/scripts"/log "fail" "$rvm_error_message ( see: 'rvm usage' )"
594
+ return 1
595
+ fi
596
+ }
597
+
598
+ rvm()
599
+ {
600
+ local result
601
+
602
+ __rvm_setup
603
+
604
+ case $- in *i*) rvm_interactive_flag=1 ;;
605
+ *) rvm_interactive_flag=0 ;;
606
+ esac ; export rvm_interactive_flag
607
+
608
+ if [[ -z "${ZSH_VERSION:-""}" ]] ; then
609
+
610
+ trap '\rm -rf "${rvm_tmp_path:-"$rvm_path/tmp"}/$$" >/dev/null 2>&1' 0 1 2 3 15
611
+
612
+ fi
613
+
614
+ # Check that this is the current version.
615
+ disk_version="$(awk '/:/{printf $NF"."}' "$rvm_path/lib/VERSION.yml")"
616
+ disk_version="${disk_version/%.}"
617
+
618
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
619
+
620
+ if [[ "${rvm_version:-""}" != "${disk_version:-""}" && "reload" != "${next_token:-""}" ]] ; then
621
+
622
+ printf "\nA RVM version ${disk_version} is installed yet ${rvm_version} is loaded.\n Please do one of the following:\n * 'rvm reload'\n * open a new shell\n * source your shell init scripts"
623
+
624
+ return 1
625
+
626
+ fi
627
+
628
+ __rvm_cleanse_variables
629
+
630
+ __rvm_load_rvmrc
631
+
632
+ __rvm_initialize
633
+
634
+ __rvm_parse_args "$@"
635
+
636
+ rvm_action="${rvm_action:-usage}"
637
+
638
+ result=0
639
+
640
+ export BUNDLE_PATH GEM_HOME GEM_PATH rvm_action rvm_archflags rvm_bin_flag rvm_bin_path rvm_clang_flag rvm_configure_flags rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_dump_environment_flag rvm_error_message rvm_file_name rvm_gemdir_flag rvm_gemset_name rvm_head_flag rvm_install_arguments rvm_install_on_use_flag rvm_interactive_flag rvm_llvm_flag rvm_loaded_flag rvm_make_flags rvm_niceness rvm_only_path_flag rvm_parse_break rvm_patch_names rvm_patch_original_pwd rvm_pretty_print_flag rvm_prior_cc rvm_proxy rvm_quiet_flag rvm_ree_options rvm_reload_flag rvm_remove_flag rvm_ruby_alias rvm_ruby_aliases rvm_ruby_args rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_load_path rvm_ruby_make rvm_ruby_make_install rvm_ruby_patch_level rvm_ruby_repo_url rvm_ruby_require rvm_ruby_string rvm_ruby_strings rvm_ruby_version rvm_script_name rvm_sdk rvm_silent_flag rvm_system_flag rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_wrapper_name
641
+
642
+ case "$rvm_action" in
643
+ use) __rvm_use ;;
644
+ srcdir) __rvm_source_dir ;;
645
+ strings) __rvm_strings ;;
646
+ version) __rvm_version ;;
647
+ reset) __rvm_reset ;;
648
+ update) __rvm_update ;;
649
+ reboot) __rvm_reboot ;;
650
+ usage) __rvm_usage ;;
651
+ benchmark) __rvm_benchmark ;;
652
+ inspect) __rvm_inspect ;;
653
+ implode|seppuku) __rvm_implode ;;
654
+
655
+ list) "$rvm_path/scripts"/list $rvm_ruby_args ;;
656
+ # TODO: Make debug run in the current environment.
657
+ debug) "$rvm_path/scripts/info" '' debug ;;
658
+ help) "$rvm_path/scripts/help" $rvm_ruby_args ;;
659
+ env) "$rvm_path/scripts/env" "$rvm_ruby_string" ;;
660
+ info)
661
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
662
+ if [[ "$next_token" = "info" ]]; then shift; fi
663
+ "$rvm_path/scripts/info" $rvm_ruby_args
664
+ ;;
665
+
666
+ answer) __rvm_Answer_to_the_Ultimate_Question_of_Life_the_Universe_and_Everything ; result=42 ;;
667
+ question) __rvm_ultimate_question ; result=42 ;;
668
+
669
+ wrapper)
670
+ "$rvm_path/scripts/wrapper" "$rvm_ruby_string" "$rvm_wrapper_name" $rvm_ruby_args
671
+ unset rvm_wrapper_name
672
+ ;;
673
+
674
+ gemdir|gemhome|gempath)
675
+ "$rvm_path/scripts/gemsets" "$rvm_action"
676
+ ;;
677
+
678
+ ruby|gem|rake|exec)
679
+ old_rvm_ruby_string=${rvm_ruby_string:-""}
680
+ unset rvm_ruby_string
681
+ export rvm_ruby_strings
682
+
683
+ "$rvm_path/scripts/set" "$rvm_action" $rvm_ruby_args ; result=$?
684
+
685
+ # Restore the state pre-sets.
686
+ [[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
687
+
688
+ unset old_rvm_ruby_string
689
+ ;;
690
+
691
+ cleanup|tools|snapshot|disk-usage|repair|alias|docs|rubygems|migrate|upgrade)
692
+ __rvm_run_script "$rvm_action"
693
+ ;;
694
+
695
+ rvmrc) eval "__rvm_rvmrc_tools $rvm_ruby_args" ;;
696
+
697
+ gemset)
698
+ #if "$rvm_path/scripts/match" $rvm_ruby_args use ; then
699
+ if [[ ${rvm_use_flag:-0} -eq 1 ]] ; then
700
+ __rvm_gemset_select && __rvm_gemset_use
701
+ else
702
+ export rvm_ruby_strings
703
+
704
+ "$rvm_path/scripts/gemsets" $rvm_ruby_args ; result=$?
705
+
706
+ rvm_ruby_strings=""
707
+
708
+ # Clear the gemset.
709
+ if [[ ${rvm_delete_flag:-0} -eq 1 ]] ; then
710
+ gem_prefix="$(echo "${GEM_HOME:-""}" | sed 's/'${rvm_gemset_separator:-"@"}'.*$//')"
711
+
712
+ if [[ "${GEM_HOME:-""}" = "${gem_prefix}${rvm_gemset_separator:-"@"}${rvm_gemset_name}" ]] ; then
713
+ rvm_ruby_gem_home="$gem_prefix"
714
+ GEM_HOME="$rvm_ruby_gem_home"
715
+ BUNDLE_PATH="$rvm_ruby_gem_home"
716
+ GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}global/bin"
717
+ export rvm_ruby_gem_home GEM_HOME BUNDLE_PATH GEM_PATH
718
+ fi
719
+ unset gem_prefix
720
+ fi
721
+ fi
722
+ ;;
723
+
724
+ monitor)
725
+ export rvm_ruby_strings rvm_ruby_string
726
+ "$rvm_path/scripts/monitor"
727
+ ;;
728
+
729
+ notes) "$rvm_path/scripts/notes" ;;
730
+ reload) rvm_reload_flag=1 ;;
731
+ tests|specs) rvm_action="rake" ; __rvm_do ;;
732
+ package) "$rvm_path/scripts/package" $rvm_ruby_args ;;
733
+
734
+ fetch|install|uninstall|remove)
735
+ if [[ -n "$rvm_ruby_strings" ]]; then
736
+ "$rvm_path/scripts"/manage "$rvm_action" "$rvm_ruby_strings"
737
+ else
738
+ "$rvm_path/scripts"/manage "$rvm_action"
739
+ fi
740
+ ;;
741
+
742
+ error) false ;;
743
+
744
+ *)
745
+ if [[ -n "${rvm_action:-""}" ]] ; then
746
+ "$rvm_path/scripts/log" "fail" "unknown action '$rvm_action'"
747
+ else
748
+ __rvm_usage
749
+ fi
750
+ false # result
751
+ esac
752
+
753
+ result=${result:-$?}
754
+
755
+ if [[ ${rvm_reload_flag:-0} -eq 1 ]] ; then
756
+
757
+ rvm_loaded_flag=0
758
+
759
+ source "$rvm_path/scripts/rvm"
760
+
761
+ # Note: Not using builtin on purpose. Done so we can trigger a reload the rvmrc.
762
+ __rvm_project_rvmrc
763
+
764
+ fi
765
+
766
+ __rvm_teardown
767
+
768
+ if [[ ${rvm_trace_flag:-0} -eq 1 ]] ; then
769
+ rvm_trace_flag=0
770
+ set +o verbose
771
+ set +o noclobber
772
+ set +o nounset
773
+
774
+ if [[ -z "${ZSH_VERSION:-""}" ]] ; then
775
+ set +o errtrace
776
+ fi
777
+ fi
778
+
779
+ return ${result:-0}
780
+ }
781
+