rvm-capistrano 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- "#{sudo} sg rvm -c \"#{command}\""
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 = case rvm_type
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
- if fetch(:use_sudo, true) == false && rvm_install_with_sudo == false
228
- raise "
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
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.3.1"
3
+ VERSION="1.3.2"
4
4
  end
5
5
  end
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: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
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-10 00:00:00 +02:00
19
+ date: 2013-06-24 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency