rvm-capistrano 1.3.0.rc1 → 1.3.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.3.0.rc1"
3
+ VERSION="1.3.0.rc2"
4
4
  end
5
5
  end
@@ -79,6 +79,9 @@ module Capistrano
79
79
  # Additional rvm packages to install.
80
80
  _cset(:rvm_install_pkgs, '')
81
81
 
82
+ # By default system installations add deploying user to rvm group. also try :all
83
+ _cset(:rvm_add_to_group, "#{user}")
84
+
82
85
  namespace :rvm do
83
86
 
84
87
  command_curl_start = <<-EOF.gsub(/^\s*/, '')
@@ -115,6 +118,10 @@ module Capistrano
115
118
  ''
116
119
  end
117
120
  command_install << "#{rvm_install_shell} -s #{rvm_install_type} --path #{rvm_path}"
121
+ case rvm_type
122
+ when :root, :system
123
+ command_install << " --add-to-rvm-group #{[rvm_add_to_group].flatten.map(&:to_s).join(",")}"
124
+ end
118
125
  _command = <<-EOF
119
126
  #{command_curl_start};
120
127
  #{command_fetch} | #{command_install};
@@ -123,6 +130,15 @@ module Capistrano
123
130
  run "#{_command}".gsub(/[\s\n]+/, ' '), :shell => "#{rvm_install_shell}"
124
131
  end
125
132
 
133
+ def with_rvm_group(command)
134
+ case rvm_type
135
+ when :root, :system
136
+ "sg rvm -c \"#{command}\""
137
+ else
138
+ command
139
+ end
140
+ end
141
+
126
142
  desc <<-EOF
127
143
  Install RVM ruby to the server, create gemset if needed.
128
144
  By default ruby is installed, you can reinstall with:
@@ -142,9 +158,10 @@ module Capistrano
142
158
  if %w( release_path default ).include? "#{ruby}"
143
159
  raise "ruby can not be installed when using :rvm_ruby_string => :#{ruby}"
144
160
  else
145
- command_install = "#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}"
161
+ command_install = with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
146
162
  if gemset
147
- command_install << "; #{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}"
163
+ command_install << "; "
164
+ command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}")
148
165
  end
149
166
  _command = <<-EOF
150
167
  #{command_curl_start};
@@ -155,11 +172,11 @@ module Capistrano
155
172
  end
156
173
  end
157
174
 
158
- desc <<-EOF
175
+ desc <<-EOF
159
176
  Install RVM packages to the server.
160
177
 
161
178
  This must come before the 'rvm:install_ruby' task is called.
162
-
179
+
163
180
  The package list is empty by default. Specifiy the packages to install with:
164
181
 
165
182
  set :rvm_install_pkgs, %w[libyaml curl]
@@ -179,7 +196,7 @@ module Capistrano
179
196
  raise "gemset can not be created when using :rvm_ruby_string => :#{ruby}"
180
197
  else
181
198
  if gemset
182
- run "#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}", :shell => "#{rvm_install_shell}"
199
+ run with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}", :shell => "#{rvm_install_shell}")
183
200
  end
184
201
  end
185
202
  end
metadata CHANGED
@@ -1,73 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rvm-capistrano
3
- version: !ruby/object:Gem::Version
4
- version: 1.3.0.rc1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 3168375813
5
5
  prerelease: 6
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 0
10
+ - rc
11
+ - 2
12
+ version: 1.3.0.rc2
6
13
  platform: ruby
7
- authors:
14
+ authors:
8
15
  - Wayne E. Seguin
9
16
  - Michal Papis
10
17
  autorequire:
11
18
  bindir: bin
12
19
  cert_chain: []
13
- date: 2012-11-04 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
20
+
21
+ date: 2012-12-16 00:00:00 +01:00
22
+ default_executable:
23
+ dependencies:
24
+ - !ruby/object:Gem::Dependency
16
25
  name: capistrano
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: 2.0.0
23
- type: :runtime
24
26
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
27
+ requirement: &id001 !ruby/object:Gem::Requirement
26
28
  none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ hash: 15
33
+ segments:
34
+ - 2
35
+ - 0
36
+ - 0
30
37
  version: 2.0.0
31
- - !ruby/object:Gem::Dependency
38
+ type: :runtime
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
32
41
  name: rake
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: '0'
39
- type: :development
40
42
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- - !ruby/object:Gem::Dependency
48
- name: minitest
49
- requirement: !ruby/object:Gem::Requirement
43
+ requirement: &id002 !ruby/object:Gem::Requirement
50
44
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ hash: 3
49
+ segments:
50
+ - 0
51
+ version: "0"
55
52
  type: :development
53
+ version_requirements: *id002
54
+ - !ruby/object:Gem::Dependency
55
+ name: minitest
56
56
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
57
+ requirement: &id003 !ruby/object:Gem::Requirement
58
58
  none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ hash: 3
63
+ segments:
64
+ - 0
65
+ version: "0"
66
+ type: :development
67
+ version_requirements: *id003
63
68
  description: RVM / Capistrano Integration Gem
64
- email:
69
+ email:
65
70
  - wayneeseguin@gmail.com
66
71
  - mpapis@gmail.com
67
72
  executables: []
73
+
68
74
  extensions: []
75
+
69
76
  extra_rdoc_files: []
70
- files:
77
+
78
+ files:
71
79
  - History.md
72
80
  - Manifest.yml
73
81
  - README.md
@@ -76,30 +84,41 @@ files:
76
84
  - lib/rvm/capistrano.rb
77
85
  - lib/rvm/capistrano/version.rb
78
86
  - spec/spec_helper.rb
87
+ has_rdoc: true
79
88
  homepage: https://rvm.beginrescueend.com/integration/capistrano
80
- licenses:
89
+ licenses:
81
90
  - MIT
82
91
  post_install_message:
83
92
  rdoc_options: []
84
- require_paths:
93
+
94
+ require_paths:
85
95
  - lib
86
- required_ruby_version: !ruby/object:Gem::Requirement
96
+ required_ruby_version: !ruby/object:Gem::Requirement
87
97
  none: false
88
- requirements:
89
- - - ! '>='
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ hash: 3
102
+ segments:
103
+ - 0
104
+ version: "0"
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
106
  none: false
94
- requirements:
95
- - - ! '>'
96
- - !ruby/object:Gem::Version
107
+ requirements:
108
+ - - ">"
109
+ - !ruby/object:Gem::Version
110
+ hash: 25
111
+ segments:
112
+ - 1
113
+ - 3
114
+ - 1
97
115
  version: 1.3.1
98
116
  requirements: []
117
+
99
118
  rubyforge_project:
100
- rubygems_version: 1.8.24
119
+ rubygems_version: 1.4.2
101
120
  signing_key:
102
121
  specification_version: 3
103
122
  summary: RVM / Capistrano Integration Gem
104
- test_files:
123
+ test_files:
105
124
  - spec/spec_helper.rb