rvm 0.0.91 → 0.0.92

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,9 +6,9 @@ if [[ -z "$rvm_path" ]] ; then unset rvm_path ; fi
6
6
 
7
7
  if [[ -z "$rvm_path" ]] ; then
8
8
  if [[ "root" = "$(whoami)" ]] ; then
9
- rvm_path="${rvm_path:-/usr/local/rvm}"
9
+ rvm_path="/usr/local/rvm"
10
10
  else
11
- rvm_path="${rvm_path:-$HOME/.rvm}"
11
+ rvm_path="$HOME/.rvm"
12
12
  fi
13
13
  fi
14
14
 
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 91
4
+ :patch: 92
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.0.91"
8
+ s.version = "0.0.92"
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-09}
12
+ s.date = %q{2009-12-11}
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}
@@ -62,6 +62,16 @@ Gem::Specification.new do |s|
62
62
  "scripts/utility"
63
63
  ]
64
64
  s.homepage = %q{http://github.com/wayneeseguin/rvm}
65
+ s.post_install_message = %q{********************************************************************************
66
+
67
+ In order to setup rvm for your user's environment you must now run rvm-install.
68
+ rvm-install will be found in your current gems bin directory corresponding to where the gem was installed.
69
+
70
+ rvm-install will install the scripts to your user account and append itself to your profiles in order to
71
+ inject the proper rvm functions into your shell so that you can manage multiple rubies.
72
+
73
+ ********************************************************************************
74
+ }
65
75
  s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
66
76
  s.require_paths = ["lib"]
67
77
  s.rubyforge_project = %q{rvm}
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- if [[ -z "$rvm_trace_flag" ]] ; then set +x ; else set -x ; fi
4
-
5
3
  if [[ ! -z "$ZSH_VERSION" ]] ; then __array_start=1 ; else __array_start=0 ; fi
6
4
 
7
5
  # Usage: contains "a_string" "${an_array[@]}"
@@ -59,8 +59,7 @@ __rvm_parse_args() {
59
59
  gems|gemset)
60
60
  rvm_action="gems"
61
61
  if [[ "name" = "$1" ]] || [[ "dir" = "$1" ]] || [[ "list" = "$1" ]] || [[ "empty" = "$1" ]] || [[ "delete" = "$1" ]] || [[ "dump" = "$1" ]] || [[ "load" = "$1" ]] ; then
62
- rvm_ruby_args="$*"
63
- #export rvm_${1}_flag=1 ; shift
62
+ rvm_ruby_args="$*" ; export rvm_${1}_flag=1 ; shift
64
63
  else
65
64
  rvm_gem_set_name="$1" ; shift
66
65
  export rvm_use_flag=1 # Default is to use the (named) gem set.
@@ -205,7 +204,7 @@ __rvm_parse_args() {
205
204
 
206
205
  -C|--configure)
207
206
  if [[ ! -z "$1" ]] ; then
208
- rvm_ruby_configure_flags="$(echo $1 | tr ',' ' ')"
207
+ export rvm_ruby_configure_flags="$(echo $1 | tr ',' ' ')"
209
208
  shift
210
209
  else
211
210
  rvm_action="error"
@@ -262,7 +261,7 @@ __rvm_parse_args() {
262
261
  tests|specs) rvm_action="tests" ;;
263
262
  --trace) export rvm_trace_flag=1 ; set -x ;;
264
263
 
265
- --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose)
264
+ --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load)
266
265
  export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
267
266
  if [[ "--debug" = "$rvm_token" ]] ; then export rvm_debug_flag ; fi
268
267
  ;;
@@ -2,10 +2,14 @@
2
2
 
3
3
  #source $rvm_path/scripts/rvm
4
4
  source $rvm_path/scripts/utility
5
- source $rvm_path/scripts/selector
6
- rvm_ruby_string="${rvm_ruby_string:-system}"
7
- __rvm_select
5
+ #source $rvm_path/scripts/selector
8
6
 
7
+ color_green=$($rvm_scripts_path/color "green")
8
+ color_red=$($rvm_scripts_path/color "red")
9
+ color_yellow=$($rvm_scripts_path/color "yellow")
10
+ color_none=$($rvm_scripts_path/color "none")
11
+
12
+ if [[ -z "$rvm_ruby_gem_home" ]] ; then rvm_ruby_gem_home="$(gem env home)" ; fi
9
13
  if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
10
14
 
11
15
  trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
@@ -79,24 +83,29 @@ __rvm_gems_dump() {
79
83
  }
