rvm-capistrano 1.3.0.rc12 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +115 -19
  2. data/lib/rvm/capistrano/version.rb +1 -1
  3. metadata +82 -60
  4. checksums.yaml +0 -7
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # rvm-capistrano
2
2
 
3
- https://rvm.io/integration/capistrano/#gem
4
-
5
3
  ## Description
6
4
 
7
5
  RVM / Capistrano Integration Gem
@@ -10,13 +8,16 @@ RVM / Capistrano Integration Gem
10
8
 
11
9
  RVM / Capistrano integration is available as a separate gem
12
10
 
13
- $ gem install rvm-capistrano
11
+ ```bash
12
+ $ gem install rvm-capistrano
13
+ ```
14
14
 
15
15
  Or, if the **capistrano** gem is aleady in your `Gemfile`, then add **rvm-capistrano**:
16
16
 
17
- $ echo "gem 'rvm-capistrano'" >> Gemfile
18
- $ bundle install
19
-
17
+ ```bash
18
+ $ echo "gem 'rvm-capistrano'" >> Gemfile
19
+ $ bundle install
20
+ ```
20
21
 
21
22
  ## Example
22
23
 
@@ -27,23 +28,113 @@ The following code will:
27
28
 
28
29
  Example:
29
30
 
30
- set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
31
- set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode
32
- set :rvm_install_pkgs, %w[libyaml openssl] # package list from https://rvm.io/packages
33
- set :rvm_install_ruby_params, '--with-opt-dir=/usr/local/rvm/usr' # package support
31
+ ```ruby
32
+ set :rvm_ruby_string, :local # use the same ruby as used locally for deployment
33
+ set :rvm_autolibs_flag, "read-only" # more info: rvm help autolibs
34
34
 
35
- before 'deploy:setup', 'rvm:install_rvm' # install RVM
36
- before 'deploy:setup', 'rvm:install_pkgs' # install RVM packages before Ruby
37
- before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:
38
- before 'deploy:setup', 'rvm:create_gemset' # only create gemset
39
- before 'deploy:setup', 'rvm:import_gemset' # import gemset from file
35
+ before 'deploy:setup', 'rvm:install_rvm' # install RVM
36
+ before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, OR:
37
+ before 'deploy:setup', 'rvm:create_gemset' # only create gemset
38
+
39
+ require "rvm/capistrano"
40
+ ```
40
41
 
41
- require "rvm/capistrano"
42
+ ### RVM + Ruby on every deploy
42
43
 
44
+ Update RVM and make sure Ruby is installed on every deploy:
45
+
46
+ ```ruby
47
+ set :rvm_ruby_string, :local # use the same ruby as used locally for deployment
48
+
49
+ before 'deploy', 'rvm:install_rvm' # update RVM
50
+ before 'deploy', 'rvm:install_ruby' # install Ruby and create gemset (both if missing)
51
+
52
+ require "rvm/capistrano"
53
+ ```
54
+
55
+ ### To use the ruby version currently active locally
56
+
57
+ ```ruby
58
+ set :rvm_ruby_string, :local
59
+ ```
43
60
 
44
- ## To use the ruby version currently active locally
61
+ ### To restrict rvm to only `:app` servers
45
62
 
