rvm 1.0.21 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -7,7 +7,7 @@ Flags
7
7
 
8
8
  --head - with update, updates rvm to git head version.
9
9
  --rubygems - with update, updates rubygems for selected ruby
10
- --default - with ruby select, sets a default ruby for new shells.
10
+ --default - with 'rvm use X', sets the default ruby for new shells to X.
11
11
  --debug - Toggle debug mode on for very verbose output.
12
12
  --trace - Toggle trace mode on to see EVERYTHING rvm is doing.
13
13
  --force - Force install, removes old install & source before install.
data/config/db CHANGED
@@ -26,7 +26,7 @@ rubygems_version=1.3.7
26
26
  rubygems_1.3.5_url=http://rubyforge.org/frs/download.php/60718
27
27
  rubygems_1.3.6_url=http://rubyforge.org/frs/download.php/69365
28
28
  rubygems_1.3.7_url=http://rvm.beginrescueend.com/src/
29
- rbx_version=1.1.0
29
+ rbx_version=head
30
30
  rbx_1.0.0_patch_level=20100514
31
31
  rbx_1.0.1_patch_level=20100603
32
32
  rbx_1.1.0_patch_level=20100923
@@ -41,7 +41,7 @@ ree_1.8.6_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition.git
41
41
  ree_1.8.7_url=http://rvm.beginrescueend.com/src/
42
42
  ree_1.8.7_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition187.git
43
43
  ree_1.8.7_patch_level=2010.02
44
- jruby_version=1.5.3
44
+ jruby_version=1.5.5
45
45
  jruby_repo_url=git://github.com/jruby/jruby.git
46
46
  jruby_url=http://jruby.org.s3.amazonaws.com/downloads
47
47
  macruby_version=0.7.1
data/config/known CHANGED
@@ -21,7 +21,8 @@ jruby-1.3.1
21
21
  jruby-1.4.0
22
22
  jruby-1.5.1
23
23
  jruby-1.5.2
24
- jruby[-1.5.3]
24
+ jruby-1.5.3
25
+ jruby[-1.5.5]
25
26
  jruby-head
26
27
 
27
28
  # Rubinius
data/config/md5 CHANGED
@@ -19,6 +19,7 @@ jruby-bin-1.5.0.tar.gz=ee2b4e326e8b87858e5dd0c8e94102e6
19
19
  jruby-bin-1.5.1.tar.gz=0196dcfb17354f12253eaddc1166a0ee
20
20
  jruby-bin-1.5.2.tar.gz=d239deb9a108a6abbfbd6cb79cf8255b
21
21
  jruby-bin-1.5.3.tar.gz=ccb0b2dbc300d8dd4ad1bd4da48b8320
22
+ jruby-bin-1.5.5.tar.gz=8e00f7d40cbf221f733d6f7a15784e9a
22
23
  libiconv-1.13.1.tar.gz=7ab33ebd26687c744a37264a330bbe9a
23
24
  ncurses.tar.gz=cce05daf61a64501ef6cd8da1f727ec6
24
25
  openssl-0.9.8k.tar.gz=e555c6d58d276aec7fdc53363e338ab3
data/install CHANGED
@@ -42,7 +42,7 @@ usage()
42
42
 
43
43
  --version : display rvm package version
44
44
 
45
- "
45
+ \n"
46
46
  }
47
47
 
48
48
  check_rubyopt_conditions()
@@ -192,7 +192,15 @@ while [[ $# -gt 0 ]] ; do
192
192
  env | grep '^rvm_'
193
193
  set -o xtrace
194
194
  ;;
195
- --help|*) usage ;;
195
+ --help)
196
+ usage
197
+ exit 0
198
+ ;;
199
+ *)
200
+ echo "Unrecognized option: $token"
201
+ usage
202
+ exit 1
203
+ ;;
196
204
  esac
197
205
  done
198
206
 
data/lib/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 0
4
- :patch: 21
4
+ :patch: 22
data/rvm.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "1.0.21"
8
+ s.version = "1.0.22"
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-11-05}
12
+ s.date = %q{2010-11-16}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter environments and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -19,141 +19,141 @@ Gem::Specification.new do |s|
19
19
  ]
