rvm-capistrano 1.4.0.rc3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +26 -4
- data/lib/rvm/capistrano/helpers/base.rb +2 -1
- data/lib/rvm/capistrano/version.rb +1 -1
- metadata +7 -11
data/README.md
CHANGED
@@ -23,6 +23,28 @@ $ echo "gem 'rvm-capistrano'" >> Gemfile
|
|
23
23
|
$ bundle install
|
24
24
|
```
|
25
25
|
|
26
|
+
## Modules
|
27
|
+
|
28
|
+
Since version `1.4.0` `rvm-capistrano` is divided into separate
|
29
|
+
modules which allow selecting which parts of it should be included.
|
30
|
+
|
31
|
+
`rvm/capistrano`:
|
32
|
+
|
33
|
+
- `base` - minimal code, does not change behaviors, only provides definitions like `:rvm_shell`
|
34
|
+
- `selector` - extends `base` to automatically `set :default_shell`
|
35
|
+
- `selector_mixed` - alternative version of `selector` allowing to select which servers should be RVM aware
|
36
|
+
- `install_rvm` - adds task `rvm:install_rvm`
|
37
|
+
- `install_ruby` - adds task `rvm:install_ruby`
|
38
|
+
- `create_gemset` - adds task `rvm:create_gemset`
|
39
|
+
- `empty_gemset` - adds task `rvm:empty_gemset`
|
40
|
+
- `install_pkgs` - adds task `rvm:install_pkgs` - **deprecated** (you should try `autolibs` first)
|
41
|
+
- `gem_install_uninstall` - adds tasks `rvm:install_gem` / `rvm:uninstall_gem`
|
42
|
+
- `gemset_import_export` - adds tasks `rvm:import_gemset` / `rvm:export_gemset`
|
43
|
+
|
44
|
+
By default `rvm/capistrano` loads: `selector`, `install_rvm`, `install_ruby`, `create_gemset`.
|
45
|
+
|
46
|
+
Warning: `selector` and `selector_mixed` are to be used separately they can not be used both at the same time.
|
47
|
+
|
26
48
|
## Example
|
27
49
|
|
28
50
|
The following code will:
|
@@ -77,16 +99,16 @@ Warning, when using `:rvm_require_role` `parallel` is used to select shell per s
|
|
77
99
|
|
78
100
|
```ruby
|
79
101
|
set :rvm_require_role, :app
|
80
|
-
require "rvm/capistrano"
|
102
|
+
require "rvm/capistrano/selector_mixed"
|
81
103
|
```
|
82
104
|
|
83
|
-
It is important to `set :rvm_require_role` before `require "rvm/capistrano"`.
|
105
|
+
It is important to `set :rvm_require_role` before `require "rvm/capistrano/selector_mixed"`.
|
84
106
|
|
85
107
|
### To restrict rvm to only some servers
|
86
108
|
|
87
109
|
```ruby
|
88
110
|
set :rvm_require_role, :rvm
|
89
|
-
require "rvm/capistrano"
|
111
|
+
require "rvm/capistrano/selector_mixed"
|
90
112
|
role :rvm, "web1", "web2"
|
91
113
|
role :app, "web1", "web2", "web3"
|
92
114
|
```
|
@@ -94,7 +116,7 @@ role :app, "web1", "web2", "web3"
|
|
94
116
|
### To control rvm shell manually
|
95
117
|
|
96
118
|
```ruby
|
97
|
-
require "rvm/capistrano"
|
119
|
+
require "rvm/capistrano/base"
|
98
120
|
set :default_shell, :bash
|
99
121
|
task :example do
|
100
122
|
run "echo 'in rvm'", :shell => fetch(:rvm_shell)
|
@@ -11,7 +11,8 @@ module Capistrano
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def rvm_with_capistrano(&block)
|
14
|
-
if Capistrano.const_defined?
|
14
|
+
if Capistrano.const_defined?(:Configuration) &&
|
15
|
+
Capistrano::Configuration.methods.map(&:to_sym).include?(:instance)
|
15
16
|
Capistrano::Configuration.instance(true).load(&block)
|
16
17
|
end
|
17
18
|
end
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
9
|
- 0
|
10
|
-
|
11
|
-
- 3
|
12
|
-
version: 1.4.0.rc3
|
10
|
+
version: 1.4.0
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- Wayne E. Seguin
|
@@ -120,14 +118,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
119
|
none: false
|
122
120
|
requirements:
|
123
|
-
- - "
|
121
|
+
- - ">="
|
124
122
|
- !ruby/object:Gem::Version
|
125
|
-
hash:
|
123
|
+
hash: 3
|
126
124
|
segments:
|
127
|
-
-
|
128
|
-
|
129
|
-
- 1
|
130
|
-
version: 1.3.1
|
125
|
+
- 0
|
126
|
+
version: "0"
|
131
127
|
requirements: []
|
132
128
|
|
133
129
|
rubyforge_project:
|