rvm 0.1.7 → 0.1.8

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.
data/README CHANGED
@@ -6,15 +6,16 @@ Usage
6
6
  Action
7
7
 
8
8
  * usage - show this usage information
9
+ version - show the rvm version installed in rvm_path
9
10
  use - setup current shell to use a specific ruby version
10
- info - show information for current ruby
11
- list - show currently installed versions
12
11
  reload - reload rvm source itself (useful after changing rvm source)
13
- implode - removes all ruby installations it manages, everything in ~/.rvm
12
+ implode - removes rvm completely, i.e. everything in ~/.rvm
14
13
  update - upgrades rvm to the latest version.
15
- reset - remove default and current settings, exit the shell.
16
- (If you experience odd behavior try this first)
17
- debug - emit environment & configuration information for *current* ruby
14
+ (If you experience bugs try this first with --head)
15
+ reset - remove current and stored default & system settings.
16
+ (If you experience odd behavior try this second)
17
+ info - show information for current ruby
18
+ debug - show environment & configuration information for *current* ruby
18
19
 
19
20
  install - install one or many ruby versions
20
21
  uninstall - uninstall one or many ruby versions, leaves their sources
@@ -31,6 +32,18 @@ Action
31
32
  gemdir - switch to gem directory for installation (new login shell)
32
33
  srcdir - switch to src directory for the current ruby installation
33
34
 
35
+ fetch - Performs an archive / src fetch only of the selected ruby.
36
+ srcdir - display the path to rvm source directory (may be yanked)
37
+ list - show currently installed rubies, interactive output.
38
+ rubies - show list of rubies installed for use with scripting.
39
+ iconv - Install iconv
40
+ openssl - Install openssl
41
+ ncurses - Install ncurses
42
+ zlib - Install zlib
43
+ readline - with install, install readline versions 5.2 & 6.0
44
+ monitor - Monitor cwd for testing, run `rake {spec,test}` on changes.
45
+ notes - Display notes, with operating system specifics.
46
+
34
47
  Implementation
35
48
 
36
49
  * ruby - MRI/YARV Ruby (The Standard), defaults to 1.8.6
@@ -59,6 +72,7 @@ Flags
59
72
  --latest - with gemset --dump skips version strings for latest gem.
60
73
  --reconfigure - Force ./configure on install even if Makefile already exists.
61
74
 
75
+
62
76
  Options
63
77
 
64
78
  -v|--version - Emit rvm version loaded for current shell
data/config/db CHANGED
@@ -17,7 +17,7 @@ ree_1.8.7_patch_level=2010.01
17
17
  ruby_1.9.1_patch_level=378
18
18
  ruby_1.9.2_patch_level=preview1
19
19
  ruby_1.8.5_patch_level=231
20
- ruby_1.8.6_patch_level=398
20
+ ruby_1.8.6_patch_level=399
21
21
  ruby_1.8.7_patch_level=249
22
22
  jruby_version=1.4.0
23
23
  jruby_repo_url=git://github.com/jruby/jruby.git
data/config/md5 CHANGED
@@ -6,6 +6,7 @@ ruby-1.8.6-p287.tar.gz=6ff3420094711266c3201a0c7c2faa38
6
6
  ruby-1.8.6-p369.tar.gz=8c140ae28b4c3947b92dfad69109d90b
7
7
  ruby-1.8.6-p383.tar.gz=4f49544d4a4d0d34e9d86c41e853db2e
8
8
  ruby-1.8.6-p398.tar.gz=736db5f56c2d9b0136e563d049249fa8
9
+ ruby-1.8.6-p399.tar.gz=c3d16cdd3c1ee8f3b7d1c399d4884e33
9
10
  ruby-1.8.7-p160.tar.gz=945398f97e2de6dd8ab6df68d10bb1a1
10
11
  ruby-1.8.7-p174.tar.gz=18dcdfef761a745ac7da45b61776afa5
11
12
  ruby-1.8.7-p248.tar.gz=60a65374689ac8b90be54ca9c61c48e3
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 7
4
+ :patch: 8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
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{2010-02-04}
12
+ s.date = %q{2010-02-05}
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}
@@ -8,7 +8,7 @@ __rvm_parse_args() {
8
8
  while [[ $# -gt 0 ]] ; do
9
9
  rvm_token="$1" ; shift
10
10
  case "$rvm_token" in
11
- fetch|path|info|setup|version|srcdir|list|rubies|reset|debug|reload|implode|readline|update|iconv|curl|openssl|ncurses|zlib|readline|monitor|notes)
11
+ fetch|info|version|srcdir|list|rubies|reset|debug|reload|implode|readline|update|iconv|curl|openssl|ncurses|zlib|monitor|notes)
12
12
  rvm_action=$rvm_token
13
13
  ;;
14
14
 
@@ -56,7 +56,7 @@ _rvm ()
56
56
  gemdir)
