rvm-capistrano 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +7 -0
- data/README.md +5 -3
- data/lib/rvm/capistrano.rb +23 -7
- data/lib/rvm/capistrano/version.rb +1 -1
- metadata +73 -59
data/History.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 1.2.0 / 2012-05-19
|
2
|
+
|
3
|
+
* Add task to create gemset, fix #8
|
4
|
+
* Add rvm_install_ruby_params, fix #9
|
5
|
+
* Improved installing RVM with sudo, fix #10
|
6
|
+
* Use the new RVM installer
|
7
|
+
|
1
8
|
=== 1.1.0 / 2012-04-29
|
2
9
|
|
3
10
|
* Fix rvm installation task to use sudo and rvm_path when needed
|
data/README.md
CHANGED
@@ -17,14 +17,16 @@ RVM / Capistrano integration is now available as a separate gem
|
|
17
17
|
The following code will:
|
18
18
|
|
19
19
|
- detect `ruby@gemset` used for deployment
|
20
|
-
- install RVM and Ruby on `cap deploy:
|
20
|
+
- install RVM and Ruby on `cap deploy:setup`
|
21
21
|
|
22
22
|
Example:
|
23
23
|
|
24
24
|
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
|
25
|
+
set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode
|
25
26
|
|
26
|
-
before 'deploy:setup', 'rvm:install_rvm'
|
27
|
-
before 'deploy:setup', 'rvm:install_ruby'
|
27
|
+
before 'deploy:setup', 'rvm:install_rvm' # install RVM
|
28
|
+
before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:
|
29
|
+
before 'deploy:setup', 'rvm:create_gemset' # only create gemset
|
28
30
|
|
29
31
|
require "rvm/capistrano"
|
30
32
|
|
data/lib/rvm/capistrano.rb
CHANGED
@@ -53,6 +53,9 @@ Capistrano::Configuration.instance(true).load do
|
|
53
53
|
# Use the default ruby on the server, by default :)
|
54
54
|
_cset(:rvm_ruby_string, "default")
|
55
55
|
|
56
|
+
# Default sudo state
|
57
|
+
_cset(:rvm_install_with_sudo, false)
|
58
|
+
|
56
59
|
# Let users set the install type and shell of their choice.
|
57
60
|
_cset(:rvm_install_type, :stable)
|
58
61
|
_cset(:rvm_install_shell, :bash)
|
@@ -73,17 +76,17 @@ Capistrano::Configuration.instance(true).load do
|
|
73
76
|
set :rvm_install_shell, :zsh
|
74
77
|
EOF
|
75
78
|
task :install_rvm do
|
76
|
-
|
79
|
+
command_fetch="curl -L get.rvm.io | "
|
77
80
|
case rvm_type
|
78
81
|
when :root, :system
|
79
|
-
if use_sudo == false
|
80
|
-
raise ":use_sudo is set to 'false' but sudo is needed to install rvm_type: #{rvm_type}."
|
82
|
+
if use_sudo == false && rvm_install_with_sudo == false
|
83
|
+
raise ":use_sudo is set to 'false' but sudo is needed to install rvm_type: #{rvm_type}. 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"
|
81
84
|
else
|
82
|
-
|
85
|
+
command_install = "#{sudo} "
|
83
86
|
end
|
84
87
|
end
|
85
|
-
|
86
|
-
run "#{
|
88
|
+
command_install << "#{rvm_install_shell} -s #{rvm_install_type} --path #{rvm_path}"
|
89
|
+
run "#{command_fetch} #{command_install}", :shell => "#{rvm_install_shell}"
|
87
90
|
end
|
88
91
|
|
89
92
|
desc <<-EOF
|
@@ -105,12 +108,25 @@ Capistrano::Configuration.instance(true).load do
|
|
105
108
|
if %w( release_path default ).include? "#{ruby}"
|
106
109
|
raise "ruby can not be installed when using :rvm_ruby_string => :#{ruby}"
|
107
110
|
else
|
108
|
-
run "#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads}", :shell => "#{rvm_install_shell}"
|
111
|
+
run "#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}", :shell => "#{rvm_install_shell}"
|
109
112
|
if gemset
|
110
113
|
run "#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}", :shell => "#{rvm_install_shell}"
|
111
114
|
end
|
112
115
|
end
|
113
116
|
end
|
117
|
+
|
118
|
+
desc "Create gemset"
|
119
|
+
task :create_gemset do
|
120
|
+
ruby, gemset = rvm_ruby_string.to_s.strip.split /@/
|
121
|
+
if %w( release_path default ).include? "#{ruby}"
|
122
|
+
raise "gemset can not be created when using :rvm_ruby_string => :#{ruby}"
|
123
|
+
else
|
124
|
+
if gemset
|
125
|
+
run "#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}", :shell => "#{rvm_install_shell}"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
114
130
|
end
|
115
131
|
end
|
116
132
|
|
metadata
CHANGED
@@ -1,73 +1,78 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm-capistrano
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 1.2.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Wayne E. Seguin
|
9
14
|
- Michal Papis
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2012-05-19 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
16
22
|
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
23
|
prerelease: false
|
25
|
-
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
25
|
none: false
|
27
|
-
requirements:
|
28
|
-
- -
|
29
|
-
- !ruby/object:Gem::Version
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 0
|
33
|
+
- 0
|
30
34
|
version: 2.0.0
|
31
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
32
38
|
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
39
|
prerelease: false
|
41
|
-
|
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
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
50
41
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
55
49
|
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: minitest
|
56
53
|
prerelease: false
|
57
|
-
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
55
|
none: false
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
type: :development
|
64
|
+
version_requirements: *id003
|
63
65
|
description: RVM / Capistrano Integration Gem
|
64
|
-
email:
|
66
|
+
email:
|
65
67
|
- wayneeseguin@gmail.com
|
66
68
|
- mpapis@gmail.com
|
67
69
|
executables: []
|
70
|
+
|
68
71
|
extensions: []
|
72
|
+
|
69
73
|
extra_rdoc_files: []
|
70
|
-
|
74
|
+
|
75
|
+
files:
|
71
76
|
- History.md
|
72
77
|
- Manifest.yml
|
73
78
|
- README.md
|
@@ -77,27 +82,36 @@ files:
|
|
77
82
|
- spec/spec_helper.rb
|
78
83
|
homepage: https://rvm.beginrescueend.com/integration/capistrano
|
79
84
|
licenses: []
|
85
|
+
|
80
86
|
post_install_message:
|
81
87
|
rdoc_options: []
|
82
|
-
|
88
|
+
|
89
|
+
require_paths:
|
83
90
|
- lib
|
84
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
92
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
hash: 3
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
101
|
none: false
|
92
|
-
requirements:
|
93
|
-
- -
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
version: "0"
|
96
109
|
requirements: []
|
110
|
+
|
97
111
|
rubyforge_project:
|
98
|
-
rubygems_version: 1.8.
|
112
|
+
rubygems_version: 1.8.24
|
99
113
|
signing_key:
|
100
114
|
specification_version: 3
|
101
115
|
summary: RVM / Capistrano Integration Gem
|
102
|
-
test_files:
|
116
|
+
test_files:
|
103
117
|
- spec/spec_helper.rb
|