rvm-capistrano 1.3.0.rc2 → 1.3.0.rc3

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.
@@ -80,20 +80,25 @@ module Capistrano
80
80
  _cset(:rvm_install_pkgs, '')
81
81
 
82
82
  # By default system installations add deploying user to rvm group. also try :all
83
- _cset(:rvm_add_to_group, "#{user}")
83
+ _cset(:rvm_add_to_group, fetch(:user,"$USER"))
84
84
 
85
85
  namespace :rvm do
86
86
 
87
- command_curl_start = <<-EOF.gsub(/^\s*/, '')
88
- export CURL_HOME=${TMPDIR:-${HOME}}/.rvm-curl-config.$$;
89
- mkdir ${CURL_HOME}/;
90
- {
91
- [[ -r ${HOME}/.curlrc ]] && cat ${HOME}/.curlrc;
92
- echo "silent";
93
- echo "show-error";
94
- } > $CURL_HOME/.curlrc
95
- EOF
96
- command_curl_end = "rm -rf $CURL_HOME"
87
+ def run_silent_curl(command)
88
+ run <<-EOF.gsub(/[\s\n]+/, ' '), :shell => "#{rvm_install_shell}"
89
+ __LAST_STATUS=0;
90
+ export CURL_HOME="${TMPDIR:-${HOME}}/.rvm-curl-config.$$";
91
+ mkdir ${CURL_HOME}/;
92
+ {
93
+ [[ -r ${HOME}/.curlrc ]] && cat ${HOME}/.curlrc;
94
+ echo "silent";
95
+ echo "show-error";
96
+ } > $CURL_HOME/.curlrc;
97
+ #{command} || __LAST_STATUS=$?;
98
+ rm -rf $CURL_HOME;
99
+ exit ${__LAST_STATUS}
100
+ EOF
101
+ end
97
102
 
98
103
  desc <<-EOF
99
104
  Install RVM of the given choice to the server.
@@ -122,12 +127,7 @@ module Capistrano
122
127
  when :root, :system
123
128
  command_install << " --add-to-rvm-group #{[rvm_add_to_group].flatten.map(&:to_s).join(",")}"
124
129
  end
125
- _command = <<-EOF
126
- #{command_curl_start};
127
- #{command_fetch} | #{command_install};
128
- #{command_curl_end}
129
- EOF
130
- run "#{_command}".gsub(/[\s\n]+/, ' '), :shell => "#{rvm_install_shell}"
130
+ run_silent_curl "#{command_fetch} | #{command_install}"
131
131
  end
132
132
 
133
133
  def with_rvm_group(command)
@@ -163,12 +163,7 @@ module Capistrano
163
163
  command_install << "; "
164
164
  command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}")
165
165
  end
166
- _command = <<-EOF
167
- #{command_curl_start};
168
- #{command_install};
169
- #{command_curl_end}
170
- EOF
171
- run "#{_command}".gsub(/[\s\n]+/, ' '), :shell => "#{rvm_install_shell}"
166
+ run_silent_curl command_install
172
167
  end
173
168
  end
174
169
 
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.3.0.rc2"
3
+ VERSION="1.3.0.rc3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3168375813
4
+ hash: 924436459
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
9
  - 0
10
10
  - rc
11
- - 2
12
- version: 1.3.0.rc2
11
+ - 3
12
+ version: 1.3.0.rc3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Wayne E. Seguin