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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 477d02c69f8a561b6dbfddc756be0563d18e4abb
4
- data.tar.gz: 4a9bc69e20fdf1c876a86abf8e74e8caffe77b82
3
+ metadata.gz: afdb932ae318230056e5634b199d619b18e1eefd
4
+ data.tar.gz: 9cc4770b5547475e981a478abc709ed9e88448b7
5
5
  SHA512:
6
- metadata.gz: 90039fb826fcce0dbefc60d1e349a57757332632ac864bac9b51029e4047fe2586a9186898ad51f904f763d05bdeab1f67969bec8d89ab165c5597fba95002e6
7
- data.tar.gz: 2697b4532a4ff979f236ab312e1e517304ff259e7823d8968db397102655c82069965a189d7dd7dfd98bb5e5962e8b3071b45c66540146070a8dce13643b1792
6
+ metadata.gz: 9eda8b1fd55349c806c86259cc246088bdef2f74fdfdf24a65dab5400a146988bd23bbe6c1f15b0425079b269236bade7895be5189d4bd09b2f84a59f3ba1d41
7
+ data.tar.gz: db9217e6149e8b22053e718cf1e1ea51f7896f4a06465a8fcf15d831b7d3f269cf8bcda3c8eb01f98a56e2d56eea4db51b8d8a4804aadbd96d35992b14a6c723
data/CHANGELOG.md ADDED
@@ -0,0 +1,2 @@
1
+ ### v1.0.0, 2014-03-39
2
+ - @bruno- all the v1.0.0 features
data/README.md CHANGED
@@ -1,23 +1,116 @@
1
1
  # Capistrano::Rbenv::Install
2
2
 
3
- ### About
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
- ### Standard usage
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
- ### How it works
43
+ ### Purpose
10
44
 
11
- ### Gotchas
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
- ### Debugging
50
+ Why this plugin then?
14
51
 
15
- ### Configuration
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
- ### Contributing and bug reports
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)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module RbenvInstall
3
- VERSION = "0.0.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -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, "clone https://github.com/sstephenson/rbenv.git #{fetch(:rbenv_path)}"
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, "clone https://github.com/sstephenson/ruby-build.git #{fetch(:rbenv_ruby_build_path)}"
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 #{fetch(:rbenv_ruby)}"
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, "query --quiet --installed --name-matches ^bundler$"
44
- execute :gem, "install bundler --quiet --no-rdoc --no-ri"
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 "rbenv:install_rbenv"
51
- invoke "rbenv:install_ruby_build"
52
- invoke "rbenv:install_ruby"
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.1
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-22 00:00:00.000000000 Z
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