rvm 1.0.0 → 1.0.1

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
@@ -17,7 +17,6 @@ Flags
17
17
  --docs - with install, attempt to generate ri after installation.
18
18
  --reconfigure - Force ./configure on install even if Makefile already exists.
19
19
 
20
-
21
20
  Options
22
21
 
23
22
  -v|--version - Emit rvm version loaded for current shell
@@ -41,58 +40,74 @@ Options
41
40
  options then append them comma separated: -C --...,--...,--...
42
41
  --nice - process niceness (for slow computers, default 0)
43
42
  --ree-options - Options passed directly to ree's './installer' on the command line.
43
+ --with-rubies - Specifies a string for rvm to attempt to expand for set operations.
44
44
 
45
45
  Action
46
46
 
47
- * usage - show this usage information
48
- version - show the rvm version installed in rvm_path
49
- use - setup current shell to use a specific ruby version
50
- reload - reload rvm source itself (useful after changing rvm source)
51
- implode - (seppuku) removes the rvm installation completely.
52
- This means everything in $rvm_path (~/.rvm).
53
- This does not touch your profiles, which is why
54
- there is an if around the sourcing scripts/rvm.
55
- update - upgrades rvm to the latest version.
56
- (If you experience bugs try this first with --head)
57
- reset - remove current and stored default & system settings.
58
- (If you experience odd behavior try this second)
59
- info - show the *current* environment information for current ruby
60
- debug - show info plus additional information for common issues
61
-
62
- install - install one or many ruby versions
63
- See also: http://rvm.beginrescueend.com/rubies/installing/
64
- uninstall - uninstall one or many ruby versions, leaves their sources
65
- remove - uninstall one or many ruby versions and remove their sources
66
-
67
- wrapper - generates a set of wrapper executables for a given ruby with the
68
- specified ruby and gemset combination. Used under the hood for
69
- passenger support and the like.
70
-
71
- cleanup - Lets you remove stale source folders / archives and other miscellaneous
72
- data associated with rvm.
73
-
74
- ruby - runs a named ruby file against specified and/or all rubies
75
- gem - runs a gem command using selected ruby's 'gem'
76
- rake - runs a rake task against specified and/or all rubies
77
- tests - runs 'rake test' across selected ruby versions
78
- specs - runs 'rake spec' across selected ruby versions
79
- monitor - Monitor cwd for testing, run `rake {spec,test}` on changes.
80
-
81
- gemset - gemsets: http://rvm.beginrescueend.com/gemsets/
82
-
83
- gemdir - display the path to the current gem directory (GEM_HOME).
84
- srcdir - display the path to rvm source directory (may be yanked)
85
-
86
- fetch - Performs an archive / src fetch only of the selected ruby.
87
- list - show currently installed rubies, interactive output.
88
- http://rvm.beginrescueend.com/rubies/list/
89
- package - Install a dependency package {readline,iconv,zlib,openssl}
90
- http://rvm.beginrescueend.com/packages/
91
- notes - Display notes, with operating system specifics.
92
-
93
- snapshot - Let's your backup / restore an rvm installation in a lightweight manner.
47
+ (Note that for most actions, 'rvm help action-name' may provide more information.)
48
+
49
+ * usage - show this usage information
50
+ version - show the rvm version installed in rvm_path
51
+ use - setup current shell to use a specific ruby version
52
+ reload - reload rvm source itself (useful after changing rvm source)
53
+ implode - (seppuku) removes the rvm installation completely.
54
+ This means everything in $rvm_path (~/.rvm).
55
+ This does not touch your profiles, which is why
56
+ there is an if around the sourcing scripts/rvm.
57
+ update - upgrades rvm to the latest version.
58
+ (If you experience bugs try this first with --head)
59
+ reset - remove current and stored default & system settings.
60
+ (If you experience odd behavior try this second)
61
+ info - show the *current* environment information for current ruby
62
+ debug - show info plus additional information for common issues
63
+
64
+ install - install one or many ruby versions
65
+ See also: http://rvm.beginrescueend.com/rubies/installing/
66
+ uninstall - uninstall one or many ruby versions, leaves their sources
67
+ remove - uninstall one or many ruby versions and remove their sources
68
+
69
+ migrate - Lets you migrate all gemsets from one ruby to another.
70
+ upgrade - Lets you upgrade from one version of a ruby to another, including
71
+ migrating your gemsets semi-automatically.
72
+
73
+ wrapper - generates a set of wrapper executables for a given ruby with the
74
+ specified ruby and gemset combination. Used under the hood for
75
+ passenger support and the like.
76
+
77
+ cleanup - Lets you remove stale source folders / archives and other miscellaneous
78
+ data associated with rvm.
79
+ repair - Lets you repair parts of your environment e.g. wrappers, env files and
80
+ and similar files (e.g. general maintenance).
81
+ snapshot - Lets your backup / restore an rvm installation in a lightweight manner.
94
82
 
