rvm-capistrano 1.3.1 → 1.3.2
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/lib/rvm/capistrano.rb +23 -28
- data/lib/rvm/capistrano/version.rb +1 -1
- metadata +4 -4
data/lib/rvm/capistrano.rb
CHANGED
@@ -137,10 +137,28 @@ module Capistrano
|
|
137
137
|
EOF
|
138
138
|
end
|
139
139
|
|
140
|
+
def rvm_if_sudo
|
141
|
+
case rvm_type
|
142
|
+
when :root, :system
|
143
|
+
if fetch(:use_sudo, true) == false && rvm_install_with_sudo == false
|
144
|
+
raise "
|
145
|
+
|
146
|
+
:use_sudo is set to 'false' but sudo is needed to install rvm_type: #{rvm_type}.
|
147
|
+
You can enable use_sudo within rvm for use only by this install operation by adding to deploy.rb: set :rvm_install_with_sudo, true
|
148
|
+
|
149
|
+
"
|
150
|
+
else
|
151
|
+
"#{sudo} "
|
152
|
+
end
|
153
|
+
else
|
154
|
+
''
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
140
158
|
def with_rvm_group(command)
|
141
159
|
case rvm_type
|
142
160
|
when :root, :system
|
143
|
-
"#{
|
161
|
+
"#{rvm_if_sudo} sg rvm -c \"#{command}\""
|
144
162
|
else
|
145
163
|
command
|
146
164
|
end
|
@@ -166,21 +184,7 @@ module Capistrano
|
|
166
184
|
EOF
|
167
185
|
rvm_task :install_rvm do
|
168
186
|
command_fetch = "curl -L get.rvm.io"
|
169
|
-
command_install =
|
170
|
-
when :root, :system
|
171
|
-
if fetch(:use_sudo, true) == false && rvm_install_with_sudo == false
|
172
|
-
raise "
|
173
|
-
|
174
|
-
:use_sudo is set to 'false' but sudo is needed to install rvm_type: #{rvm_type}.
|
175
|
-
You can enable use_sudo within rvm for use only by this install operation by adding to deploy.rb: set :rvm_install_with_sudo, true
|
176
|
-
|
177
|
-
"
|
178
|
-
else
|
179
|
-
"#{sudo} "
|
180
|
-
end
|
181
|
-
else
|
182
|
-
''
|
183
|
-
end
|
187
|
+
command_install = rvm_if_sudo
|
184
188
|
command_install << "#{rvm_install_shell} -s #{rvm_install_type} --path #{rvm_path}"
|
185
189
|
case rvm_type
|
186
190
|
when :root, :system
|
@@ -224,18 +228,9 @@ ruby can not be installed when using :rvm_ruby_string => :#{ruby}
|
|
224
228
|
if autolibs_flag_no_requirements
|
225
229
|
command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} --autolibs=#{autolibs_flag} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
|
226
230
|
else
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
:use_sudo is set to 'false' but sudo is needed to install requirements with autolibs '#{autolibs_flag}'.
|
231
|
-
You can enable use_sudo within rvm for use only by this ruby install operation by adding to deploy.rb: set :rvm_install_with_sudo, true
|
232
|
-
|
233
|
-
"
|
234
|
-
else
|
235
|
-
command_install << "#{sudo} #{File.join(rvm_bin_path, "rvm")} --autolibs=#{autolibs_flag} requirements #{ruby}"
|
236
|
-
command_install << "; "
|
237
|
-
command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} --autolibs=1 #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
|
238
|
-
end
|
231
|
+
command_install << "#{rvm_if_sudo} #{File.join(rvm_bin_path, "rvm")} --autolibs=#{autolibs_flag} requirements #{ruby}"
|
232
|
+
command_install << "; "
|
233
|
+
command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} --autolibs=1 #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
|
239
234
|
end
|
240
235
|
|
241
236
|
if gemset
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 2
|
10
|
+
version: 1.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wayne E. Seguin
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-06-
|
19
|
+
date: 2013-06-24 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|