20
20
  s.files = [
21
21
  "LICENCE",
22
- "README",
23
- "binscripts/rvm",
24
- "binscripts/rvm-auto-ruby",
25
- "binscripts/rvm-prompt",
26
- "binscripts/rvm-shell",
27
- "binscripts/rvm-update-head",
28
- "binscripts/rvm-update-latest",
29
- "binscripts/rvmsudo",
30
- "config/db",
31
- "config/known",
32
- "config/md5",
33
- "contrib/gemset_snapshot",
34
- "contrib/install-system-wide",
35
- "contrib/r",
36
- "examples/rvmrc",
37
- "gemsets/default.gems",
38
- "gemsets/global.gems",
39
- "help/alias",
40
- "help/benchmark",
41
- "help/cleanup",
42
- "help/debug",
43
- "help/disk-usage",
44
- "help/docs",
45
- "help/exec",
46
- "help/fetch",
47
- "help/gem",
48
- "help/gemdir",
49
- "help/gemset",
50
- "help/implode",
51
- "help/info",
52
- "help/install",
53
- "help/list",
54
- "help/migrate",
55
- "help/monitor",
56
- "help/notes",
57
- "help/package",
58
- "help/rake",
59
- "help/remove",
60
- "help/repair",
61
- "help/reset",
62
- "help/ruby",
63
- "help/rubygems",
64
- "help/rvmrc",
65
- "help/snapshot",
66
- "help/specs",
67
- "help/srcdir",
68
- "help/tests",
69
- "help/tools",
70
- "help/uninstall",
71
- "help/update",
72
- "help/upgrade",
73
- "help/use",
74
- "help/wrapper",
75
- "install",
76
- "lib/VERSION.yml",
77
- "lib/rvm.rb",
78
- "lib/rvm/capistrano.rb",
79
- "lib/rvm/environment.rb",
80
- "lib/rvm/environment/alias.rb",
81
- "lib/rvm/environment/cleanup.rb",
82
- "lib/rvm/environment/configuration.rb",
83
- "lib/rvm/environment/env.rb",
84
- "lib/rvm/environment/gemset.rb",
85
- "lib/rvm/environment/info.rb",
86
- "lib/rvm/environment/list.rb",
87
- "lib/rvm/environment/rubies.rb",
88
- "lib/rvm/environment/sets.rb",
89
- "lib/rvm/environment/tools.rb",
90
- "lib/rvm/environment/utility.rb",
91
- "lib/rvm/environment/wrapper.rb",
92
- "lib/rvm/errors.rb",
93
- "lib/rvm/install_command_dumper.rb",
94
- "lib/rvm/shell.rb",
95
- "lib/rvm/shell/abstract_wrapper.rb",
96
- "lib/rvm/shell/calculate_rvm_path.sh",
97
- "lib/rvm/shell/result.rb",
98
- "lib/rvm/shell/shell_wrapper.sh",
99
- "lib/rvm/shell/single_shot_wrapper.rb",
100
- "lib/rvm/shell/utility.rb",
101
- "lib/rvm/version.rb",
102
- "man/man1/rvm.1",
103
- "man/man1/rvm.1.gz",
104
- "rvm.gemspec",
105
- "scripts/alias",
106
- "scripts/aliases",
107
- "scripts/array",
108
- "scripts/base",
109
- "scripts/cd",
110
- "scripts/cleanup",
111
- "scripts/cli",
112
- "scripts/color",
113
- "scripts/completion",
114
- "scripts/db",
115
- "scripts/default",
116
- "scripts/disk-usage",
117
- "scripts/docs",
118
- "scripts/env",
119
- "scripts/environment-convertor",
120
- "scripts/fetch",
121
- "scripts/gemsets",
122
- "scripts/get",
123
- "scripts/hash",
124
- "scripts/help",
125
- "scripts/hook",
126
- "scripts/info",
127
- "scripts/initialize",
128
- "scripts/install",
129
- "scripts/irbrc",
130
- "scripts/irbrc.rb",
131
- "scripts/list",
132
- "scripts/log",
133
- "scripts/maglev",
134
- "scripts/manage",
135
- "scripts/match",
136
- "scripts/md5",
137
- "scripts/migrate",
138
- "scripts/monitor",
139
- "scripts/notes",
140
- "scripts/override_gem",
141
- "scripts/package",
142
- "scripts/patches",
143
- "scripts/patchsets",
144
- "scripts/repair",
145
- "scripts/rubygems",
146
- "scripts/rvm",
147
- "scripts/rvm-install",
148
- "scripts/selector",
149
- "scripts/set",
150
- "scripts/snapshot",
151
- "scripts/tools",
152
- "scripts/update",
153
- "scripts/upgrade",
154
- "scripts/utility",
155
- "scripts/version",
156
- "scripts/wrapper"
22
+ "README",
23
+ "binscripts/rvm",
24
+ "binscripts/rvm-auto-ruby",
25
+ "binscripts/rvm-prompt",
26
+ "binscripts/rvm-shell",
27
+ "binscripts/rvm-update-head",
28
+ "binscripts/rvm-update-latest",
29
+ "binscripts/rvmsudo",
30
+ "config/db",
31
+ "config/known",
32
+ "config/md5",
33
+ "contrib/gemset_snapshot",
34
+ "contrib/install-system-wide",
35
+ "contrib/r",
36
+ "examples/rvmrc",
37
+ "gemsets/default.gems",
38
+ "gemsets/global.gems",
39
+ "help/alias",
40
+ "help/benchmark",
41
+ "help/cleanup",
42
+ "help/debug",
43
+ "help/disk-usage",
44
+ "help/docs",
45
+ "help/exec",
46
+ "help/fetch",
47
+ "help/gem",
48
+ "help/gemdir",
49
+ "help/gemset",
50
+ "help/implode",
51
+ "help/info",
52
+ "help/install",
53
+ "help/list",
54
+ "help/migrate",
55
+ "help/monitor",
56
+ "help/notes",
57
+ "help/package",
58
+ "help/rake",
59
+ "help/remove",
60
+ "help/repair",
61
+ "help/reset",
62
+ "help/ruby",
63
+ "help/rubygems",
64
+ "help/rvmrc",
65
+ "help/snapshot",
66
+ "help/specs",
67
+ "help/srcdir",
68
+ "help/tests",
69
+ "help/tools",
70
+ "help/uninstall",
71
+ "help/update",
72
+ "help/upgrade",
73
+ "help/use",
74
+ "help/wrapper",
75
+ "install",
76
+ "lib/VERSION.yml",
77
+ "lib/rvm.rb",
78
+ "lib/rvm/capistrano.rb",
79
+ "lib/rvm/environment.rb",
80
+ "lib/rvm/environment/alias.rb",
81
+ "lib/rvm/environment/cleanup.rb",
82
+ "lib/rvm/environment/configuration.rb",
83
+ "lib/rvm/environment/env.rb",
84
+ "lib/rvm/environment/gemset.rb",
85
+ "lib/rvm/environment/info.rb",
86
+ "lib/rvm/environment/list.rb",
87
+ "lib/rvm/environment/rubies.rb",
88
+ "lib/rvm/environment/sets.rb",
89
+ "lib/rvm/environment/tools.rb",
90
+ "lib/rvm/environment/utility.rb",
91
+ "lib/rvm/environment/wrapper.rb",
92
+ "lib/rvm/errors.rb",
93
+ "lib/rvm/install_command_dumper.rb",
94
+ "lib/rvm/shell.rb",
95
+ "lib/rvm/shell/abstract_wrapper.rb",
96
+ "lib/rvm/shell/calculate_rvm_path.sh",
97
+ "lib/rvm/shell/result.rb",
98
+ "lib/rvm/shell/shell_wrapper.sh",
99
+ "lib/rvm/shell/single_shot_wrapper.rb",
100
+ "lib/rvm/shell/utility.rb",
101
+ "lib/rvm/version.rb",
102
+ "man/man1/rvm.1",
103
+ "man/man1/rvm.1.gz",
104
+ "rvm.gemspec",
105
+ "scripts/alias",
106
+ "scripts/aliases",
107
+ "scripts/array",
108
+ "scripts/base",
109
+ "scripts/cd",
110
+ "scripts/cleanup",
111
+ "scripts/cli",
112
+ "scripts/color",
113
+ "scripts/completion",
114
+ "scripts/db",
115
+ "scripts/default",
116
+ "scripts/disk-usage",
117
+ "scripts/docs",
118
+ "scripts/env",
119
+ "scripts/environment-convertor",
120
+ "scripts/fetch",
121
+ "scripts/gemsets",
122
+ "scripts/get",
123
+ "scripts/hash",
124
+ "scripts/help",
125
+ "scripts/hook",
126
+ "scripts/info",
127
+ "scripts/initialize",
128
+ "scripts/install",
129
+ "scripts/irbrc",
130
+ "scripts/irbrc.rb",
131
+ "scripts/list",
132
+ "scripts/log",
133
+ "scripts/maglev",
134
+ "scripts/manage",
135
+ "scripts/match",
136
+ "scripts/md5",
137
+ "scripts/migrate",
138
+ "scripts/monitor",
139
+ "scripts/notes",
140
+ "scripts/override_gem",
141
+ "scripts/package",
142
+ "scripts/patches",
143
+ "scripts/patchsets",
144
+ "scripts/repair",
145
+ "scripts/rubygems",
146
+ "scripts/rvm",
147
+ "scripts/rvm-install",
148
+ "scripts/selector",
149
+ "scripts/set",
150
+ "scripts/snapshot",
151
+ "scripts/tools",
152
+ "scripts/update",
153
+ "scripts/upgrade",
154
+ "scripts/utility",
155
+ "scripts/version",
156
+ "scripts/wrapper"
157
157
  ]
