rvm 1.11.3 → 1.11.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +5 -0
- data/Manifest.yml +28 -0
- data/README.md +16 -0
- data/Rakefile +9 -0
- data/lib/rvm.rb +4 -7
- data/lib/rvm/shell.rb +1 -0
- data/lib/rvm/version.rb +1 -10
- data/spec/spec_helper.rb +2 -0
- metadata +70 -90
- data/LICENCE +0 -14
- data/README +0 -182
- data/VERSION +0 -1
- data/lib/rvm/capistrano.rb +0 -116
data/History.md
ADDED
data/Manifest.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
- History.md
|
2
|
+
- Manifest.yml
|
3
|
+
- README.md
|
4
|
+
- Rakefile
|
5
|
+
- lib/rvm.rb
|
6
|
+
- lib/rvm/environment/alias.rb
|
7
|
+
- lib/rvm/environment/cleanup.rb
|
8
|
+
- lib/rvm/environment/configuration.rb
|
9
|
+
- lib/rvm/environment/env.rb
|
10
|
+
- lib/rvm/environment/gemset.rb
|
11
|
+
- lib/rvm/environment/info.rb
|
12
|
+
- lib/rvm/environment/list.rb
|
13
|
+
- lib/rvm/environment/rubies.rb
|
14
|
+
- lib/rvm/environment/sets.rb
|
15
|
+
- lib/rvm/environment/tools.rb
|
16
|
+
- lib/rvm/environment/utility.rb
|
17
|
+
- lib/rvm/environment/wrapper.rb
|
18
|
+
- lib/rvm/environment.rb
|
19
|
+
- lib/rvm/errors.rb
|
20
|
+
- lib/rvm/install_command_dumper.rb
|
21
|
+
- lib/rvm/shell/abstract_wrapper.rb
|
22
|
+
- lib/rvm/shell/calculate_rvm_path.sh
|
23
|
+
- lib/rvm/shell/result.rb
|
24
|
+
- lib/rvm/shell/shell_wrapper.sh
|
25
|
+
- lib/rvm/shell/single_shot_wrapper.rb
|
26
|
+
- lib/rvm/shell/utility.rb
|
27
|
+
- lib/rvm/shell.rb
|
28
|
+
- lib/rvm/version.rb
|
data/README.md
ADDED
data/Rakefile
ADDED
data/lib/rvm.rb
CHANGED
@@ -54,13 +54,10 @@
|
|
54
54
|
# RVM::Environment.new, versus RVM.environment
|
55
55
|
#
|
56
56
|
module RVM
|
57
|
-
|
58
|
-
|
59
|
-
require
|
60
|
-
|
61
|
-
require "rvm/shell"
|
62
|
-
require "rvm/environment"
|
63
|
-
require "rvm/version"
|
57
|
+
require 'rvm/errors'
|
58
|
+
require 'rvm/shell'
|
59
|
+
require 'rvm/environment'
|
60
|
+
require 'rvm/version'
|
64
61
|
|
65
62
|
class << self
|
66
63
|
|
data/lib/rvm/shell.rb
CHANGED
data/lib/rvm/version.rb
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
require 'rvm'
|
2
|
-
|
3
1
|
module RVM
|
4
|
-
|
5
|
-
# TODO: delete me - this crap is wholly unnecessary. It is only
|
6
|
-
# here right now for backwards compatibility... Unsure if that is
|
7
|
-
# necessary at all so I'm being conservative.
|
8
|
-
|
9
|
-
STRING = RVM::VERSION
|
10
|
-
MAJOR, MINOR, PATCH = STRING.split(/\./)
|
11
|
-
end
|
2
|
+
Version = "1.11.3.1"
|
12
3
|
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,119 +1,99 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.11.3.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 11
|
9
|
-
- 3
|
10
|
-
version: 1.11.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Wayne E. Seguin
|
14
|
-
-
|
9
|
+
- ! '"Michał Papis, '
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
13
|
+
date: 2012-03-26 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
requirement: &70231527799260 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *70231527799260
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: minitest
|
28
|
+
requirement: &70231527798660 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70231527798660
|
37
|
+
description: RVM ~ Ruby Environment Manager ~ Ruby Gem Library.
|
38
|
+
email:
|
24
39
|
- wayneeseguin@gmail.com
|
25
40
|
- mpapis@gmail.com
|
26
41
|
executables: []
|
27
|
-
|
28
42
|
extensions: []
|
29
|
-
|
30
43
|
extra_rdoc_files: []
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
- lib/rvm
|
37
|
-
- lib/rvm/
|
38
|
-
- lib/rvm/
|
39
|
-
- lib/rvm/
|
40
|
-
- lib/rvm/capistrano.rb
|
44
|
+
files:
|
45
|
+
- History.md
|
46
|
+
- Manifest.yml
|
47
|
+
- README.md
|
48
|
+
- Rakefile
|
49
|
+
- lib/rvm.rb
|
50
|
+
- lib/rvm/environment/alias.rb
|
51
|
+
- lib/rvm/environment/cleanup.rb
|
52
|
+
- lib/rvm/environment/configuration.rb
|
41
53
|
- lib/rvm/environment/env.rb
|
42
54
|
- lib/rvm/environment/gemset.rb
|
43
|
-
- lib/rvm/environment/list.rb
|
44
|
-
- lib/rvm/environment/alias.rb
|
45
|
-
- lib/rvm/environment/sets.rb
|
46
55
|
- lib/rvm/environment/info.rb
|
56
|
+
- lib/rvm/environment/list.rb
|
47
57
|
- lib/rvm/environment/rubies.rb
|
48
|
-
- lib/rvm/environment/
|
49
|
-
- lib/rvm/environment/wrapper.rb
|
50
|
-
- lib/rvm/environment/utility.rb
|
51
|
-
- lib/rvm/environment/configuration.rb
|
58
|
+
- lib/rvm/environment/sets.rb
|
52
59
|
- lib/rvm/environment/tools.rb
|
53
|
-
- lib/rvm/
|
60
|
+
- lib/rvm/environment/utility.rb
|
61
|
+
- lib/rvm/environment/wrapper.rb
|
62
|
+
- lib/rvm/environment.rb
|
63
|
+
- lib/rvm/errors.rb
|
54
64
|
- lib/rvm/install_command_dumper.rb
|
65
|
+
- lib/rvm/shell/abstract_wrapper.rb
|
66
|
+
- lib/rvm/shell/calculate_rvm_path.sh
|
67
|
+
- lib/rvm/shell/result.rb
|
68
|
+
- lib/rvm/shell/shell_wrapper.sh
|
69
|
+
- lib/rvm/shell/single_shot_wrapper.rb
|
70
|
+
- lib/rvm/shell/utility.rb
|
55
71
|
- lib/rvm/shell.rb
|
56
|
-
- lib/rvm/
|
57
|
-
-
|
58
|
-
- LICENCE
|
59
|
-
- README
|
60
|
-
- VERSION
|
72
|
+
- lib/rvm/version.rb
|
73
|
+
- spec/spec_helper.rb
|
61
74
|
homepage: https://rvm.beginrescueend.com/
|
62
75
|
licenses: []
|
63
|
-
|
64
|
-
post_install_message: |
|
65
|
-
***********************************************************************************
|
66
|
-
|
67
|
-
This gem contains only the Ruby libraries for the RVM Ruby API.
|
68
|
-
|
69
|
-
In order to install RVM please use one of the methods listed in the documentation:
|
70
|
-
|
71
|
-
https://rvm.beginrescueend.com/rvm/install/
|
72
|
-
|
73
|
-
such as,
|
74
|
-
|
75
|
-
bash -s stable < <(curl -s \
|
76
|
-
https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
|
77
|
-
|
78
|
-
You can read more details about this process on the above mentioned install page
|
79
|
-
as well as the basics page:
|
80
|
-
|
81
|
-
https://rvm.beginrescueend.com/rvm/basics/
|
82
|
-
|
83
|
-
Enjoy!
|
84
|
-
|
85
|
-
~Wayne
|
86
|
-
|
87
|
-
***********************************************************************************
|
88
|
-
|
76
|
+
post_install_message:
|
89
77
|
rdoc_options: []
|
90
|
-
|
91
|
-
require_paths:
|
78
|
+
require_paths:
|
92
79
|
- lib
|
93
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
81
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
99
|
-
|
100
|
-
- 0
|
101
|
-
version: "0"
|
102
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
87
|
none: false
|
104
|
-
requirements:
|
105
|
-
- -
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
|
108
|
-
segments:
|
109
|
-
- 0
|
110
|
-
version: "0"
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
111
92
|
requirements: []
|
112
|
-
|
113
93
|
rubyforge_project:
|
114
|
-
rubygems_version: 1.8.
|
94
|
+
rubygems_version: 1.8.15
|
115
95
|
signing_key:
|
116
96
|
specification_version: 3
|
117
|
-
summary: RVM
|
118
|
-
test_files:
|
119
|
-
|
97
|
+
summary: RVM Ruby Gem Library
|
98
|
+
test_files:
|
99
|
+
- spec/spec_helper.rb
|
data/LICENCE
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Copyright (c) 2009-2011 Wayne E. Seguin
|
2
|
-
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
you may not use this file except in compliance with the License.
|
5
|
-
You may obtain a copy of the License at
|
6
|
-
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
See the License for the specific language governing permissions and
|
13
|
-
limitations under the License.
|
14
|
-
|
data/README
DELETED
@@ -1,182 +0,0 @@
|
|
1
|
-
{<img src="https://secure.travis-ci.org/wayneeseguin/rvm.png" alt="Build Status" />}[http://travis-ci.org/wayneeseguin/rvm]
|
2
|
-
|
3
|
-
= rvm
|
4
|
-
|
5
|
-
* https://github.com/wayneeseguin/rvm
|
6
|
-
|
7
|
-
== DESCRIPTION:
|
8
|
-
|
9
|
-
RVM is the Ruby enVironment Manager (rvm).
|
10
|
-
|
11
|
-
It manages Ruby application environments and switching between them.
|
12
|
-
|
13
|
-
== Usage
|
14
|
-
|
15
|
-
rvm [Flags] [Options] Action [Implementation[,Implementation[,...]]
|
16
|
-
|
17
|
-
== Flags
|
18
|
-
|
19
|
-
--default :: with 'rvm use X', sets the default ruby for new shells to X.
|
20
|
-
--debug :: Toggle debug mode on for very verbose output.
|
21
|
-
--trace :: Toggle trace mode on to see EVERYTHING rvm is doing.
|
22
|
-
--force :: Force install, removes old install & source before install.
|
23
|
-
--summary :: Used with rubydo to print out a summary of the commands run.
|
24
|
-
--latest :: with gemset --dump skips version strings for latest gem.
|
25
|
-
--gems :: with uninstall/remove removes gems with the interpreter.
|
26
|
-
--docs :: with install, attempt to generate ri after installation.
|
27
|
-
--reconfigure :: Force ./configure on install even if Makefile already exists.
|
28
|
-
|
29
|
-
== Options
|
30
|
-
|
31
|
-
-v|--version :: Emit rvm version loaded for current shell
|
32
|
-
-l|--level :: patch level to use with rvm use / install
|
33
|
-
--bin :: path for binaries to be placed (~/.rvm/bin/)
|
34
|
-
-S :: Specify a script file to attempt to load and run (rubydo)
|
35
|
-
-e :: Execute code from the command line.
|
36
|
-
--gems :: Used to set the 'gems_flag', use with 'remove' to remove gems
|
37
|
-
--archive :: Used to set the 'archive_flag', use with 'remove' to remove archive
|
38
|
-
--patch :: With MRI Rubies you may specify one or more full paths to patches
|
39
|
-
for multiple, specify comma separated:
|
40
|
-
|
41
|
-
--patch /.../.../a.patch[%prefix],/.../.../.../b.patch
|
42
|
-
|
43
|
-
'prefix' is an optional argument, which will be bypassed
|
44
|
-
to the '-p' argument of the 'patch' command. It is separated
|
45
|
-
from patch file name with '%' symbol.
|
46
|
-
-C|--configure :: custom configure options. If you need to pass several configure
|
47
|
-
options then append them comma separated:
|
48
|
-
|
49
|
-
-C --...,--...,--...
|
50
|
-
|
51
|
-
--nice :: process niceness (for slow computers, default 0)
|
52
|
-
--ree-options :: Options passed directly to ree's './installer' on the command line.
|
53
|
-
--with-rubies :: Specifies a string for rvm to attempt to expand for set operations.
|
54
|
-
|
55
|
-
== Action
|
56
|
-
|
57
|
-
(Note that for most actions, 'rvm help action-name' may provide more information.)
|
58
|
-
|
59
|
-
*usage* :: show this usage information
|
60
|
-
version :: show the rvm version installed in rvm_path
|
61
|
-
use :: setup current shell to use a specific ruby version
|
62
|
-
reload :: reload rvm source itself (useful after changing rvm source)
|
63
|
-
implode :: (seppuku) removes the rvm installation completely.
|
64
|
-
|
65
|
-
This means everything in $rvm_path (~/.rvm || /usr/local/rvm).
|
66
|
-
|
67
|
-
This does not touch your profiles. However, this means that you
|
68
|
-
must manually clean up your profiles and remove the lines which source RVM.
|
69
|
-
get :: {head,stable} upgrades rvm to latest head or stable version.
|
70
|
-
|
71
|
-
Check 'rvm help get' for more details.
|
72
|
-
|
73
|
-
(If you experience bugs try this first with head version, then
|
74
|
-
ask for help in #rvm on irc.freenode.net and hang around)
|
75
|
-
reset :: remove current and stored default & system settings.
|
76
|
-
|
77
|
-
(If you experience odd behavior try this second)
|
78
|
-
info :: show the *current* environment information for current ruby
|
79
|
-
current :: print the *current* ruby version and the name of any gemset being used.
|
80
|
-
debug :: show info plus additional information for common issues
|
81
|
-
|
82
|
-
install :: install one or many ruby versions
|
83
|
-
|
84
|
-
See also: http://rvm.beginrescueend.com/rubies/installing/
|
85
|
-
uninstall :: uninstall one or many ruby versions, leaves their sources
|
86
|
-
remove :: uninstall one or many ruby versions and remove their sources
|
87
|
-
|
88
|
-
migrate :: Lets you migrate all gemsets from one ruby to another.
|
89
|
-
upgrade :: Lets you upgrade from one version of a ruby to another, including
|
90
|
-
migrating your gemsets semi-automatically.
|
91
|
-
|
92
|
-
wrapper :: generates a set of wrapper executables for a given ruby with the
|
93
|
-
specified ruby and gemset combination. Used under the hood for
|
94
|
-
passenger support and the like.
|
95
|
-
|
96
|
-
cleanup :: Lets you remove stale source folders / archives and other miscellaneous
|
97
|
-
data associated with rvm.
|
98
|
-
repair :: Lets you repair parts of your environment e.g. wrappers, env files and
|
99
|
-
and similar files (e.g. general maintenance).
|
100
|
-
snapshot :: Lets your backup / restore an rvm installation in a lightweight manner.
|
101
|
-
|
102
|
-
disk-usage :: Tells you how much disk space rvm install is using.
|
103
|
-
tools :: Provides general information about the ruby environment,
|
104
|
-
primarily useful when scripting rvm.
|
105
|
-
docs :: Tools to make installing ri and rdoc documentation easier.
|
106
|
-
rvmrc :: Tools related to managing rvmrc trust and loading.
|
107
|
-
|
108
|
-
do :: runs an arbitrary command against specified and/or all rubies
|
109
|
-
tests :: runs 'rake test' across selected ruby versions
|
110
|
-
specs :: runs 'rake spec' across selected ruby versions
|
111
|
-
monitor :: Monitor cwd for testing, run `rake {spec,test}` on changes.
|
112
|
-
|
113
|
-
gemset :: gemsets: http://rvm.beginrescueend.com/gemsets/
|
114
|
-
|
115
|
-
rubygems :: Switches the installed version of rubygems for the current ruby.
|
116
|
-
|
117
|
-
gemdir :: display the path to the current gem directory (GEM_HOME).
|
118
|
-
srcdir :: display the path to rvm source directory (may be yanked)
|
119
|
-
|
120
|
-
fetch :: Performs an archive / src fetch only of the selected ruby.
|
121
|
-
list :: show currently installed rubies, interactive output.
|
122
|
-
|
123
|
-
http://rvm.beginrescueend.com/rubies/list/
|
124
|
-
pkg :: Install a dependency package {readline,iconv,zlib,openssl}
|
125
|
-
|
126
|
-
http://rvm.beginrescueend.com/packages/
|
127
|
-
notes :: Display notes, with operating system specifics.
|
128
|
-
|
129
|
-
export :: Temporarily set an environment variable in the current shell.
|
130
|
-
unexport :: Undo changes made to the environment by 'rvm export'.
|
131
|
-
requirements :: Shows additional OS specific dependencies/requirements for building various rubies.
|
132
|
-
|
133
|
-
== Implementation
|
134
|
-
|
135
|
-
*ruby* :: MRI/YARV Ruby (The Gold Standard) {1.8.6,1.8.7,1.9.1,1.9.2...}
|
136
|
-
jruby :: JRuby, Ruby interpreter on the Java Virtual Machine.
|
137
|
-
rbx :: Rubinius
|
138
|
-
ree :: Ruby Enterprise Edition, MRI Ruby with several custom
|
139
|
-
patches for performance, stability, and memory.
|
140
|
-
macruby :: MacRuby, insanely fast, can make real apps (Mac OS X Only).
|
141
|
-
maglev :: GemStone Ruby, awesome persistent ruby object store.
|
142
|
-
ironruby :: IronRuby, NOT supported yet. Looking for volunteers to help.
|
143
|
-
system :: use the system ruby (eg. pre-rvm state)
|
144
|
-
default :: use rvm set default ruby and system if it hasn't been set.
|
145
|
-
|
146
|
-
http://rvm.beginrescueend.com/rubies/default/
|
147
|
-
|
148
|
-
== Resources:
|
149
|
-
|
150
|
-
http://rvm.beginrescueend.com/
|
151
|
-
|
152
|
-
https://www.pivotaltracker.com/projects/26822
|
153
|
-
|
154
|
-
== Contributions:
|
155
|
-
|
156
|
-
Any and all contributions offered in any form, past present or future, to the
|
157
|
-
RVM project are understood to be in complete agreement and acceptance with the
|
158
|
-
Apache Licence v2.0.
|
159
|
-
|
160
|
-
== INSTALL:
|
161
|
-
|
162
|
-
See http://rvm.beginrescueend.com/rvm/install/
|
163
|
-
|
164
|
-
or just use:
|
165
|
-
|
166
|
-
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
|
167
|
-
|
168
|
-
== LICENSE:
|
169
|
-
|
170
|
-
Copyright (c) 2009-2011 Wayne E. Seguin
|
171
|
-
|
172
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
173
|
-
you may not use this file except in compliance with the License.
|
174
|
-
You may obtain a copy of the License at
|
175
|
-
|
176
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
177
|
-
|
178
|
-
Unless required by applicable law or agreed to in writing, software
|
179
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
180
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
181
|
-
See the License for the specific language governing permissions and
|
182
|
-
limitations under the License.
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.11.3
|
data/lib/rvm/capistrano.rb
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
# Recipes for using RVM on a server with capistrano.
|
2
|
-
|
3
|
-
unless Capistrano::Configuration.respond_to?(:instance)
|
4
|
-
abort "rvm/capistrano requires Capistrano >= 2."
|
5
|
-
end
|
6
|
-
|
7
|
-
Capistrano::Configuration.instance(true).load do
|
8
|
-
|
9
|
-
# Taken from the capistrano code.
|
10
|
-
def _cset(name, *args, &block)
|
11
|
-
unless exists?(name)
|
12
|
-
set(name, *args, &block)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
set :default_shell do
|
17
|
-
shell = File.join(rvm_bin_path, "rvm-shell")
|
18
|
-
ruby = rvm_ruby_string.to_s.strip
|
19
|
-
if "#{ruby}" == "release_path"
|
20
|
-
shell = "rvm_path=#{rvm_path} #{shell} --path '#{release_path}'"
|
21
|
-
else
|
22
|
-
shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
|
23
|
-
end
|
24
|
-
shell
|
25
|
-
end
|
26
|
-
|
27
|
-
# Let users set the type of their rvm install.
|
28
|
-
_cset(:rvm_type, :system)
|
29
|
-
|
30
|
-
# Define rvm_path
|
31
|
-
# This is used in the default_shell command to pass the required variable to rvm-shell, allowing
|
32
|
-
# rvm to boostrap using the proper path. This is being lost in Capistrano due to the lack of a
|
33
|
-
# full environment.
|
34
|
-
_cset(:rvm_path) do
|
35
|
-
case rvm_type
|
36
|
-
when :root, :system
|
37
|
-
"/usr/local/rvm"
|
38
|
-
when :local, :user, :default
|
39
|
-
"$HOME/.rvm/"
|
40
|
-
else
|
41
|
-
rvm_type.to_s.empty? ? "$HOME/.rvm" : rvm_type.to_s
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
# Let users override the rvm_bin_path
|
46
|
-
_cset(:rvm_bin_path) do
|
47
|
-
case rvm_type
|
48
|
-
when :root, :system
|
49
|
-
"/usr/local/rvm/bin"
|
50
|
-
when :local, :user, :default
|
51
|
-
"$HOME/.rvm/bin"
|
52
|
-
else
|
53
|
-
rvm_type.to_s.empty? ? "#{rvm_path}/bin" : rvm_type.to_s
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# Use the default ruby on the server, by default :)
|
58
|
-
_cset(:rvm_ruby_string, "default")
|
59
|
-
|
60
|
-
# Let users set the install type and shell of their choice.
|
61
|
-
_cset(:rvm_install_type, :stable)
|
62
|
-
_cset(:rvm_install_shell, :bash)
|
63
|
-
|
64
|
-
# Let users set the (re)install for ruby.
|
65
|
-
_cset(:rvm_install_ruby, :install)
|
66
|
-
_cset(:rvm_install_ruby_threads, "$(cat /proc/cpuinfo | grep vendor_id | wc -l)")
|
67
|
-
|
68
|
-
namespace :rvm do
|
69
|
-
desc <<-EOF
|
70
|
-
Install RVM of the given choice to the server.
|
71
|
-
By default RVM "stable" is installed, change with:
|
72
|
-
|
73
|
-
set :rvm_install_type, :head
|
74
|
-
|
75
|
-
By default BASH is used for installer, change with:
|
76
|
-
|
77
|
-
set :rvm_install_shell, :zsh
|
78
|
-
EOF
|
79
|
-
task :install_rvm do
|
80
|
-
run "#{rvm_install_shell} -s #{rvm_install_type} \
|
81
|
-
< <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)", :shell => "#{rvm_install_shell}"
|
82
|
-
end
|
83
|
-
|
84
|
-
desc <<-EOF
|
85
|
-
Install RVM ruby to the server, create gemset if needed.
|
86
|
-
By default ruby is installed, you can reinstall with:
|
87
|
-
|
88
|
-
set :rvm_install_ruby, :reinstall
|
89
|
-
|
90
|
-
By default ruby is compiled using all CPU cores, change with:
|
91
|
-
|
92
|
-
set :rvm_install_ruby_threads, :reinstall
|
93
|
-
|
94
|
-
By default BASH is used for installer, change with:
|
95
|
-
|
96
|
-
set :rvm_install_shell, :zsh
|
97
|
-
EOF
|
98
|
-
task :install_ruby do
|
99
|
-
ruby, gemset = rvm_ruby_string.to_s.strip.split /@/
|
100
|
-
if %w( release_path default ).include? "#{ruby}"
|
101
|
-
raise "ruby can not be installed when using :rvm_ruby_string => :#{ruby}"
|
102
|
-
else
|
103
|
-
run "#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads}", :shell => "#{rvm_install_shell}"
|
104
|
-
if gemset
|
105
|
-
run "#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}", :shell => "#{rvm_install_shell}"
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
# E.g, to use ree and rails 3:
|
113
|
-
#
|
114
|
-
# require 'rvm/capistrano'
|
115
|
-
# set :rvm_ruby_string, "ree@rails3"
|
116
|
-
#
|