rvm 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/lib/VERSION.yml +1 -1
  2. data/lib/rvm/environment.rb +1 -1
  3. data/lib/rvm/shell/shell_wrapper.sh +1 -1
  4. data/rvm.gemspec +3 -110
  5. metadata +4 -111
  6. data/binscripts/rvm +0 -76
  7. data/binscripts/rvm-auto-ruby +0 -24
  8. data/binscripts/rvm-prompt +0 -208
  9. data/binscripts/rvm-shell +0 -35
  10. data/binscripts/rvm-update-head +0 -58
  11. data/binscripts/rvm-update-latest +0 -27
  12. data/binscripts/rvmsudo +0 -20
  13. data/config/db +0 -71
  14. data/config/known +0 -54
  15. data/config/md5 +0 -139
  16. data/contrib/gemset_snapshot +0 -25
  17. data/contrib/install-system-wide +0 -221
  18. data/contrib/r +0 -44
  19. data/examples/rvmrc +0 -49
  20. data/gemsets/default.gems +0 -1
  21. data/gemsets/global.gems +0 -1
  22. data/help/alias +0 -46
  23. data/help/benchmark +0 -17
  24. data/help/cleanup +0 -23
  25. data/help/debug +0 -8
  26. data/help/disk-usage +0 -15
  27. data/help/docs +0 -22
  28. data/help/exec +0 -33
  29. data/help/fetch +0 -5
  30. data/help/gem +0 -0
  31. data/help/gemdir +0 -0
  32. data/help/gemset +0 -14
  33. data/help/implode +0 -0
  34. data/help/info +0 -62
  35. data/help/install +0 -0
  36. data/help/list +0 -0
  37. data/help/migrate +0 -15
  38. data/help/monitor +0 -0
  39. data/help/notes +0 -0
  40. data/help/package +0 -0
  41. data/help/rake +0 -14
  42. data/help/remove +0 -0
  43. data/help/repair +0 -23
  44. data/help/reset +0 -0
  45. data/help/ruby +0 -84
  46. data/help/rubygems +0 -11
  47. data/help/rvmrc +0 -34
  48. data/help/snapshot +0 -15
  49. data/help/specs +0 -0
  50. data/help/srcdir +0 -0
  51. data/help/tests +0 -0
  52. data/help/tools +0 -22
  53. data/help/uninstall +0 -0
  54. data/help/update +0 -0
  55. data/help/upgrade +0 -18
  56. data/help/use +0 -0
  57. data/help/wrapper +0 -41
  58. data/install +0 -667
  59. data/man/man1/rvm.1 +0 -380
  60. data/man/man1/rvm.1.gz +0 -0
  61. data/scripts/alias +0 -226
  62. data/scripts/aliases +0 -4
  63. data/scripts/array +0 -32
  64. data/scripts/base +0 -57
  65. data/scripts/cd +0 -94
  66. data/scripts/cleanup +0 -58
  67. data/scripts/cli +0 -798
  68. data/scripts/color +0 -49
  69. data/scripts/completion +0 -151
  70. data/scripts/db +0 -87
  71. data/scripts/default +0 -64
  72. data/scripts/disk-usage +0 -60
  73. data/scripts/docs +0 -115
  74. data/scripts/env +0 -46
  75. data/scripts/environment-convertor +0 -74
  76. data/scripts/fetch +0 -231
  77. data/scripts/gemsets +0 -1045
  78. data/scripts/get +0 -126
  79. data/scripts/hash +0 -37
  80. data/scripts/help +0 -46
  81. data/scripts/hook +0 -23
  82. data/scripts/info +0 -213
  83. data/scripts/initialize +0 -29
  84. data/scripts/install +0 -667
  85. data/scripts/irbrc +0 -13
  86. data/scripts/irbrc.rb +0 -64
  87. data/scripts/list +0 -315
  88. data/scripts/log +0 -38
  89. data/scripts/maglev +0 -193
  90. data/scripts/manage +0 -2157
  91. data/scripts/match +0 -6
  92. data/scripts/md5 +0 -22
  93. data/scripts/migrate +0 -175
  94. data/scripts/monitor +0 -105
  95. data/scripts/notes +0 -140
  96. data/scripts/override_gem +0 -14
  97. data/scripts/package +0 -302
  98. data/scripts/patches +0 -64
  99. data/scripts/patchsets +0 -87
  100. data/scripts/repair +0 -199
  101. data/scripts/rubygems +0 -157
  102. data/scripts/rvm +0 -128
  103. data/scripts/rvm-install +0 -667
  104. data/scripts/selector +0 -904
  105. data/scripts/set +0 -301
  106. data/scripts/snapshot +0 -262
  107. data/scripts/tools +0 -58
  108. data/scripts/update +0 -667
  109. data/scripts/upgrade +0 -144
  110. data/scripts/utility +0 -1499
  111. data/scripts/version +0 -17
  112. data/scripts/wrapper +0 -210