158
158
  s.homepage = %q{http://github.com/wayneeseguin/rvm}
159
159
  s.post_install_message = %q{********************************************************************************
data/scripts/cd CHANGED
@@ -45,29 +45,40 @@ if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
45
45
  return $result
46
46
  }
47
47
 
48
- # If $CDPATH is set, bash should tab-complete based on directories in those paths,
49
- # but with the cd function above, the built-in tab-complete ignores $CDPATH. This
50
- # function returns that functionality.
51
- _rvm_cd_complete ()
52
- {
53
- local directory current matches item index sep
54
- sep="${IFS}"
55
- declare -x IFS=$'\n'
56
- COMPREPLY=()
57
- current="${COMP_WORDS[COMP_CWORD]}"
58
- if [[ -n "$CDPATH" && ${current:0:1} != "/" ]] ; then
59
- index=0
60
- for directory in $(printf "%s" "$CDPATH" | tr -s ':' ' ') ; do
61
- for item in $( compgen -d "$directory/$current" ) ; do
62
- COMPREPLY[index++]=${item#$directory/}
48
+ # This functionality is opt-in by setting rvm_cd_complete_flag=1 in ~/.rvmrc
49
+ # Generic bash cd completion seems to work great for most, so this is only
50
+ # for those that have some issues with that.
51
+ if [[ ${rvm_cd_complete_flag} = 1 ]] ; then
52
+
53
+ # If $CDPATH is set, bash should tab-complete based on directories in those paths,
54
+ # but with the cd function above, the built-in tab-complete ignores $CDPATH. This
55
+ # function returns that functionality.
56
+ _rvm_cd_complete ()
57
+ {
58
+ local directory current matches item index sep
59
+ sep="${IFS}"
60
+ declare -x IFS=$'\n'
61
+ COMPREPLY=()
62
+ current="${COMP_WORDS[COMP_CWORD]}"
63
+ if [[ -n "$CDPATH" && ${current:0:1} != "/" ]] ; then
64
+ index=0
65
+ # The change to IFS above means that the tr below should replace ':'
66
+ # with a newline rather than a space. A space would be ignored, breaking
67
+ # TAB completion based on CDPATH again
68
+ for directory in $(printf "%s" "$CDPATH" | tr -s ':' '\n') ; do
69
+ for item in $( compgen -d "$directory/$current" ) ; do
70
+ COMPREPLY[index++]=${item#$directory/}
71
+ done
63
72
  done
64
- done
65
- else
66
- COMPREPLY=( $(compgen -d ${current}) )
67
- fi
68
- declare -x IFS="${sep}";
69
- }
70
- complete -o bashdefault -o default -o filenames -o dirnames -o nospace -F _rvm_cd_complete cd
73
+ else
74
+ COMPREPLY=( $(compgen -d ${current}) )
75
+ fi
76
+ declare -x IFS="${sep}";
77
+ }
78
+
79
+ complete -o bashdefault -o default -o filenames -o dirnames -o nospace -F _rvm_cd_complete cd
80
+
81
+ fi
71
82
 
72
83
  fi
73
84
 
data/scripts/cli CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- __rvm_usage() { ${PAGER:-less} "${rvm_path:-$HOME/.rvm}/README" ; }
3
+ __rvm_usage() {
4
+ eval "${PAGER:-less -X} '${rvm_path:-$HOME/.rvm}/README'"
5
+ }
4
6
 
5
7
  __rvm_run_script()
6
8
  {
@@ -575,7 +577,9 @@ __rvm_parse_args()
575
577
  if "$rvm_path/scripts/match" "$rvm_token" ".rb$" ; then # we have a specified ruby script
576
578
  rvm_ruby_args="$rvm_token"
577
579
  rvm_ruby_file="$rvm_token"
578
- if [[ -z "${rvm_action:-""}" ]] ; then rvm_action="ruby" ; fi
580
+ if [[ -z "${rvm_action:-""}" || "$rvm_action" = "use" ]]; then
581
+ rvm_action="ruby"
582
+ fi
579
583
  else
580
584
  rvm_action="error"
581
585
  rvm_error_message="Unrecognized command line argument: '$rvm_token'"
@@ -725,7 +729,7 @@ rvm()
725
729
  rvm_ruby_gem_home="$gem_prefix"
726
730
  GEM_HOME="$rvm_ruby_gem_home"
727
731
  BUNDLE_PATH="$rvm_ruby_gem_home"
728
- GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}global/bin"
732
+ GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}global"
729
733
  export rvm_ruby_gem_home GEM_HOME BUNDLE_PATH GEM_PATH
730
734
  fi
731
735
  unset gem_prefix
data/scripts/gemsets CHANGED
@@ -470,7 +470,7 @@ gemset_unpack()
470
470
 
471
471
  if [[ -n "$rvm_ruby_gem_home" ]] ; then
472
472
  export GEM_HOME="$rvm_ruby_gem_home"
473
- export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin"
473
+ export GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
474
474
  export BUNDLE_PATH="$rvm_ruby_gem_home"
475
475
  fi
476
476
 
@@ -509,7 +509,7 @@ gemset_export()
509
509
 
510
510
  if [[ -n "$rvm_ruby_gem_home" ]] ; then
511
511
  export GEM_HOME="$rvm_ruby_gem_home"
512
- export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin"
512
+ export GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
513
513
  export BUNDLE_PATH="$rvm_ruby_gem_home"
514
514
  fi
515
515
 
@@ -616,7 +616,8 @@ gemset_import()
616
616
  done < <(awk '/^[^#]+/{print}' "${rvm_file_name}")
617
617
 
618
618
  else
619
- "$rvm_path/scripts/log" "error" "${rvm_file_name} does not exist to import from."
619
+ "$rvm_path/scripts/log" "error" \
620
+ "${rvm_file_name} does not exist to import from."
620
621
  fi
621
622
  }
622
623
 
@@ -748,7 +749,8 @@ gem_install()
748
749
 
749
750
  unset -f gem
750
751
 
751
- __rvm_run "gem.install" "$command" "installing ${gem_name} ${gem_version}..."
752
+ __rvm_run "gem.install" "$command" \
753
+ "installing ${gem_name} ${gem_version}..."
752
754
  result=$?
753
755
 
754
756
  if [[ $result -eq 0 ]] ; then
data/scripts/help CHANGED
@@ -15,23 +15,23 @@ args=(${args[@]})
15
15
  action="${args[$array_start]}"
16
16
  args[$__array_start]=""
17
17
  args=(${args[@]})
18
- pager="${PAGER:-less}"
18
+ pager="${PAGER:-less -X}"
19
19
 
20
20
  if [[ -n "$command" && -s "${rvm_help_path}/${command}" ]] ; then
21
21
 
22
22
  if [[ -n "$action" && -s "${rvm_help_path}/${command}/${action}" ]] ; then
23
23
 
24
- $pager "${rvm_help_path}/${command}/${action}"
24
+ eval "$pager '${rvm_help_path}/${command}/${action}'"
25
25
 
26
26
  else
27
27
 
28
- $pager "${rvm_help_path}/${command}"
28
+ eval "$pager '${rvm_help_path}/${command}'"
29
29
 
30
30
  fi
31
31
 
32
32
  else
33
33
 
34
- $pager "${rvm_path:-$HOME/.rvm}/README"
34
+ eval "$pager '${rvm_path:-$HOME/.rvm}/README'"
35
35
 
36
36
  "$rvm_path/scripts/log" "info" \
37
37
  "Commands available with 'rvm help':\n\n $(builtin cd "${rvm_help_path}" ; find . -maxdepth 1 -mindepth 1 -type f -print | \tr "\n" ' ' | sed -e 's#./##g')"
data/scripts/install CHANGED
@@ -42,7 +42,7 @@ usage()
42
42
 
43
43
  --version : display rvm package version
44
44
 
45
- "
45
+ \n"
46
46
  }