46
- set :rvm_ruby_string, :local
63
+ Warning, when using `:rvm_require_role` `parallel` is used to select shell per server instead of `:default_shell`
64
+
65
+ ```ruby
66
+ set :rvm_require_role, :app
67
+ require "rvm/capistrano"
68
+ ```
69
+
70
+ The order is important `:rvm_require_role` has to be `set` before `require "rvm/capistrano"`.
71
+
72
+ ### To restrict rvm to only some servers
73
+
74
+ ```ruby
75
+ set :rvm_require_role, :rvm
76
+ require "rvm/capistrano"
77
+ role :rvm, "web1", "web2"
78
+ role :app, "web1", "web2", "web3"
79
+ ```
80
+
81
+ ### To control rvm shell manually
82
+
83
+ ```ruby
84
+ require "rvm/capistrano"
85
+ set :default_shell, :bash
86
+ task :example do
87
+ run "echo 'in rvm'", :shell => fetch(:rvm_shell)
88
+ end
89
+ ```
90
+
91
+ ### Disable rvm shell for single command
92
+
93
+ ```ruby
94
+ task :example do
95
+ run "echo 'not in rvm'", :shell => :bash
96
+ end
97
+ ```
98
+
99
+ ## Options
100
+
101
+ - `:rvm_ruby_string` - which ruby should be loaded
102
+ - `release_path` - load ruby defined in `#{release_path}` - Capistrano variable pointing where code is checked out
103
+ - `local` - detect local machine running ruby using `GEM_HOME`
104
+ - `<ruby-version>` - specify ruby version to use
105
+
106
+ - `:rvm_type` - how to detect rvm, default `:user`
107
+ - `:user` - RVM installed in `$HOME`, user installation (default)
108
+ - `:system` - RVM installed in `/usr/local`, multiuser installation
109
+
110
+ - `:rvm_autolibs_flag` - control autolibs, read more `rvm help autolibs`
111
+ - `:disable` - fully disable autolibs, limit automated tasks
112
+ - `:read` - autolibs only in read only mode, do not change anything in system
113
+ - `:fail` - autolibs only in read only mode, fail if changes are required
114
+ - `:enable` - let RVM install what is needed for ruby, required `set :use_sudo, true`
115
+
116
+ - `:rvm_path` - force `$rvm_path`, only overwrite if standard paths can not be used
117
+ - `:rvm_bin_path` - force `$rvm_bin_path`, only overwrite if standard paths can not be used
118
+ - `:rvm_gemset_path` - storage for gem lists files for exporting/importing, by default `$rvm_path/gemsets`
119
+ - `:rvm_install_with_sudo` - when set to `true` forces RVM installation with `sudo` even `:use_sudo` is set to `false`
120
+
121
+ - `:rvm_install_type` - version of RVM to install, by default `stable`
122
+ - `stable` - stable version of RVM
123
+ - `head` - head version of RVM (development)
124
+ - `latest-1.18` - latest version of RVM 1.18.x
125
+ - `1.18.4` - selected version
126
+
127
+ - `:rvm_install_shell` - shell to be used for `rvm` operations, by default `bash`, most likely you do not need to change it
128
+ - `:rvm_install_ruby` - a command used to install ruby, by default `install`, most likely you do not need to change it
129
+ - `:rvm_install_ruby_threads` - number of threads to use for ruby compilation, by default it's number of CPU cores on Linux
130
+ - `:rvm_install_ruby_params` - parameters for ruby, example `--patch railsexpress`
131
+ - `:rvm_install_pkgs` - array of packages to install with `cap rvm:install_pkgs`
132
+ - `:rvm_add_to_group` - user name to add to `rvm` group when RVM is installed with `:rvm_type` `:system`, by default it's the user name that runs deploy
133
+
134
+ - `:rvm_require_role` - allows using RVM for only one role, useful when database is separated, it has to be defined before `require 'rvm/capistrano'`
135
+ - `:app` - use RVM only on servers defined for role `:app`
136
+ - `:rvm` - use RVM only on servers defined for role `:rvm` - where not all `:app` servers support RVM
137
+ - `<role>` - any other role that is defining servers supporting RVM
47
138
 
48
139
  ## Tasks
49
140
 
@@ -56,9 +147,14 @@ cap rvm:install_ruby # Install RVM ruby to the server, create gemset ...
56
147
  cap rvm:install_rvm # Install RVM of the given choice to the server.
57
148
  cap rvm:install_pkgs # Install RVM packages to the server.
58
149
  cap rvm:install_gem GEM=my_gem # Install gem {my_gem} on the server using selected ruby.