57
57
  ;;
58
58
 
59
- 1.8|1.8.0|1.8.1|1.8.2|1.8.3|1.8.4|1.8.5|1.8.6|1.8.7|1.9|1.9.1|1.9.2)
59
+ 1.8.0|1.8.1|1.8.2|1.8.3|1.8.4|1.8.5|1.8.6|1.8.7|1.9.1|1.9.2)
60
60
  ;;
61
61
 
62
62
  1.2.0|1.3.1)
@@ -67,8 +67,8 @@ __rvm_gems_dump() {
67
67
  rvm_file_name="${rvm_file_name:-$gems_args}"
68
68
 
69
69
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
70
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME ;
71
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH ;
70
+ export GEM_HOME="$rvm_ruby_gem_home"
71
+ export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin"
72
72
  fi
73
73
 
74
74
  if [[ -z "$rvm_file_name" ]] ; then
@@ -100,7 +100,7 @@ __rvm_gems_load() {
100
100
 
101
101
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
102
102
  export GEM_HOME="$rvm_ruby_gem_home"
103
- export GEM_PATH="$rvm_ruby_gem_path"
103
+ export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin"
104
104
  fi
105
105
 
106
106
  if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
@@ -175,8 +175,7 @@ __rvm_parse_gem_line() {
175
175
  __rvm_gem_install() {
176
176
  __rvm_parse_gem_line $*
177
177
 
178
- installed_gems="$(ls ${rvm_ruby_gem_home}/specifications/ 2>/dev/null)"
179
- if [[ -z "$rvm_force_flag" ]] && [[ ! -z "$(echo $installed_gems | awk '/'$(basename $gem_file_name)'spec/')" ]] ; then
178
+ if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
180
179
  unset gem
181
180
  $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
182
181
  else
@@ -185,16 +184,10 @@ __rvm_gem_install() {
185
184
  elif [[ -f "$rvm_gems_path/cache/${gem_file_name}" ]] ; then
186
185
  cache_file="$rvm_gems_path/cache/${gem_file_name}"
187
186
  else
188
- cache_file="${cache_file:-$(\ls ${rvm_gems_path}/*/*/cache/${gem_file_name}* 2> /dev/null | sort | head -n1)}"
189
- if [[ ! -z "$cache_file" ]] && [[ -f "$cache_file" ]] ; then
190
- if [[ "$(dirname $cache_file)" != "$rvm_gems_path/cache/" ]] ; then
191
- cp "$cache_file" "$rvm_gems_path/cache/"
192
- cache_file="$rvm_gems_path/cache/$(basename $cache_file)"
193
- fi
194
- fi
187
+ cache_file="${cache_file:-$(\ls ${rvm_gems_path}/cache/${gem_file_name} 2> /dev/null | sort | head -n1)}"
195
188
  fi
196
189
 
197
- if [[ -z "$cache_file" ]] ; then
190
+ if [[ ! -f "$cache_file" ]] ; then
198
191
  if [[ -f "$gem_file_name" ]] ; then
199
192
  gem="$gem_file_name"
200
193
  elif [[ -z "${gem_version/ /}" ]] ; then
@@ -206,13 +199,16 @@ __rvm_gem_install() {
206
199
  gem_file_name="$(basename "$cache_file")"
207
200
  gem_string="$(echo "$gem_file_name" | sed 's#\.gem$##')"
208
201
 
209
- # TODO: Switch this to use match
210
- if [[ ! -z "$(echo "$rvm_ruby_gem_list" | awk "/${gem_name/ /} \(.*$gem_version/{print}")" ]] ; then
211
- if [[ ! -z "$rvm_force_flag" ]] ; then
212
- gem="$rvm_gems_path/cache/$gem_file_name" # install as a named local gem
213
- fi
202
+ if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
203
+ unset gem # already installed, not forcing reinstall.
214
204
  else
215
- gem="$cache_file"
205
+ if [[ -s "$rvm_gems_path/cache/$(basename $gem_file_name)" ]] ; then
206
+ mkdir -p "$rvm_tmp_path/$$/"
207
+ mv "$rvm_gems_path/cache/$gem_file_name" "$rvm_tmp_path/$$/$gem_file_name"
208
+ gem="$rvm_tmp_path/$$/$gem_file_name -f -l"
209
+ else
210
+ gem="$cache_file"
211
+ fi
216
212
  fi
217
213
  fi
218
214
  fi
@@ -222,7 +218,7 @@ __rvm_gem_install() {
222
218
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
223
219
 
224
220
  if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ "$rvm_ruby_gem_home" != "$rvm_gems_path" ]] ; then
225
- command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_path' $gem_prefix gem install $rvm_gem_options $gem $gem_postfix $vars"
221
+ command="export GEM_HOME='$GEM_HOME' ; export GEM_PATH='$GEM_PATH' ; $gem_prefix gem install $rvm_gem_options $gem $gem_postfix $vars"
226
222
  else
227
223
  command="$gem_prefix gem install $rvm_gem_options -q $gem $gem_postfix $vars"
228
224
  fi
@@ -234,6 +230,7 @@ __rvm_gem_install() {
234
230
  $rvm_scripts_path/log "error" "$color_red$gem_name $gem_version$color_none failed to install, output has been logged to:\n$rvm_path/log/$rvm_ruby_string/gem.install.error.log"
235
231
  fi
236
232
  fi ; unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
233
+
237
234
  return $result
238
235
  }
239
236
 
@@ -830,7 +830,7 @@ __rvm_post_install() {
830
830
 
831
831
  __rvm_rubygems_setup() {
832
832
  if [[ ! -z "$(echo $rvm_ruby_version | awk '/^1\.9/')" ]] || [[ ! -z "$(echo $rvm_ruby_interpreter | awk '/^mput/')" ]] ; then
833
- # 1.9 has it's own built-in gem command
833
+ # 1.9.X has it's own built-in gem command
834
834
  __rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem"
835
835
  __rvm_inject_gem_env "$rvm_ruby_home/bin/gem"
836
836
  cp $rvm_ruby_src_path/bin/gem $rvm_ruby_home/bin/gem
@@ -26,10 +26,11 @@ __rvm_db() {
26
26
  __rvm_info() {
27
27
  if [[ ! -z "$(which ruby 2>/dev/null)" ]] ; then full_version=$(ruby -v) ; fi
28
28
 
29
- cat <<Info
29
+ echo -e "system:\n uname: \"$(uname -a)\""
30
+ if [[ ! -z "$ZSH_VERSION" ]] ; then echo -e " shell: \"zsh\"\n version: \"$ZSH_VERSION\"" ; fi
31
+ if [[ ! -z "$BASH_VERSION" ]] ; then echo -e " shell: \"bash\"\n version: \"$BASH_VERSION\"" ; fi
30
32
 
31
- system:
32
- uname: "$(uname -a)"
33
+ cat <<Info
33
34
 
34
35
  ruby:
35
36
  interpreter: "$(echo $full_version | awk '{print $1}')"
@@ -55,7 +56,7 @@ environment:
55
56
  MY_RUBY_HOME: "$MY_RUBY_HOME"
56
57
  IRBRC: "$IRBRC"
57
58
  Info
58
- if [[ ! -z "$MAGLEV_HOME" ]] ; then echo " MAGLEV_HOME: $MAGLEV_HOME" ; fi
59
+ if [[ ! -z "$MAGLEV_HOME" ]] ; then echo -e " MAGLEV_HOME: \"$MAGLEV_HOME\"" ; fi
59
60
 
60
61
  unset full_version
61
62
  }
@@ -752,6 +753,9 @@ __rvm_gems_select() {
752
753
  else
753
754
  rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gem_set_name"
754
755
  fi
756
+
757
+ if [[ ! -d "$rvm_ruby_gem_home" ]] ; then mkdir -p $rvm_ruby_gem_home ; fi
758
+
755
759
  rvm_ruby_gem_path="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
756
760
 
757
761
  # TODO: Remove next line after a few releases.
@@ -759,15 +763,24 @@ __rvm_gems_select() {
759
763
  # Careful not to nuke system gems cache.
760
764
  if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ ! -z "$(echo $rvm_ruby_gem_home | awk '/rvm/')" ]] ; then
761
765
  # Global gems cache
766
+ # Ensure that the ruby gem home exists.
762
767
  mkdir -p "$rvm_ruby_gem_home"
763
- if [[ ! -L "$rvm_ruby_gem_home/cache" ]] ; then
768
+
769
+ # If there is a cache *directory* already,
770
+ # move all the gems to the global cache directory and remove it.
771
+ if [[ -d "$rvm_ruby_gem_home/cache" ]] ; then
764
772
  for file in "$rvm_ruby_gem_home"/cache/* ; do
765
773
  mv $file "$rvm_gems_path/cache/" > /dev/null 2>&1
766
774
  done
767
775
  rm -rf "$rvm_ruby_gem_home/cache"
776
+ fi
777
+
778
+ # If the ruby's gems cache directory is not a symlink to the global cache,
779
+ # symlink it
780
+ if [[ ! -L "$rvm_ruby_gem_home/cache" ]] ; then
768
781
  ln -nfs "$rvm_gems_path/cache" "$rvm_ruby_gem_home/cache"
769
782
  fi
770
- fi
783
+ fi ; export rvm_ruby_gem_path rvm_ruby_gem_home
771
784
  }
772
785
 
773
786
  # Use a gems(et) specified by 'rvm_ruby_gem_home'
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.1.7
4
+ version: 0.1.8
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: 2010-02-04 00:00:00 -05:00
12
+ date: 2010-02-05 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15