47
47
 
48
48
  check_rubyopt_conditions()
@@ -192,7 +192,15 @@ while [[ $# -gt 0 ]] ; do
192
192
  env | grep '^rvm_'
193
193
  set -o xtrace
194
194
  ;;
195
- --help|*) usage ;;
195
+ --help)
196
+ usage
197
+ exit 0
198
+ ;;
199
+ *)
200
+ echo "Unrecognized option: $token"
201
+ usage
202
+ exit 1
203
+ ;;
196
204
  esac
197
205
  done
198
206
 
data/scripts/list CHANGED
@@ -204,7 +204,7 @@ list_known()
204
204
 
205
205
  else
206
206
 
207
- ${PAGER:-less} "$rvm_path/config/known"
207
+ eval "${PAGER:-less -X} '$rvm_path/config/known'"
208
208
 
209
209
  fi
210
210
 
data/scripts/log CHANGED
@@ -16,21 +16,21 @@ if [[ ${rvm_pretty_print_flag:-0} -eq 0 ]] ; then
16
16
  fi
17
17
 
18
18
  case "$level" in
19
- info) printf "${message#*: }\n" ;;
20
- debug|warn) printf "$message\n" ;;
21
- error|fail) printf "$message\n" >&2 ;;
22
- *) printf "$message"
19
+ info) printf -- "${message#*: }\n" ;;
20
+ debug|warn) printf -- "$message\n" ;;
21
+ error|fail) printf -- "$message\n" >&2 ;;
22
+ *) printf "$message\n"
23
23
  esac