@@ -1,199 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- source "$rvm_path/scripts/base"
4
-
5
- usage()
6
- {
7
- printf "
8
- Usage:
9
-
10
- rvm repair [option]
11
-
12
- Options:
13
- wrappers - Repair wrappers
14
- symlinks - Repair symlinks
15
- environments - Repair environments
16
- archives - Repair archives
17
- gemsets - Repair gemsets
18
- all - Repair all of the above
19
-
20
- "
21
- }
22
-
23
- repair_gemsets()
24
- {
25
- local directory directories
26
-
27
- "$rvm_path/scripts/log" "info" \
28
- "Removing gemsets missing names or interpreters."
29
-
30
- (
31
- builtin cd "${rvm_gems_path:-"rvm_path/gems"}"
32
-
33
- directories=(
34
- $( find . -mindepth 1 -maxdepth 1 -type d | grep '@$' )
35
- $( find . -mindepth 1 -maxdepth 1 -type d | grep '^./@')
36
- )
37
-
38
- for directory in "${directories[@]//.\/}" ; do
39
-
40
- rm -rf "./$directory/"
41
-
42
- done
43
- )
44
-
45
- "$rvm_path/scripts/log" "info" "Gemsets repaired."
46
-
47
- return 0
48
- }
49
-
50
- repair_wrappers()
51
- {
52
- local wrapper_ruby_name
53
-
54
- "$rvm_path/scripts/log" "info" "Regenerating all wrappers..."
55
-
56
- while read -r wrapper_ruby_name ; do
57
-
58
- "$rvm_path/scripts/log" "info" \
59
- "Regenerating wrappers for $wrapper_ruby_name"
60
-
61
- __rvm_run "wrappers.regenerate" \
62
- "\"$rvm_path/scripts/wrapper\" '$wrapper_ruby_name'"
63
-
64
- done < <("$rvm_path/scripts/list" gemsets strings)
65
-
66
- "$rvm_path/scripts/log" "info" "Wrappers regenerated"
67
-
68
- return 0
69
- }
70
-
71
- # Removes stale symlinks in $rvm_bin_path, likely
72
- # related to wrappers.
73
- repair_symlinks()
74
- {
75
- "$rvm_path/scripts/log" "info" "Repairing symlinks..."
76
-
77
- (
78
- builtin cd "${rvm_bin_path:-"$rvm_path/bin"}"
79
-
80
- for executable_name in $(\find \. -type l); do
81
-
82
- if [[ -e "$executable_name" \
83
- || "$(readlink "$executable_name")" != "$rvm_path/wrappers/"* ]] ; then
84
- continue
85
- fi
86
-
87
- if [[ -f "$executable_name" ]] ; then
88
-
89
- "$rvm_path/scripts/log" "info" \
90
- "removing stale symlink from $(basename "$executable_name")"
91
-
92
- \rm -f "$executable_name"
93
-
94
- fi
95
- done
96
- )
97
-
98
- "$rvm_path/scripts/log" "info" "Symlinks repaired"
99
- }
100
-
101
- # Regenerates each symlink file.
102
- repair_environments()
103
- {
104
- local environment_name environments
105
-
106
- "$rvm_path/scripts/log" "info" "Regenerating environments..."
107
-
108
- environments=($(builtin cd "$rvm_path/environments" ; find . -maxdepth 1 -mindepth 1 -type f))
109
-
110
- for environment_name in "${environments[@]//.\/}" ; do
111
-
112
- [[ -L "$rvm_path/environments/$environment_name" ]] && continue
113
-
114
- "$rvm_path/scripts/log" "info" \
115
- "Regenerating environment file for '$environment_name'"
116
-
117
- [[ -f "$rvm_path/environments/$environment_name" ]] && \rm -f "$rvm_path/environments/$environment_name"
118
-
119
- (
120
- source "$rvm_path/scripts/base"
121
-
122
- __rvm_become "$environment_name"
123
-
124
- __rvm_ensure_has_environment_files
125
- )
126
-
127
- done
128
-
129
- "$rvm_path/scripts/log" "info" "Environments regenerated"
130
-
131
- return 0
132
- }
133
-
134
- # Removes archives that have incorrect md5 sums.
135
- repair_archives()
136
- {
137
- local archive_file archives stored_md5sum
138
-
139
- "$rvm_path/scripts/log" "info" "Repairing archives..."
140
-
141
- archives=($(builtin cd "${rvm_archives_path:-"$rvm_path/archives"}" ; find . -maxdepth 1 -mindepth 1 -type f))
142
-
143
- for archive_file in "${archives[@]//.\/}" ; do
144
-
145
- [[ -f "${rvm_archives_path:-"$rvm_path/archives"}/$archive_file" ]] || continue
146
-
147
- stored_md5sum="$("$rvm_path/scripts/db" "$rvm_path/config/md5" "$archive_file" | head -n1)"
148
-
149
- if [[ -n "$stored_md5sum" ]] ; then
150
-
151
- if ! "$rvm_path/scripts/md5" "${rvm_archives_path:-"$rvm_path/archives"}/$archive_file" "$stored_md5sum" ; then
152
-
153
- "$rvm_path/scripts/log" "info" "Removing archive for '$archive_file' - Incorrect md5 checksum."
154
-
155
- rm -rf "${rvm_archives_path:-"$rvm_path/archives"}/$archive_file"
156
- fi
157
- fi
158
- done
159
-
160
- "$rvm_path/scripts/log" "info" "Archives repaired"
161
-
162
- return 0
163
- }
164
-
165
- repair_all()
166
- {
167
- repair_symlinks
168
-
169
- repair_archives
170
-
171
- repair_environments
172
-
173
- repair_wrappers
174
-
175
- return 0
176
- }
177
-
178
- args=($*)
179
- action="${args[$__array_start]}"
180
- args[$__array_start]=""
181
- args=(${args[@]})
182
-
183
- if [[ -z "$action" ]]; then
184
- usage
185
- exit $?
186
- fi
187
-
188
- case "$action" in
189
- all) repair_all ;;
190
- symlinks) repair_symlinks ;;
191
- gemsets) repair_gemsets ;;
192
- environments) repair_environments ;;
193
- archives) repair_archives ;;
194
- wrappers) repair_wrappers ;;
195
- help) usage ;;
196
- *) usage >&2 ; exit 1 ;;
197
- esac
198
-
199
- exit $?
@@ -1,157 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- source "$rvm_path/scripts/base"
4
-
5
- result=0
6
-
7
- __rvm_become
8
-
9
- rubygems_setup()
10
- {
11
- __rvm_warn_on_rubyopt
12
-
13
- unset RUBYOPT
14
-
15
- if [[ -n "$(echo "$rvm_ruby_version" | awk '/^1\.9/')" || ! -z "$(echo $ruby_ruby_interpreter | awk '/^goruy/')" ]] ; then
16
- install=0
17
- elif [[ "$rvm_ruby_string" = "ruby-head" ]] ; then
18
- install=0
19
- elif [[ -n "$(echo "$rvm_ruby_string" | awk '/^rbx|jruby|rubinius/')" ]]; then
20
- install=0
21
- else
22
- install=1
23
- fi
24
-
25
- if [[ "$install" -eq 0 ]] ; then
26
-
27
- "$rvm_path/scripts/log" "error" \
28
- "Cannot switch to ${version} for this interpreter."
29
-
30
- exit 1
31
-
32
- else
33
-
34
- "$rvm_path/scripts/log" "info" \
35
- "Removing old Rubygems files..."
36
-
37
- rubygems_dir="$(ruby -rrbconfig -e "puts Config::CONFIG.values_at('sitelibdir','vendorlibdir').detect {|path| File.directory?(File.join(path, 'rubygems')) }.to_s")"
38
-
39
- if [[ -n "$rubygems_dir" && -d "$rubygems_dir" ]]; then
40
-
41
- # Remove common files installed by ruby gems.
42
- \rm -rf "${rubygems_dir}/ubygems.rb" "${rubygems_dir}/rubygems.rb" \
43
- "${rubygems_dir}/rubygems" "${rubygems_dir}/gauntlet_rubygems.rb"
44
-
45
- fi
46
-
47
- "$rvm_path/scripts/log" "info" "Installing rubygems dedicated to $rvm_ruby_string..."
48
-
49
- rvm_rubygems_version="$version"
50
- rvm_gem_package_name="rubygems-$rvm_rubygems_version"
51
- rvm_rubygems_url=$(__rvm_db "rubygems_${rvm_rubygems_version}_url")
52
- rvm_gem_url="$rvm_rubygems_url/$rvm_gem_package_name.tgz"
53
-
54
- # Sanity check... If setup.rb is missing from the rubygems source path,
55
- # something went wrong. Cleanup, aisle 3!
56
- if [[ ! -f "${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name/setup.rb" ]]; then
57
- \rm -rf "${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name"
58
- fi
59
-
60
- if [[ ! -d "${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name" ]] ; then
61
-
62
- "$rvm_path/scripts/log" "info" \
63
- "Retrieving $rvm_gem_package_name"
64
-
65
- "$rvm_path/scripts/fetch" "$rvm_gem_url" ; result=$?
66
-
67
- if [[ "$result" -gt 0 ]] ; then
68
-
69
- "$rvm_path/scripts/log" "error" \
70
- "There has been an error while trying to fetch the source. Aborting the installation."
71
-
72
- return $result
73
-
74
- fi
75
-
76
- if [[ ! -d "${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name" ]] ; then
77
- \mkdir -p "${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name"
78
- fi
79
-
80
- __rvm_run "rubygems.extract" \
81
- "gunzip < ${rvm_archives_path:-"$rvm_path/archives"}/$rvm_gem_package_name.tgz | tar xf - -C ${rvm_src_path:-"$rvm_path/src"}" \
82
- "Extracting $rvm_gem_package_name ..."
83
- fi
84
-
85
- builtin cd "${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name"
86
-
87
- __rvm_run "rubygems.install" \
88
- "GEM_PATH=\"$rvm_ruby_gem_path:$rvm_ruby_global_gems_path\" GEM_HOME=\"$rvm_ruby_gem_home\" \"$rvm_ruby_home/bin/ruby\" \"${rvm_src_path:-"$rvm_path/src"}/$rvm_gem_package_name/setup.rb\"" \
89
- "Installing rubygems for $rvm_ruby_home/bin/ruby"
90
- result=$?
91
-
92
- if [[ "$result" == 0 ]] ; then
93
-
94
- "$rvm_path/scripts/log" "info" \
95
- "Installation of rubygems completed successfully."
96
-
97
- else
98
-
99
- "$rvm_path/scripts/log" "warning" \
100
- "Installation of rubygems did not complete successfully."
101
-
102
- fi
103
-
104
- if [[ ! -z "$rvm_ruby_major_version" ]] ; then
105
- ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/${rvm_ruby_release_version}.${rvm_ruby_major_version}"
106
- else
107
- ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/$interpreter"
108
- fi
109
- fi
110
-
111
- # Add ruby's gem path to ruby's lib direcotry.
112
- \mkdir -p "$(dirname $ruby_lib_gem_path)"
113
-
114
- if [[ -d "$ruby_lib_gem_path" ]] ; then \rm -rf "$ruby_lib_gem_path" ; fi
115
-
116
- ln -nfs "$rvm_ruby_gem_home" "$ruby_lib_gem_path"
117
-
118
- unset ruby_lib_gem_path
119
- }
120
-
121
- if ! command -v ruby > /dev/null ; then
122
-
123
- "$rvm_path/scripts/log" "error" \
124
- "'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)"
125
-
126
- exit 1
127
-
128
- fi
129
-
130
- #
131
- # rvm rubygems use X
132
- #
133
- args=($*)
134
- version="${args[0]}"
135
- args="$(echo ${args[@]:1}) " # Strip trailing / leading / extra spacing.
136
-
137
- if [[ -z "$version" ]] ; then
138
-
139
- "$rvm_path/scripts/log" "error" \
140
- "A version must be specified, for example 'rvm rubygems 1.3.7'"
141
-
142
- exit 1
143
-
144
- fi
145
-
146
- # Update the rubygems to the current.
147
- if [[ "$version" = "current" ]]; then
148
-
149
- version="$(__rvm_db "${rvm_ruby_interpreter}_rubygems_version")"
150
-
151
- version="${rvm_rubygems_version:-"$(__rvm_db "rubygems_version")"}"
152
-
153
- fi
154
-
155
- rubygems_setup
156
-
157
- exit $result
@@ -1,128 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # rvm : Ruby enVironment Manager
4
- # http://rvm.beginrescueend.com
5
- # http://github.com/wayneeseguin/rvm
6
-
7
- # Is RVM loaded as a shell function already?
8
- if ! declare -f rvm > /dev/null || [[ ${rvm_reload_flag:-0} -eq 1 ]] ; then
9
-
10
- if [[ ${rvm_ignore_rvmrc:-0} -eq 0 ]]; then
11
-
12
- for rvmrc in /etc/rvmrc "$HOME/.rvmrc" ; do
13
-
14
- if [[ -f "$rvmrc" ]] ; then
15
-
16
- if \grep -q '^\s*rvm .*$' $rvmrc ; then
17
-
18
- printf "\nError: $rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
19
-
20
- return 1
21
-
22
- else
23
-
24
- source "$rvmrc"
25
-
26
- fi
27
-
28
- fi
29
-
30
- done
31
-
32
- fi
33
-
34
- # Set the default sandboxed value.
35
- if [[ -z "$rvm_selfcontained" ]]; then
36
-
37
- if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
38
-
39
- rvm_selfcontained=0
40
-
41
- else
42
-
43
- rvm_selfcontained=1
44
-
45
- fi
46
-
47
- fi
48
-
49
- if [[ -z "$rvm_prefix" ]] ; then
50
-
51
- if [[ "$rvm_selfcontained" = "0" ]] ; then
52
-
53
- rvm_prefix="/usr/local/"
54
-
55
- elif [[ -n "$HOME" ]] ; then
56
-
57
- rvm_prefix="$HOME/."
58
-
59
- else
60
-
61
- echo "No \$rvm_prefix was provided and $(id -un) has no \$HOME defined to find it with. Exploding violently."
62
- exit 1
63
-
64
- fi
65
-
66
- fi
67
-
68
- # Fix rvm_prefix changes.
69
- echo "$rvm_prefix" | \grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]
70
-
71
- rvm_prefix_needs_trailing_slash="$?"
72
-
73
- if [[ "$rvm_prefix" = "/usr/local" || "$rvm_prefix_needs_trailing_slash" = "0" ]]; then
74
-
75
- rvm_prefix="$rvm_prefix/"
76
-
77
- fi
78
-
79
- if [[ -z "$rvm_path" ]] ; then
80
- rvm_path="${rvm_prefix}rvm"
81
- fi
82
-
83
- if [[ -d "$rvm_path" ]] ; then
84
-
85
- for script in array utility initialize version selector cd cli override_gem ; do
86
-
87
- if [[ -f "$rvm_path/scripts/$script" ]] ; then
88
-
89
- source "$rvm_path/scripts/$script"
90
-
91
- else
92
-
93
- "$rvm_path/scripts/log" "error" \
94
- "RVM: Could not source script '$rvm_path/scripts/$script', file does not exist. RVM will likely not work as expected."
95
-
96
- fi
97
- done
98
-
99
- rvm_version="$(awk '/:/{printf $NF"."}' "$rvm_path/lib/VERSION.yml")"
100
-
101
- export rvm_version="${rvm_version/%.}"
102
-
103
- alias rvm-restart="source '${rvm_path}/scripts/rvm'"
104
-
105
- if ! command -v ruby >/dev/null 2>&1 || command -v ruby | \grep -v rvm >/dev/null ; then
106
-
107
- if [[ -s "$rvm_path/environments/default" ]] ; then
108
-
109
- source "$rvm_path/environments/default"
110
-
111
- fi
112
-
113
- fi
114
-
115
- # Makes sure rvm_bin_path is in PATH atleast once.
116
- __rvm_conditionally_add_bin_path
117
-
118
- else
119
- printf "\n\$rvm_path ($rvm_path) does not exist."
120
- fi
121
-
122
- unset rvm_prefix_needs_trailing_slash rvm_bin_path rvm_man_path rvm_rc_files rvm_gems_path rvm_gems_cache_path rvm_interactive_flag rvm_gems_path rvm_project_rvmrc_default rvm_gemset_separator
123
-
124
- fi
125
-
126
- if [[ ${rvm_interactive_flag:-0} -gt 0 ]]; then
127
- __rvm_project_rvmrc
128
- fi