95
- migrate - Let's you migrate all gemsets from one ruby to another.
83
+ disk-usage - Tells you how much disk space rvm install is using.
84
+ tools - Provides general information about the ruby environment,
85
+ primarily useful when scripting rvm.
86
+ docs - Tools to make installing ri and rdoc documentation easier.
87
+ rvmrc - Tools related to managing rvmrc trust and loading.
88
+
89
+ exec - runs an arbitrary command as a set operation.
90
+ ruby - runs a named ruby file against specified and/or all rubies
91
+ gem - runs a gem command using selected ruby's 'gem'
92
+ rake - runs a rake task against specified and/or all rubies
93
+ tests - runs 'rake test' across selected ruby versions
94
+ specs - runs 'rake spec' across selected ruby versions
95
+ monitor - Monitor cwd for testing, run `rake {spec,test}` on changes.
96
+
97
+ gemset - gemsets: http://rvm.beginrescueend.com/gemsets/
98
+
99
+ rubygems - Lets you switch the installed version of rubygems for a given
100
+ 1.8-compatible ruby.
101
+
102
+ gemdir - display the path to the current gem directory (GEM_HOME).
103
+ srcdir - display the path to rvm source directory (may be yanked)
104
+
105
+ fetch - Performs an archive / src fetch only of the selected ruby.
106
+ list - show currently installed rubies, interactive output.
107
+ http://rvm.beginrescueend.com/rubies/list/
108
+ package - Install a dependency package {readline,iconv,zlib,openssl}
109
+ http://rvm.beginrescueend.com/packages/
110
+ notes - Display notes, with operating system specifics.
96
111
 
97
112
  Implementation
98
113
 
@@ -109,9 +124,7 @@ Implementation
109
124
  default - use rvm set default ruby and system if it hasn't been set.
110
125
  http://rvm.beginrescueend.com/rubies/default/
111
126
 
112
-
113
127
  Resources:
114
128
 
115
129
  http://rvm.beginrescueend.com/
116
130
  https://www.pivotaltracker.com/projects/26822
117
-
@@ -14,6 +14,6 @@ else
14
14
  fi
15
15
 
16
16
  [[ -s "$rvm_environments_path/default" ]] && source "$rvm_environments_path/default"
17
- rvm load-rvmrc > /dev/null 2>&1
17
+ rvm rvmrc load > /dev/null 2>&1
18
18
 
19
19
  exec ruby "$@"
@@ -27,7 +27,7 @@ if [[ -n "$rvm_shell_rvm_path" ]]; then
27
27
  exit 1
28
28
  fi
29
29
  else
30
- rvm load-rvmrc >/dev/null 2>&1
30
+ rvm rvmrc load >/dev/null 2>&1
31
31
  fi
32
32
  fi
33
33
 
@@ -4,7 +4,7 @@ __rvm_system_wide_permissions() {
4
4
  [[ -z "$1" ]] && return 1
5
5
  chown -R root:"$rvm_group_name" "$1"
6
6
  chmod -R g+w "$1"
7
- [[ -d "$1" ]] && find "$1" -type d | xargs -n1 chmod g+s
7
+ [[ -d "$1" ]] && find "$1" -type d -print0 | xargs -n1 -0 chmod g+s
8
8
  }
9
9
 
10
10
  # Require root to install it.
@@ -30,8 +30,8 @@ rvm_path="${rvm_path:-"/usr/local/rvm"}"
30
30
  export rvm_selfcontained=0
31
31
 
32
32
  rvm_group_name="${rvm_group_name:-"rvm"}"
33
- if cat /etc/group | cut -d: -f1 | \grep -q "^${rvm_group_name}$"; then
34
- echo "Group exists, proceeding with installation."
33
+ if \grep -q "${rvm_group_name}$" /etc/group ; then
34
+ echo "Group '$rvm_group_name' exists, proceeding with installation."
35
35
  else