24
24
 
25
25
  else
26
26
 
27
27
  case "$level" in
28
- debug) printf "$(tput setaf 5)$level$(tput sgr0): $message\n" ;;
29
- info) printf "$(tput setaf 2)$level$(tput sgr0): $message\n" ;;
30
- warn) printf "$(tput setaf 3)$level$(tput sgr0): $message\n" ;;
31
- error) printf "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
32
- fail) printf "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
33
- *) printf "$message"
28
+ debug) printf -- "$(tput setaf 5)$level$(tput sgr0): $message\n" ;;
29
+ info) printf -- "$(tput setaf 2)$level$(tput sgr0): $message\n" ;;
30
+ warn) printf -- "$(tput setaf 3)$level$(tput sgr0): $message\n" ;;
31
+ error) printf -- "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
32
+ fail) printf -- "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
33
+ *) printf -- "$message\n"
34
34
  esac
35
35
 
36
36
  fi
data/scripts/manage CHANGED
@@ -648,8 +648,7 @@ RubyWrapper
648
648
 
649
649
  if [[ "$result" -gt 0 ]] ; then
650
650
  "$rvm_path/scripts/log" "error" \
651
- "There has been an error while running '$rvm_ruby_configure'. \
652
- \nHalting the installation."
651
+ "There has been an error while running '$rvm_ruby_configure'.\nHalting the installation."
653
652
  return $result