80
84
 
81
85
  __rvm_gems_load() {
86
+
82
87
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
83
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME ;
84
- GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH ;
88
+ export GEM_HOME="$rvm_ruby_gem_home"
89
+ export GEM_PATH="$rvm_ruby_gem_home"
85
90
  fi
86
91
 
87
- if [[ -z "$rvm_file_name" ]] ; then
88
- if [[ -f "$rvm_gem_set_name.gems" ]] ; then
89
- rvm_file_name="$rvm_gem_set_name.gems"
90
- elif [[ -f "default.gems" ]] ; then
91
- rvm_file_name="default.gems"
92
- elif [[ -f "system.gems" ]] ; then
93
- rvm_file_name="system.gems"
94
- elif [[ -f ".gems" ]] ; then
95
- rvm_file_name=".gems"
96
- else
97
- $rvm_scripts_path/log "error" "No gem set file found."
98
- return 1
99
- fi
92
+ if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
93
+ rvm_gem_set_name="$(echo "$gems_args" | sed 's#\.gem.*##g')"
94
+ else
95
+ rvm_gem_set_name="$gems_args"
96
+ fi ; shift
97
+
98
+ if [[ -f "$rvm_gem_set_name.gems" ]] ; then
99
+ rvm_file_name="$rvm_gem_set_name.gems"
100
+ elif [[ -f "default.gems" ]] ; then
101
+ rvm_file_name="default.gems"
102
+ elif [[ -f "system.gems" ]] ; then
103
+ rvm_file_name="system.gems"
104
+ elif [[ -f ".gems" ]] ; then
105
+ rvm_file_name=".gems"
106
+ else
107
+ $rvm_scripts_path/log "error" "No *.gems file found."
108
+ return 1
100
109
  fi
101
110
 
102
111
  mkdir -p "$rvm_gem_path/cache" # Ensure the base cache dir is initialized.
@@ -148,9 +157,10 @@ __rvm_gem_install() {
148
157
  #
149
158
  # Evaluate
150
159
  #
160
+
151
161
  if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/${gem_file_name}spec" ]] ; then
152
162
  unset gem
153
- $rvm_scripts_path/log "info" "$($rvm_scripts_path/color "green")$gem_name $gem_version$($rvm_scripts_path/color "none") exists, skipping (--force to re-install)"
163
+ $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
154
164
  else
155
165
  if [[ -f "$gem" ]] ; then
156
166
  cache_file="$gem"
@@ -207,9 +217,9 @@ __rvm_gem_install() {
207
217
  eval $command > /dev/null 2>&1
208
218
  result=$?
209
219
  if [[ $result -eq 0 ]] ; then
210
- $rvm_scripts_path/log "info" "$($rvm_scripts_path/color "green")$gem_name $gem_version$($rvm_scripts_path/color "none") installed."
220
+ $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$color_none installed."
211
221
  else
212
- $rvm_scripts_path/log "error" "$($rvm_scripts_path/color "red")$gem_name $gem_version$($rvm_scripts_path/color "none") failed to install."
222
+ $rvm_scripts_path/log "error" "$color_red$gem_name $gem_version$color_none failed to install."
213
223
  fi
214
224
  fi
215
225
  unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
@@ -232,29 +242,31 @@ __rvm_gems_gemdir() {
232
242
 
233
243
  unset GEM_PATH
234
244
 
235
- if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
236
-
237
245
  if [[ -z "$(which gem 2>/dev/null)" ]] ; then
238
246
  $rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions."
239
247
  return 1
240
248
  fi
241
249
 
242
- if [[ "load" = "$1" ]] ; then
250
+ action="$1" ; shift
251
+ gems_args="$*"
252
+
253
+ if [[ "load" = "$action" ]] ; then
243
254
  __rvm_gems_load
244
- elif [[ "dump" = "$1" ]] ; then
255
+ elif [[ "dump" = "$action" ]] ; then
245
256
  __rvm_gems_dump
246
- elif [[ "delete" = "$1" ]] ; then
257
+ elif [[ "delete" = "$action" ]] ; then
247
258
  __rvm_gems_delete
248
- elif [[ "name" = "$1" ]] ; then
259
+ elif [[ "name" = "$action" ]] ; then
249
260
  __rvm_gems_name
250
- elif [[ "dir" = "$1" ]] ; then
261
+ elif [[ "dir" = "$action" ]] ; then
251
262
  __rvm_gems_dir
252
- elif [[ "list" = "$1" ]] ; then
263
+ elif [[ "list" = "$action" ]] ; then
253
264
  __rvm_gems_list
254
- elif [[ "gemdir" = "$1" ]] ; then
265
+ elif [[ "gemdir" = "$action" ]] ; then
255
266
  __rvm_gems_gemdir
256
- elif [[ "install" = "$1" ]] ; then
267
+ elif [[ "install" = "$action" ]] ; then
257
268
  __rvm_gem_install
258
269
  else
259
270
  $rvm_scripts_path/log "error" "gems must be passed an action as the first parameter {load,dump,delete,name,list,gemdir,install}"
260
271
  fi
272
+
@@ -9,7 +9,7 @@ fi
9
9
  if [[ ! -z "$rvm_archflags" ]] ; then rvm_make_flags_flag=1 ; fi
10
10
 
11
11
  rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
12
- rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-1}"
12
+ rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
13
13
  if [[ -z "$rvm_scripts_path" ]] ; then
14
14
  if [[ -d "$HOME/scripts" ]] && [[ -f "/usr/local/rvm/scripts/rvm" ]]; then
15
15
  rvm_scripts_path="$HOME/scripts"
@@ -32,6 +32,16 @@ __rvm_install_source() {
32
32
  # if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi # Don't barf on autoconf fail...
33
33
  fi
34
34
 
35
+ if [[ "1.8.5" = "$rvm_ruby_version" ]] ; then
36
+ # How to install ruby 1.8.5... "sneaky sneaky, sir"
37
+ if [[ ! -d "$HOME/.rvm/src/ruby-1.8.7-p174/ext/openssl/" ]] ; then $rvm_path/bin/rvm fetch 1.8.6-p174 1>/dev/null ; fi
38
+ if [[ ! -d "$HOME/.rvm/src/ruby-1.8.6-p383/ext/openssl/" ]] ; then $rvm_path/bin/rvm fetch 1.8.6-p383 1>/dev/null ; fi
39
+ cp ~/.rvm/src/ruby-1.8.7-p174/ext/openssl/extconf.rb ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
40
+ cp ~/.rvm/src/ruby-1.8.7-p174/ext/openssl/openssl_missing.* ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
41
+ cp ~/.rvm/src/ruby-1.8.7-p174/ext/openssl/ossl_hmac.c ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
42
+ cp ~/.rvm/src/ruby-1.8.6-p383/ext/readline/* ~/.rvm/src/ruby-1.8.5-p231/ext/readline/
43
+ fi
44
+
35
45
  if [[ -s ./Makefile ]] && [[ -z "$rvm_reconfigure_flag" ]] ; then
36
46
  (($rvm_debug_flag)) && $rvm_scripts_path/log "debug" "Skipping configure step, Makefile exists so configure must have already been run."
37
47
  elif [[ ! -z "$rvm_ruby_configure" ]] ; then
@@ -16,7 +16,9 @@ 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" ]] && [[ -f "/usr/local/bin/rvm" ]] ; then rvm_path="${rvm_path:-"/usr/local/rvm"}" ; fi
19
+ if [[ -d "/usr/local/bin/rvm" ]] && [[ -s "/usr/local/bin/rvm" ]] ; then
20
+ rvm_path="${rvm_path:-"/usr/local/rvm"}"
21
+ fi
20
22
  fi
21
23
  fi
22
24
 
@@ -35,6 +37,6 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
35
37
 
36
38
  alias rvm-restart="source '${rvm_path}/scripts/rvm'"
37
39
 
38
- if [[ -f "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
40
+ if [[ -s "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
39
41
  fi
40
42
 
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.91
4
+ version: 0.0.92
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-09 00:00:00 -05:00
12
+ date: 2009-12-11 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15
 
@@ -68,7 +68,17 @@ has_rdoc: true
68
68
  homepage: http://github.com/wayneeseguin/rvm
69
69
  licenses: []
70
70
 
71
- post_install_message:
71
+ post_install_message: |
72
+ ********************************************************************************
73
+
74
+ In order to setup rvm for your user's environment you must now run rvm-install.
75
+ rvm-install will be found in your current gems bin directory corresponding to where the gem was installed.
76
+
77
+ rvm-install will install the scripts to your user account and append itself to your profiles in order to
78
+ inject the proper rvm functions into your shell so that you can manage multiple rubies.
79
+
80
+ ********************************************************************************
81
+
72
82
  rdoc_options:
73
83
  - --inline-source
74
84
  - --charset=UTF-8