36
36
  echo "Creating the group '$rvm_group_name'"
37
37
  groupadd -f "$rvm_group_name"
@@ -0,0 +1,23 @@
1
+
2
+ ∴ rvm cleanup {all,archives,repos,sources,logs}
3
+
4
+ Performs general cleanup for the specific set of rvm directories.
5
+
6
+ Useful for reclaiming needlessly used disk space from rvm compiles
7
+ and the like.
8
+
9
+ Examples:
10
+
11
+ To reclaim all of the space used by archives, repository clones,
12
+ source files (and associated temporary compile file) and logs, you'd
13
+ run:
14
+
15
+ ∴ rvm cleanup all
16
+
17
+ If instead you only wanted to clean up source files, you'd run:
18
+
19
+ ∴ rvm cleanup sources
20
+
21
+ Please note that sometimes have archives and sources around are desirable.
22
+ Namely, you need the sources to install something such as ruby-debug under
23
+ 1.9.
@@ -0,0 +1,15 @@
1
+
2
+ ∴ rvm disk-usage {all,archives,repos,sources,logs,packages,rubies,gemsets}
3
+
4
+ Returns the amount of disk space used by a specific set of data associated
5
+ with rvm. All returns all of them individually plus the total space used.
6
+
7
+ Examples:
8
+
9
+ To find out how much space your rvm install is using, simply run:
10
+
11
+ ∴ rvm disk-usage all
12
+
13
+ To find out how much space only your gemsets use, run:
14
+
15
+ ∴ rvm disk-usage gemsets
@@ -0,0 +1,22 @@
1
+
2
+ ∴ rvm docs {generate,generate-ri,generate-rdoc}
3
+
4
+ Generates ri and / or rdoc documentation for the current ruby.
5
+
6
+ If you have the hanna gem installed, rdoc generation should automatically use it.
7
+ Alternatively, you can pass the --docs flag to automatically call 'rvm docs generate'
8
+ as part of the install process.
9
+
10
+ Examples:
11
+
12
+ ∴ rvm docs generate
13
+
14
+ Generates both ri and rdoc documentation for the current ruby.
15
+
16
+ ∴ rvm docs generate-ri
17
+
18
+ Generates only ri documentation for the current ruby.
19
+
20
+ ∴ rvm docs generate-rdoc
21
+
22
+ Generates only rdoc documentation for the current ruby.
@@ -0,0 +1,33 @@
1
+
2
+ ∴ rvm exec some-command
3
+
4
+ Executes arbitrary commands against rvm set operations. If given a set that
5
+ matches a single ruby command, it will exec the command directly without printing
6
+ out extra rvm information.
7
+
8
+ Examples:
9
+
10
+ To execute 'ruby -v' against all installed rubies and aliases, you would run:
11
+
12
+ ∴ rvm exec ruby -v
13
+
14
+ If you instead want to execute it against a specific ruby (without extra logging
15
+ / data printed by rvm as is done with normal set operations), you can instead do:
16
+
17
+ ∴ rvm ree exec ruby -v
18
+
19
+ Since it is a set operation, normal ruby specifiers will work. As an example, to run
20
+ it against 1.9.2 and 1.8.7, you would run:
21
+
22
+ ∴ rvm 1.9.2,1.8.7 exec ruby -v
23
+
24
+ Or, to execute 'gem env' against all gemsets:
25
+
26
+ ∴ rvm --with-rubies all-gemsets exec gem env
27
+
28
+ To execute 'which ruby' in the current directory, loading a .rvmrc and falling back
29
+ to the default ruby:
30
+
31
+ ∴ rvm --with-rubies default-with-rvmrc exec which ruby
32
+
33
+ For more information, look up the rvm set operations.
@@ -0,0 +1,15 @@
1
+
2
+ ∴ rvm migrate from to
3
+
4
+ Efficiently moves the gems from one ruby to another.
5
+ Like 'rvm gemset copy' but removes the gems from the source
6
+ ruby afterwards and runs it against all gemsets for a given
7
+ ruby.
8
+
9
+ Examples:
10
+
11
+ To migrate all gemsets from rc2 of 1.9.2 to the first release, p0,
12
+ you'd run:
13
+
14
+ ∴ rvm migrate 1.9.2-rc2 1.9.2-p0
15
+
@@ -0,0 +1,23 @@
1
+
2
+ ∴ rvm repair {symlinks,environments,archives,all}
3
+
4
+ Runs generate repair processes against given parts of rvm.
5
+
6
+ Examples:
7
+
8
+ To regenerate all of the environment files inside your rvm/environments
9
+ directory, you'd run:
10
+
11
+ ∴ rvm repair environments
12
+
13
+ To check for stale symlinks caused by rvm in your rvm_bin_path, you'd run:
14
+
15
+ ∴ rvm repair symlinks
16
+
17
+ To verify all downloaded archives have the correct md5, you'd run:
18
+
19
+ ∴ rvm repair archives
20
+
21
+ Or, to do all of the above, you'd run:
22
+
23
+ ∴ rvm repair all
@@ -0,0 +1,11 @@
1
+
2
+ ∴ rvm rubygems [version]
3
+
4
+ Installs a specific rubygems version in the current ruby. If
5
+ current is specified, will install the most current rubygems
6
+ as known by rvm.
7
+
8
+ Please note that currently this is only compatible with ruby
9
+ 1.8.* and ruby enterprise edition. If your system isn't supported,
10
+ running the command will generate an error message.
11
+
data/help/rvmrc CHANGED
@@ -0,0 +1,34 @@
1
+
2
+ ∴ rvm rvmrc {trust,untrust,trusted,load,reset} [optional-path]
3
+
4
+ Tools for dealing with and loading the rvmrc trust for a given directory.
5
+ All actions take an optional path to a directory to check.
6
+
7
+ Examples:
8
+
9
+ To check the status of ~/My/project, you'd run:
10
+
11
+ ∴ rvm rvmrc trusted ~/My/project
12
+
13
+ Or, more conventionally,
14
+
15
+ ∴ cd ~/My/project && rvm rvmrc trusted
16
+
17
+ To manually set it as trusted:
18
+
19
+ ∴ rvm rvmrc trust ~/My/project
20
+
21
+ Or, to reset the trust and force a prompt:
22
+
23
+ ∴ rvm rvmrc reset ~/My/project
24
+
25
+ Finally, to load the rvmrc in a directory, you'd run:
26
+
27
+ ∴ rvm rvmrc load ~/My/project
28
+
29
+ Or,
30
+
31
+ ∴ cd ~/My/project && rvm rvmrc load
32
+
33
+ Note that this replaces 'rvm load-rvmrc'. Note that load implicity trusts the
34
+ rvmrc, even if it is set to untrusted.
@@ -0,0 +1,15 @@
1
+
2
+ ∴ rvm snapshot {load,save} filename
3
+
4
+ Saves or creates a snapshot of the given rvm install. This includes:
5
+
6
+ * Settings
7
+ * Aliases
8
+ * Rubies
9
+ * Gemsets
10
+ * Packages
11
+ * Your Default
12
+
13
+ Ideally to make it easy to have a consistent environment among machines
14
+ / to back up your environment. Please note that this is still considered
15
+ experimental to a large degree.
@@ -0,0 +1,22 @@
1
+
2
+ ∴ rvm tools {identifier,path-identifier,strings}
3
+
4
+ Provides generic tools related to rvm environments for getting information
5
+ about your current environment. Primarily used for scripting rvm.
6
+
7
+ Examples:
8
+
9
+ To get the expanded ruby string of the current environment, we'd run:
10
+
11
+ ∴ rvm tools identifier
12
+
13
+ To get the identifier for a folder (taking into account rvmrc files and the like),
14
+ we're instead run:
15
+
16
+ ∴ rvm tools path-identifier ~/path/to/directory
17
+
18
+ Lastly, we can example ruby strings. E.g., to get the current ree version, we'd
19
+ run:
20
+
21
+ ∴ rvm tools strings ree
22
+
@@ -0,0 +1,18 @@
1
+
2
+ ∴ rvm upgrade ruby-prefix [optional-source]
3
+
4
+ Attempts to install the latest version of a given ruby (still experimental).
5
+
6
+ Given a ruby prefix (e.g. 1.9.2), it attempts to upgrade your last installed
7
+ version, migrating gemsets.
8
+
9
+ The process will prompt you at each stage - if the versions look incorrect,
10
+ please cancel and perform it manually.
11
+
12
+ Examples:
13
+
14
+ If you have 1.9.2-rc2 installed and want to switch it to 1.9.2-p0,
15
+
16
+ ∴ rvm upgrade 1.9.2
17
+
18
+ Will install 1.9.2-p0 and migrate the gemsets.
data/install CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
+ #set -u # Error on uninitialized variables.
4
+
3
5
  if [[ -z "$rvm_selfcontained" ]]; then