654
653
  fi ; unset ruby
655
654
 
data/scripts/package CHANGED
@@ -297,6 +297,6 @@ else
297
297
  "$rvm_path/scripts/log" "info" \
298
298
  " 'ree_dependencies' installs zlib, ncurses, readline, openssl and iconv in this order."
299
299
  "$rvm_path/scripts/log" "info" \
300
- " still need to add '-C --with-readline-dir=\$rvm_path/usr,--with-iconv-dir=\$rvm_path/usr,--with-zlib-dir=\$rvm_path/usr,--with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'"
300
+ " still need to add ' --with-readline-dir=\$rvm_path/usr --with-iconv-dir=\$rvm_path/usr --with-zlib-dir=\$rvm_path/usr --with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'"
301
301
  exit 1
302
302
  fi
data/scripts/rvm CHANGED
@@ -4,9 +4,8 @@
4
4
  # http://rvm.beginrescueend.com
5
5
  # http://github.com/wayneeseguin/rvm
6
6
 
7
- grep -q '^rvm ()' < <( declare -f ) # Is RVM is a shell function?
8
-
9
- if [[ $? -gt 0 || ${rvm_reload_flag:-0} -eq 1 ]] ; then
7
+ # Is RVM loaded as a shell function already?
8
+ if ! declare -f rvm > /dev/null || [[ ${rvm_reload_flag:-0} -eq 1 ]] ; then
10
9
 
11
10
  if [[ ${rvm_ignore_rvmrc:-0} -eq 0 ]]; then
12
11
 
data/scripts/rvm-install CHANGED
@@ -42,7 +42,7 @@ usage()
42
42
 
43
43
  --version : display rvm package version
44
44
 
45
- "
45
+ \n"
46
46
  }
47
47
 
48
48
  check_rubyopt_conditions()
@@ -192,7 +192,15 @@ while [[ $# -gt 0 ]] ; do
192
192
  env | grep '^rvm_'
193
193
  set -o xtrace
194
194
  ;;
195
- --help|*) usage ;;
195
+ --help)
196
+ usage
197
+ exit 0
198
+ ;;
199
+ *)
200
+ echo "Unrecognized option: $token"
201
+ usage
202
+ exit 1
203
+ ;;
196
204
  esac
197
205
  done
198
206
 
data/scripts/selector CHANGED
@@ -529,7 +529,7 @@ __rvm_ruby_string()
529
529
 
530
530
  case "$string" in
531
531
 
532
- 0.*|1.*)
532
+ 0.[[:digit:]]|0.[[:digit:]]\.[[:digit:]]|1.[[:digit:]]\.[[:digit:]])
533
533
  rvm_ruby_version="$string"
534
534
  rvm_ruby_revision=""
535
535
  rvm_ruby_tag=""
@@ -659,11 +659,17 @@ __rvm_ruby_string()
659
659
 
660
660
  if [[ -n "${patch_level:-""}" ]] ; then
661
661
 
662
- if [[ "ree" = "$rvm_ruby_interpreter" ]] || [[ "rbx" = "$rvm_ruby_interpreter" ]] ; then
663
- rvm_ruby_patch_level="${patch_level}"
664
- else
665
- rvm_ruby_patch_level="p${patch_level}"
666
- fi
662
+ case "$rvm_ruby_interpreter" in
663
+ ree|rbx)
664
+ # REE & Rubinius use dates for their patch levels.
665
+ rvm_ruby_patch_level="${patch_level}"
666
+ ;;
667
+ *)
668
+ # MRI uses -pN+ to specify the patch level.
669
+ rvm_ruby_patch_level="p${patch_level}"
670
+ ;;
671
+ esac
672
+
667
673
  fi
668
674
 