150
+ # Use `ENV['GEM'] = "bundler"` in script to specify gems.
59
151
  cap rvm:uninstall_gem GEM=my_gem # Uninstall gem {my_gem} from the server selected ruby.
60
152
  ```
61
153
 
62
154
  ## Development
63
155
 
64
- $ rake spec
156
+ SM Framework extension for gem development:
157
+
158
+ $ curl -L https://get.smf.sh | sh
159
+ $ sm ext install gem mpapis/sm_gem
160
+ $ sm gem --help
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.3.0.rc12"
3
+ VERSION="1.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,66 +1,79 @@
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.rc12
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
5
11
  platform: ruby
6
- authors:
12
+ authors:
7
13
  - Wayne E. Seguin
8
14
  - Michal Papis
9
15
  autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
- date: 2013-04-12 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
18
+
19
+ date: 2013-04-12 00:00:00 +02:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
15
23
  name: capistrano
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: 2.0.0
21
- type: :runtime
22
24
  prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - '>='
26
- - !ruby/object:Gem::Version
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 15
31
+ segments:
32
+ - 2
33
+ - 0
34
+ - 0
27
35
  version: 2.0.0
28
- - !ruby/object:Gem::Dependency
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
29
39
  name: rake
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - '>='
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :development
36
40
  prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - '>='
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
- - !ruby/object:Gem::Dependency
43
- name: minitest
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - '>='
47
- - !ruby/object:Gem::Version
48
- version: '0'
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 0
49
+ version: "0"
49
50
  type: :development
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: minitest
50
54
  prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ type: :development
65
+ version_requirements: *id003
56
66
  description: RVM / Capistrano Integration Gem
57
- email:
67
+ email:
58
68
  - wayneeseguin@gmail.com
59
69
  - mpapis@gmail.com
60
70
  executables: []
71
+
61
72
  extensions: []
73
+
62
74
  extra_rdoc_files: []
63
- files:
75
+
76
+ files:
64
77
  - History.md
65
78
  - Manifest.yml
66
79
  - README.md
@@ -69,30 +82,39 @@ files:
69
82
  - lib/rvm/capistrano.rb
70
83
  - lib/rvm/capistrano/version.rb
71
84
  - spec/spec_helper.rb
85
+ has_rdoc: true
72
86
  homepage: https://rvm.beginrescueend.com/integration/capistrano
73
- licenses:
87
+ licenses:
74
88
  - MIT
75
- metadata: {}
76
89
  post_install_message:
77
90
  rdoc_options: []
78
- require_paths:
91
+
92
+ require_paths:
79
93
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - '>='
83
- - !ruby/object:Gem::Version
84
- version: '0'
85
- required_rubygems_version: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>'
88
- - !ruby/object:Gem::Version
89
- version: 1.3.1
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ hash: 3
100
+ segments:
101
+ - 0
102
+ version: "0"
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ none: false
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ hash: 3
109
+ segments:
110
+ - 0
111
+ version: "0"
90
112
  requirements: []
113
+
91
114
  rubyforge_project:
92
- rubygems_version: 2.0.3
115
+ rubygems_version: 1.6.2
93
116
  signing_key:
94
- specification_version: 4
117
+ specification_version: 3
95
118
  summary: RVM / Capistrano Integration Gem
96
- test_files:
119
+ test_files:
97
120
  - spec/spec_helper.rb
98
- has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 306f784cddc89f763e8d11f4f11e49953b5ea412
4
- data.tar.gz: 80429d698c74cc1704fca6a06af1c0a7686322d2
5
- SHA512:
6
- metadata.gz: d99158d6f1627893757adb6723a482fd53a0a6aa0f461f29c6267ad594d36526c4765fad4b2d8b15de7dd1c83c31a252c5a22e8501d705b5fd0ea90f154edf13
7
- data.tar.gz: f3b07661ccd6eb38c5d4f9b4f440092d033b5707da417642d0341fb0910aad4c9bae972c9d0709c7cf24cb1b31fa1b1c0b8b4e62d3f3d39aa03959e0ae099b26