4
6
  if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
5
7
  export rvm_selfcontained=0
@@ -15,6 +17,8 @@ if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/script
15
17
  builtin cd "$install_source_path"
16
18
  fi
17
19
 
20
+ sleep=0.010
21
+
18
22
  source scripts/version
19
23
  source scripts/utility
20
24
 
@@ -44,7 +48,7 @@ spinner() {
44
48
  index=$((($spinner_counter % 8)))
45
49
  printf "\r${array[$index]}"
46
50
  let "spinner_counter=spinner_counter+1"
47
- command -v perl > /dev/null 2>&1 && perl -e 'sleep 0.5'
51
+ sleep $sleep
48
52
  }
49
53
 
50
54
  if echo "$*" | \grep -q 'trace' ; then echo "$*" ; env | \grep '^rvm_' ; set -x ; fi
@@ -54,7 +58,7 @@ while [[ $# -gt 0 ]] ; do
54
58
  case "$token" in
55
59
  --auto) rvm_auto_flag=1 ;;
56
60
  --prefix) rvm_prefix="$1" ; shift ;;
57
- --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;;
61
+ --version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
58
62
  --help|*) usage ;;
59
63
  esac
60
64
  done
@@ -89,7 +93,7 @@ __rvm_initialize
89
93
  #
90
94
  item="$(tput setaf 2)* $(tput sgr0)"