669
675
  if [[ -n "${rvm_ruby_patch_level:-""}" ]] ; then
@@ -671,13 +677,19 @@ __rvm_ruby_string()
671
677
  rvm_ruby_patch_level="${rvm_ruby_patch_level/#pp/p}"
672
678
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch_level}"
673
679
 
674
- if [[ "ree" = "${rvm_ruby_interpreter:-""}" || "rbx" = "${rvm_ruby_interpreter:-""}" ]] ; then
675
- rvm_ruby_string="${rvm_ruby_string//-p*/-}"
680
+ case "$rvm_ruby_interpreter" in
681
+
682
+ ree|rbx)
683
+ rvm_ruby_string="${rvm_ruby_string//-p*/-}"
684
+ ;;
685
+
686
+ *)
687
+ rvm_ruby_string="${rvm_ruby_string//-pp/-p}"
688
+ rvm_ruby_string="${rvm_ruby_string//-prc/-rc}"
689
+ ;;
690
+
691
+ esac
676
692
 
677
- else
678
- rvm_ruby_string="${rvm_ruby_string//-pp/-p}"
679
- rvm_ruby_string="${rvm_ruby_string//-prc/-rc}"
680
- fi
681
693
  fi
682
694
  fi
683
695
 
@@ -740,13 +752,16 @@ __rvm_gemset_select()
740
752
  if [[ -n "${rvm_ruby_string:-""}" ]] ; then
741
753
 
742
754
  if [[ -z "${rvm_ruby_gem_home:-""}" || -n "${gemset:-""}" ]] ; then
755
+
743
756
  rvm_ruby_gem_home="${rvm_gems_path:-"$rvm_path/gems"}/${rvm_ruby_string}${rvm_gemset_separator:-"@"}${rvm_gemset_name}"
744
757
 
745
758
  elif [[ -n "${gemset:-""}" && "${rvm_gemset_name:-""}" != "${gemset:-""}" ]] ; then
759
+
746
760
  rvm_ruby_gem_home="${rvm_gems_path:-"$rvm_path/gems"}/${rvm_ruby_string}${rvm_gemset_separator:-"@"}${rvm_gemset_name}"
747
761
  fi
748
762
  else
749
- "$rvm_path/scripts/log" "error" "Gemsets can not be used with non rvm controlled rubies (currently)."
763
+ "$rvm_path/scripts/log" "error" \
764
+ "Gemsets can not be used with non rvm controlled rubies (currently)."
750
765
  return 1
751
766
  fi
752
767
  fi
@@ -758,7 +773,10 @@ __rvm_gemset_select()
758
773
 
759
774
  if [[ ${rvm_gemset_create_on_use_flag:-0} -ne 1 && ${rvm_create_flag:-0} -ne 1 && ${rvm_delete_flag:-0} -ne 1 ]] ; then
760
775
 
761
- "$rvm_path/scripts/log" "error" "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
776
+ "$rvm_path/scripts/log" "error" \
777
+ "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
778
+
779
+ unset rvm_gemset_name gemset_name
762
780
 
763
781
  return 1
764
782
  fi
@@ -776,12 +794,18 @@ __rvm_gemset_select()
776
794
 
777
795
  # Ensure that the ruby gem home exists.
778
796
  \mkdir -p "$rvm_ruby_gem_home"
779
- if [[ -n "${rvm_ruby_gem_home:-""}" ]] && echo "$rvm_ruby_gem_home" | \grep -q 'rvm'; then
797
+
798
+ if [[ -n "${rvm_ruby_gem_home:-""}" ]] &&
799
+ echo "$rvm_ruby_gem_home" | \grep -q 'rvm'; then
800
+
780
801
  if __rvm_using_gemset_globalcache && [[ ! -L "$rvm_ruby_gem_home/cache" ]]; then
802
+
781
803
  \mv "$rvm_ruby_gem_home/cache/"*.gem "$rvm_gems_cache_path/" 2>/dev/null
782
804
  \rm -rf "$rvm_ruby_gem_home/cache"
783
805
  \ln -nfs "$rvm_gems_cache_path" "$rvm_ruby_gem_home/cache"
806
+
784
807
  fi
808
+
785
809
  fi
786
810
 
787
811
  export rvm_ruby_gem_path rvm_ruby_gem_home
@@ -791,9 +815,12 @@ __rvm_gemset_select()
791
815
  __rvm_gemset_use()
