File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 64
64
65
65
set :rvm_ruby_version, '2.0.0@mygemset'
66
66
67
-
68
67
### Custom RVM path: ` :rvm_custom_path `
69
68
70
69
If you have a custom RVM setup with a different path then expected, you have
71
70
to define a custom RVM path to tell capistrano where it is.
72
71
72
+ ### Custom Roles: ` :rvm_roles `
73
+
74
+ If you want to restrict RVM usage to a subset of roles, you may set ` :rvm_roles ` :
75
+
76
+ set :rvm_roles, [:app, :web]
73
77
74
78
## Restrictions
75
79
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ RVM_USER_PATH = "~/.rvm"
4
4
namespace :rvm do
5
5
desc "Prints the RVM and Ruby version on the target host"
6
6
task :check do
7
- on roles ( : all) do
7
+ on roles ( fetch ( :rvm_roles , : all) ) do
8
8
puts capture ( :rvm , "version" )
9
9
puts capture ( :rvm , "current" )
10
10
puts capture ( :ruby , "--version" )
11
11
end
12
12
end
13
13
14
14
task :hook do
15
- on roles ( : all) do
15
+ on roles ( fetch ( :rvm_roles , : all) ) do
16
16
rvm_path = fetch ( :rvm_custom_path )
17
17
rvm_path ||= case fetch ( :rvm_type )
18
18
when :auto
You can’t perform that action at this time.
0 commit comments