capistrano-rbenv-install 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +100 -7
- data/lib/capistrano/rbenv_install/version.rb +1 -1
- data/lib/capistrano/tasks/rbenv_install.rake +8 -8
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afdb932ae318230056e5634b199d619b18e1eefd
|
4
|
+
data.tar.gz: 9cc4770b5547475e981a478abc709ed9e88448b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eda8b1fd55349c806c86259cc246088bdef2f74fdfdf24a65dab5400a146988bd23bbe6c1f15b0425079b269236bade7895be5189d4bd09b2f84a59f3ba1d41
|
7
|
+
data.tar.gz: db9217e6149e8b22053e718cf1e1ea51f7896f4a06465a8fcf15d831b7d3f269cf8bcda3c8eb01f98a56e2d56eea4db51b8d8a4804aadbd96d35992b14a6c723
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,23 +1,116 @@
|
|
1
1
|
# Capistrano::Rbenv::Install
|
2
2
|
|
3
|
-
|
3
|
+
Capistrano plugin for **lightweight** rubies management with rbenv.
|
4
|
+
|
5
|
+
Works with Capistrano 3 (only). For Capistrano 2 support check
|
6
|
+
[this repository](https://github.com/yyuu/capistrano-rbenv)
|
7
|
+
(version 1.x of `capistrano-rbenv` gem).
|
4
8
|
|
5
9
|
### Installation
|
6
10
|
|
7
|
-
|
11
|
+
Install by adding the following to the `Gemfile`:
|
12
|
+
|
13
|
+
gem 'capistrano', '~> 3.1'
|
14
|
+
gem 'capistrano-rbenv', '~> 2.0' # required
|
15
|
+
gem 'capistrano-rbenv-install'
|
16
|
+
|
17
|
+
then:
|
18
|
+
|
19
|
+
$ bundle install
|
20
|
+
|
21
|
+
### Configuration and usage
|
22
|
+
|
23
|
+
The following goes to `Capfile`:
|
24
|
+
|
25
|
+
require 'capistrano/rbenv_install'
|
26
|
+
|
27
|
+
This plugin heavily relies on
|
28
|
+
[capistrano-rbenv config options](https://github.com/capistrano/rbenv#usage).
|
29
|
+
So make sure to properly setup `capistrano-rbenv` and you'll be good.
|
30
|
+
|
31
|
+
For example, in `config/deploy.rb`:
|
32
|
+
|
33
|
+
set :rbenv_ruby, '2.0.0-p247'
|
34
|
+
|
35
|
+
Other than that, this plugin does not need any setup.
|
36
|
+
|
37
|
+
Run:
|
38
|
+
|
39
|
+
$ bundle exec production deploy
|
40
|
+
|
41
|
+
And watch ruby being installed.
|
8
42
|
|
9
|
-
###
|
43
|
+
### Purpose
|
10
44
|
|
11
|
-
|
45
|
+
Installing software packages on servers is called
|
46
|
+
[provisioning](http://en.wikipedia.org/wiki/Provisioning#Server_provisioning).
|
47
|
+
Installing and managing rubies falls into that domain, and is best done with a
|
48
|
+
proper tool like chef, puppet, ansible or something else.
|
12
49
|
|
13
|
-
|
50
|
+
Why this plugin then?
|
14
51
|
|
15
|
-
|
52
|
+
- Capistrano is a great tool (written in ruby btw) so, when there's a need,
|
53
|
+
installing rubies with it should be easy too
|
54
|
+
- not everyone knows (or has time to learn) how to use provisioning tools
|
55
|
+
mentioned above
|
56
|
+
- sometimes installing ruby manually is just easier than fiddling with your
|
57
|
+
chef cookbooks. Instead of manually, you can do it with this plugin now
|
16
58
|
|
17
|
-
|
59
|
+
Imagine you want to quickly deploy a ruby `1.9.2` app to a server that already
|
60
|
+
has one or more ruby `2.0.0` apps.
|
61
|
+
"Oh, let's just quickly update our cookbooks" - yea right! I'd rather manually
|
62
|
+
`ssh` to the server directly and run `rbenv install 1.9.2-p320`. But I don't
|
63
|
+
want to manually `ssh` to the server too. In that case I just can install
|
64
|
+
`capistrano-rbenv-install` and forget about it altogether.
|
65
|
+
|
66
|
+
### What it does
|
67
|
+
|
68
|
+
It only does the bare minimum that's required for Capistrano to work. That's
|
69
|
+
why it's a plugin for *lightweight* ruby management.
|
70
|
+
|
71
|
+
It makes sure that:
|
72
|
+
|
73
|
+
- `rbenv` and `ruby build` are installed (installs them using `git`)
|
74
|
+
- ruby specified with `:rbenv_ruby` option is installed
|
75
|
+
- `bundler` gem is installed
|
76
|
+
|
77
|
+
### What it does NOT do
|
78
|
+
|
79
|
+
It **does not**:
|
80
|
+
|
81
|
+
- manage ruby gems<br/>
|
82
|
+
`bundler` is installed by default and that's pretty much it.
|
83
|
+
|
84
|
+
- does not install ruby dependency packages<br/>
|
85
|
+
(git-core build-essential libreadline6-dev etc ...). You should probably
|
86
|
+
install/provision those some other way.
|
87
|
+
|
88
|
+
- does not manage `rbenv` plugins<br/>
|
89
|
+
It only installs `ruby build` for the purpose of installing ruby.
|
90
|
+
|
91
|
+
- does not setup rbenv for direct use on the server via the command line<br/>
|
92
|
+
Example: `ssh`ing to the server and manually running ruby commands is not
|
93
|
+
supported.
|
94
|
+
|
95
|
+
### More Capistrano automation?
|
96
|
+
|
97
|
+
If you'd like to streamline your Capistrano deploys, you might want to check
|
98
|
+
these zero-configuration, plug-n-play plugins:
|
99
|
+
|
100
|
+
- [capistrano-postgresql](https://github.com/bruno-/capistrano-postgresql)<br/>
|
101
|
+
plugin that automates postgresql configuration and setup
|
102
|
+
- [capistrano-unicorn-nginx](https://github.com/bruno-/capistrano-unicorn-nginx)<br/>
|
103
|
+
no-configuration unicorn and nginx setup with sensible defaults
|
104
|
+
- [capistrano-safe-deploy-to](https://github.com/bruno-/capistrano-safe-deploy-to)<br/>
|
105
|
+
if you're annoyed that Capistrano does **not** create a deployment path for the
|
106
|
+
app on the server (default `/var/www/myapp`), this is what you need!
|
18
107
|
|
19
108
|
### Thanks
|
20
109
|
|
110
|
+
@yyuu and the original
|
111
|
+
[capistrano-rbenv](https://github.com/yyuu/capistrano-rbenv) project for
|
112
|
+
inspiration
|
113
|
+
|
21
114
|
### License
|
22
115
|
|
23
116
|
[MIT](LICENSE.md)
|
@@ -17,7 +17,7 @@ namespace :rbenv do
|
|
17
17
|
task :install_rbenv do
|
18
18
|
on roles fetch(:rbenv_roles) do
|
19
19
|
next if test "[ -d #{fetch(:rbenv_path)} ]"
|
20
|
-
execute :git,
|
20
|
+
execute :git, :clone, 'https://github.com/sstephenson/rbenv.git', fetch(:rbenv_path)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -25,7 +25,7 @@ namespace :rbenv do
|
|
25
25
|
task :install_ruby_build do
|
26
26
|
on roles fetch(:rbenv_roles) do
|
27
27
|
next if test "[ -d #{fetch(:rbenv_ruby_build_path)} ]"
|
28
|
-
execute :git,
|
28
|
+
execute :git, :clone, 'https://github.com/sstephenson/ruby-build.git', fetch(:rbenv_ruby_build_path)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -33,23 +33,23 @@ namespace :rbenv do
|
|
33
33
|
task :install_ruby do
|
34
34
|
on roles fetch(:rbenv_roles) do
|
35
35
|
next if test "[ -d #{fetch(:rbenv_ruby_dir)} ]"
|
36
|
-
execute "#{fetch(:rbenv_path)}/bin/rbenv install
|
36
|
+
execute "#{fetch(:rbenv_path)}/bin/rbenv", :install, fetch(:rbenv_ruby)
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
desc 'Install bundler gem'
|
41
41
|
task :install_bundler do
|
42
42
|
on roles fetch(:rbenv_roles) do
|
43
|
-
next if test :gem,
|
44
|
-
execute :gem,
|
43
|
+
next if test :gem, :query, '--quiet --installed --name-matches ^bundler$'
|
44
|
+
execute :gem, :install, :bundler, '--quiet --no-rdoc --no-ri'
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
desc 'Install rbenv, ruby build and ruby version'
|
49
49
|
task :install do
|
50
|
-
invoke
|
51
|
-
invoke
|
52
|
-
invoke
|
50
|
+
invoke 'rbenv:install_rbenv'
|
51
|
+
invoke 'rbenv:install_ruby_build'
|
52
|
+
invoke 'rbenv:install_ruby'
|
53
53
|
end
|
54
54
|
|
55
55
|
before 'rbenv:validate', 'rbenv:install'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-rbenv-install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Sutic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -62,6 +62,7 @@ executables: []
|
|
62
62
|
extensions: []
|
63
63
|
extra_rdoc_files: []
|
64
64
|
files:
|
65
|
+
- CHANGELOG.md
|
65
66
|
- Gemfile
|
66
67
|
- LICENSE.md
|
67
68
|
- README.md
|