792
816
  {
793
817
  if [[ -z "${rvm_gemset_name:-""}" ]] ; then
818
+
794
819
  "$rvm_path/scripts/log" "error" \
795
820
  "Gemset was not given.\n Usage:\n rvm gemset use <gemsetname>\n"
821
+
796
822
  return 1
823
+
797
824
  fi
798
825
 
799
826
  if [[ -n "${rvm_ruby_gem_home:-""}" ]] ; then
@@ -816,6 +843,7 @@ __rvm_gemset_use()
816
843
  fi
817
844
 
818
845
  rvm_ruby_gem_home="${GEM_HOME//${rvm_gemset_separator:-"@"}*}${rvm_gemset_separator:-"@"}${rvm_gemset_name}"
846
+
819
847
  rvm_ruby_global_gems_path="${rvm_ruby_gem_home%%${rvm_gemset_separator:-"@"}*}${rvm_gemset_separator:-"@"}global"
820
848
 
821
849
  GEM_HOME="$rvm_ruby_gem_home"
@@ -847,6 +875,5 @@ __rvm_gemset_clear()
847
875
  export rvm_ruby_gem_home rvm_ruby_global_gems_path GEM_HOME BUNDLE_PATH GEM_PATH
848
876
 
849
877
  __rvm_use # Now ensure the selection takes effect for the environment.
850
-
851
878
  }
852
879
 
data/scripts/set CHANGED
@@ -23,7 +23,7 @@ __rvm_ruby_do()
23
23
 
24
24
  if [[ "$action" = "exec" ]]; then
25
25
  # Exec is a special case.
26
- rvm_command="${args[@]}"
26
+ command="${args[@]}"
27
27
 
28
28
  else
29
29
 
@@ -70,22 +70,21 @@ __rvm_ruby_do()
70
70
  # TODO: the else case below should be run if $args =~ /\.rb$/
71
71
  if [[ "ruby" = "$(basename $binary)" && "$rvm_benchmark_flag" -ne 1 ]] ; then
72
72
 
73
- if "$rvm_path/scripts/match" "${args[@]}" "\.rb$" ; then
73
+ case "${args[@]}" in
74
74
 
75
- if [[ -z "$prefix" ]] ; then prefix="-S" ; fi
75
+ *[:space:]-S[:space:]*)
76
+ command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path ${args[@]}"
77
+ ;;
76
78
 
77
- if ! "$rvm_path/scripts/match" "${args[@]}" "$prefix" ; then
79
+ *)
80
+ command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path -S ${args[@]}"
81
+ ;;
78
82
 
79
- args=($prefix ${args[@]})
80
-
81
- fi
82
- fi
83
-
84
- rvm_command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path ${args[@]}"
83
+ esac
85
84
 
86
85
  else
87
86
 
88
- rvm_command="$binary $rvm_ruby_mode ${args[@]}"
87
+ command="$binary $rvm_ruby_mode ${args[@]}"
89
88
 
90
89
  fi
91
90
 
@@ -99,7 +98,7 @@ __rvm_ruby_do()
99
98
 
100
99
  touch ./log/$rvm_ruby_string/$action.log ./log/$rvm_ruby_string/$action.error.log
101
100
 
102
- eval "$rvm_command" \
101
+ eval "$command" \
103
102
  >> ./log/$rvm_ruby_string/$action.log \
104
103
  2>> ./log/$rvm_ruby_string/$action.error.log
105
104
 
@@ -119,7 +118,7 @@ __rvm_ruby_do()
119
118
 
120
119
  unset current_env
121
120
  fi
122
- eval "$rvm_command"
121
+ eval "$command"
123
122
  fi
124
123
  result=$?
125
124
 
data/scripts/tools CHANGED
@@ -23,7 +23,7 @@ tools_path_identifier()
23
23
 
24
24
  source "$rvm_path/scripts/rvm"
25
25
  builtin cd "$1"
26
- rvm_promptless=1 __rvm_project_rvmrc
26
+ rvm_promptless=1 __rvm_project_rvmrc >/dev/null 2>&1
27
27
  rvmrc_result="$?"
28
28
  __rvm_environment_identifier
29
29
  exit $rvmrc_result
data/scripts/update CHANGED
@@ -42,7 +42,7 @@ usage()
42
42
 
43
43
  --version : display rvm package version
44
44
 
45
- "
45
+ \n"
46
46
  }
47
47
 
48
48
  check_rubyopt_conditions()
@@ -192,7 +192,15 @@ while [[ $# -gt 0 ]] ; do
192
192
  env | grep '^rvm_'
193
193
  set -o xtrace
194
194
  ;;
195
- --help|*) usage ;;
195
+ --help)
196
+ usage
197
+ exit 0
198
+ ;;
199
+ *)
200
+ echo "Unrecognized option: $token"
201
+ usage
202
+ exit 1
203
+ ;;
196
204
  esac
197
205
  done
198
206
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 21
10
- version: 1.0.21
9
+ - 22
10
+ version: 1.0.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wayne E. Seguin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-05 00:00:00 -04:00
18
+ date: 2010-11-16 00:00:00 -05:00
19
19
  default_executable: rvm-install
20
20
  dependencies: []
21
21