91
95
  question="\n$(tput setaf 2)<?>$(tput sgr0)"
92
- cwd=$(pwd)
96
+ cwd=$PWD
93
97
  source_path="${source_path:-$cwd}"
94
98
  rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
95
99
  rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
@@ -161,7 +165,7 @@ done
161
165
  #
162
166
  # Cleanse and purge...
163
167
  for file in rvm-prompt rvm rvmsudo rvm-shell rvm-auto-ruby ; do
164
- spinner && perl -e 'sleep 0.2'
168
+ spinner && sleep $sleep
165
169
  \rm -f "$rvm_bin_path/$file"
166
170
  \cp -f "$source_path/binscripts/$file" $rvm_bin_path/
167
171
  done
@@ -197,7 +201,7 @@ fi
197
201
  spinner
198
202
  if [[ -d gemsets/ ]] ; then
199
203
  \mkdir -p "$rvm_gemsets_path"
200
- for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/^\.\///') ; do
204
+ for gemset_file in $(cd gemsets ; find \. -iname '*.gems' | sed 's/^\.\///') ; do
201
205
  destination="$rvm_gemsets_path/$gemset_file"
202
206
  destination_path="$(dirname "$destination")"
203
207
  if [[ ! -s "$destination" ]] ; then
@@ -210,7 +214,7 @@ fi
210
214
  spinner
211
215
  if [[ -d patchsets/ ]] ; then
212
216
  \mkdir -p "$rvm_patchsets_path"
213
- for patchset_file in $(cd patchsets ; find . -iname '*' | sed 's/^\.\///') ; do
217
+ for patchset_file in $(cd patchsets ; find \. -iname '*' | sed 's/^\.\///') ; do
214
218
  destination="$rvm_patchsets_path/$patchset_file"
215
219
  destination_path="$(dirname "$destination")"
216
220
  if [[ ! -s "$destination" ]] ; then
@@ -306,7 +310,7 @@ printf "\nThank you for using rvm. I hope that it makes your work easier and mor
306
310
  printf "\nIf you have any questions, issues and/or ideas for improvement please hop in #rvm on irc.freenode.net and let me know."
307
311
  printf "\nMy irc nickname is 'wayneeseguin' and I hang out from ~09:00-17:00EST and again from ~21:00EST-~00:00EST."
308
312
  printf "\nIf I do not respond right away, please hang around after asking your question, I will respond as soon as I am back."
309
- printf "\nBe sure to get head often as rvm development happens fast, you can do this by typing 'rvm update --head'."
313
+ printf "\nBe sure to get head often as rvm development happens fast, you can do this by running 'rvm update --head'."
310
314
  printf "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
311
315
  printf "\n ~ Wayne\n"
312
316