rvm 0.0.92 → 0.0.93

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.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 92
4
+ :patch: 93
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.0.92"
8
+ s.version = "0.0.93"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wayne E. Seguin"]
12
- s.date = %q{2009-12-11}
12
+ s.date = %q{2009-12-13}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter installations and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -154,11 +154,9 @@ __rvm_gems_load() {
154
154
  fi
155
155
  }
156
156
  __rvm_gem_install() {
157
- #
158
- # Evaluate
159
- #
160
157
 
161
- if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/${gem_file_name}spec" ]] ; then
158
+ installed_gem="$(ls ${rvm_ruby_gem_home}/specifications/${gem_file_name}*spec | head -n 1)"
159
+ if [[ -z "$rvm_force_flag" ]] && [[ -f "$installed_gem" ]] ; then
162
160
  unset gem
163
161
  $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
164
162
  else
@@ -205,13 +203,9 @@ __rvm_gem_install() {
205
203
 
206
204
  $rvm_scripts_path/log "warn" "$gem_name $gem_version is not installed, installing..."
207
205
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
208
- command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
206
+ command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
209
207
  else
210
- if [[ ! -z "$rvm_ruby_home" ]] ; then
211
- command="$gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
212
- else
213
- command="$gem_prefix gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
214
- fi
208
+ command="$gem_prefix gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
215
209
  fi
216
210
  if [[ -f "$gem" ]] ; then command="${command} -l" ; fi
217
211
  eval $command > /dev/null 2>&1
@@ -265,6 +259,7 @@ elif [[ "list" = "$action" ]] ; then
265
259
  elif [[ "gemdir" = "$action" ]] ; then
266
260
  __rvm_gems_gemdir
267
261
  elif [[ "install" = "$action" ]] ; then
262
+ gem_file_name="$1"
268
263
  __rvm_gem_install
269
264
  else
270
265
  $rvm_scripts_path/log "error" "gems must be passed an action as the first parameter {load,dump,delete,name,list,gemdir,install}"
@@ -414,6 +414,8 @@ RubyWrapper
414
414
 
415
415
  ruby)
416
416
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
417
+ if [[ -z "$rvm_ruby_configure_flags" ]] ; then rvm_ruby_configure_flags="--enable_shared" ; fi
418
+
417
419
  __rvm_install_source $*
418
420
  ;;
419
421
 
@@ -16,27 +16,30 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
16
16
  rvm_path="/usr/local/rvm"
17
17
  else
18
18
  if [[ -d "$HOME/.rvm" ]] ; then rvm_path="$HOME/.rvm" ; fi
19
- if [[ -d "/usr/local/bin/rvm" ]] && [[ -s "/usr/local/bin/rvm" ]] ; then
19
+ if [[ -d "/usr/local/rvm" ]] && [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
20
20
  rvm_path="${rvm_path:-"/usr/local/rvm"}"
21
21
  fi
22
22
  fi
23
23
  fi
24
+ if [[ -d "$rvm_path" ]] ; then
25
+ source $rvm_path/scripts/array
26
+ source $rvm_path/scripts/initialize
27
+ source $rvm_path/scripts/utility
28
+ source $rvm_path/scripts/selector
29
+ source $rvm_path/scripts/cli
30
+ #source $rvm_path/scripts/gems
31
+ source $rvm_path/scripts/libraries
32
+ source $rvm_path/scripts/cd
24
33
 
25
- source $rvm_path/scripts/array
26
- source $rvm_path/scripts/initialize
27
- source $rvm_path/scripts/utility
28
- source $rvm_path/scripts/selector
29
- source $rvm_path/scripts/cli
30
- #source $rvm_path/scripts/gems
31
- source $rvm_path/scripts/libraries
32
- source $rvm_path/scripts/cd
34
+ rvm_loaded_flag=1
33
35
 
34
- rvm_loaded_flag=1
36
+ rvm_version="$(cat "${rvm_path}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')" ; export rvm_version
35
37
 
36
- rvm_version="$(cat "${rvm_path}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')" ; export rvm_version
38
+ alias rvm-restart="source '${rvm_path}/scripts/rvm'"
37
39
 
38
- alias rvm-restart="source '${rvm_path}/scripts/rvm'"
39
-
40
- if [[ -s "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
40
+ if [[ -s "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
41
+ else
42
+ echo -e "\$rvm_path is not set. rvm cannot load."
43
+ fi
41
44
  fi
42
45
 
@@ -166,8 +166,8 @@ __rvm_use() {
166
166
 
167
167
  if [[ "default" = "$rvm_ruby_interpreter" ]] ; then
168
168
 
169
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
170
- PATH=$rvm_bin_path:$PATH ; export PATH
169
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
170
+ new_path=$rvm_bin_path:$new_path
171
171
 
172
172
  if [[ -s $rvm_path/default ]] ; then
173
173
  source $rvm_path/default
@@ -185,8 +185,8 @@ __rvm_use() {
185
185
  elif [[ "system" = "$rvm_ruby_interpreter" ]] ; then
186
186
 
187
187
  unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
188
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
189
- PATH=$rvm_bin_path:$PATH ; export PATH
188
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
189
+ new_path=$rvm_bin_path:$new_path
190
190
  if [[ -s $rvm_path/system ]] ; then
191
191
  grep "^MY_RUBY_HOME='$rvm_path" "$rvm_path/system" > /dev/null
192
192
  if [[ $? -eq 0 ]] ; then
@@ -206,7 +206,7 @@ __rvm_use() {
206
206
  $rvm_scripts_path/log "info" "Now using system ruby."
207
207
  fi
208
208
 
209
- rvm_ruby_string="system"
209
+ export rvm_ruby_string="system"
210
210
 
211
211
  else
212
212
  GEM_HOME=$rvm_ruby_gem_home
@@ -233,11 +233,8 @@ __rvm_use() {
233
233
  $rvm_scripts_path/log "info" "Now using $(echo $rvm_ruby_string | tr '-' ' ')"
234
234
  fi
235
235
 
236
- __rvm_irbrc
237
-
238
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
239
- PATH=$rvm_bin_path:$PATH ; export PATH
240
- PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$PATH ; export PATH
236
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
237
+ new_path=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$rvm_bin_path:$new_path
241
238
 
242
239
  if [[ "root" = "$(whoami)" ]] ; then
243
240
  for binary in erb gem irb rake rdoc ri ruby testrb ; do
@@ -285,8 +282,9 @@ __rvm_use() {
285
282
  if [[ ! -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi
286
283
  if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
287
284
 
288
- if [[ ! -z "$rvm_load_flag" ]] ; then __rvm_gems_load ; fi
289
- if [[ ! -z "$rvm_dump_flag" ]] ; then __rvm_gems_dump ; fi
285
+ if [[ ! -z "$new_path" ]] ; then
286
+ export PATH="$new_path" ; unset new_path
287
+ fi
290
288
 
291
289
  __rvm_hook "after_use"
292
290
  }
@@ -289,7 +289,7 @@ __rvm_list() {
289
289
  if [[ ! -z "$(echo $version | awk '/^jruby-/')" ]] ; then
290
290
  string="$($version -v | awk '{print $NF}')"
291
291
  else
292
- string="[$(file $rvm_path/$version/bin/ruby | awk -F: '{print $2}' | awk '{print $NF}')]"
292
+ string="[ $(file $rvm_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
293
293
  fi
294
294
  if [[ "$version" = "$current_ruby" ]] ; then
295
295
  echo -e "=> $(tput setaf 2)$version$(tput sgr0) $string"
@@ -302,7 +302,7 @@ __rvm_list() {
302
302
  if [[ -f "$rvm_path/default" ]] && [[ -s $rvm_path/default ]] ; then
303
303
  version=$(grep '^MY_RUBY_HOME' $rvm_path/default | awk -F"'" '{print $2}' | xargs basename)
304
304
  if [[ ! -z "$version" ]] ; then
305
- string=$(file $rvm_path/$version/bin/ruby)
305
+ string="[ $(file $rvm_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
306
306
  if [[ "$version" = "$current_ruby" ]] ; then
307
307
  echo -e "=> $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string"
308
308
  selected="1"
@@ -313,12 +313,14 @@ __rvm_list() {
313
313
  fi
314
314
 
315
315
  system_ruby="$(rvm system ; which ruby 2>/dev/null)"
316
- if [[ ! -z "$system_ruby" ]] ; then
317
- system_version=$(file $(which ruby) | awk -F: '{print $2}' | grep 8 | awk '{print $NF}' | tr "\n" ' ')
318
- if [[ ! -z "$(which ruby 2>/dev/null)" ]] && [[ "$($(which ruby 2>/dev/null) -v)" = "$system_version" ]] ; then
319
- echo -e "=> $(tput setaf 2)system$(tput sgr0) [$system_version]\n"
316
+ if [[ ! -z "$system_ruby" ]] && [[ -x "$system_ruby" ]]; then
317
+ #system_version=$($system_ruby -v | awk -F: '{print $2}' | grep 8 | awk '{print $NF}' | tr "\n" ' ')
318
+ system_version=$($system_ruby -v)
319
+ string="[ $(file $system_ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
320
+ if [[ ! -z "$system_ruby" ]] && [[ "$system_ruby -v)" = "$system_version" ]] ; then
321
+ echo -e "=> $(tput setaf 2)system$(tput sgr0) $string\n"
320
322
  else
321
- echo -e " $(tput setaf 2)system$(tput sgr0) [$system_version]\n"
323
+ echo -e " $(tput setaf 2)system$(tput sgr0) $string\n"
322
324
  fi
323
325
  else
324
326
  $rvm_scripts_path/log "info" "No system ruby found."
@@ -357,7 +359,7 @@ __rvm_update_rvm() {
357
359
  mkdir -p "$rvm_src_path"
358
360
  __rvm_pushpop "$rvm_src_path"
359
361
 
360
- ruby="$(which ruby)"
362
+ ruby="$(which ruby 2>/dev/null)"
361
363
  system_ruby="$(rvm system ; which ruby 2>/dev/null)"
362
364
  if [[ ! -x "$ruby" ]] ; then
363
365
  if [[ ! -x "$system" ]] ; then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.92
4
+ version: 0.0.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne E. Seguin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-11 00:00:00 -05:00
12
+ date: 2009-12-13 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15