Capistrano Rbenv Maintenance
A Capistrano 3 extension that allows for easily maintaining rbenv. Use the Capistrano Rbenv gem for using rbenv with Capistrano, use this gem to add additional tasks for setting up rbenv and installing rubies.
Installation
Add this line to your application's Gemfile:
gem 'capistrano-rbenv-maintenance'
And then execute:
$ bundle
Then add this line to your Capfile:
require 'capistrano/rbenv/maintenance'
Tasks
rbenv:setup
This task does an initial install, if necessary, of rbenv and the ruby-build plugin.
rbenv:upgrade
This task upgrades rbenv and ruby-build
rbenv:install
This task installs a ruby using ruby-build, if necessary. If no option is provided, the task will try to
install the ruby set via rbenv_ruby
.
Automatic Hooks
These tasks are automatically hooked off of the rbenv:map_bins
and rbenv:validate
tasks provided by
Capistrano Rbenv. This means that once you install the gem and add it to your Capfile, you're ready to go.
Every deployment will check to see if rbenv is installed and if the proper version of ruby is installed. If
not, it will install as necessary.
Configuration
Under normal circumstances, no configuration should be necessary but it is provided to allow to workarounds if necessary.
-
ruby_build_path
- The path where ruby-build should be installed. Defaults toplugins/ruby-build
underrbenv_path
-
rbenv_git_url
- The git url used to download and install rbenv. Defaults togit://github.com/sstephenson/rbenv.git
-
ruby_build_git_url
- The git url used to download and install ruby-build. Defaults togit://github.com/sstephenson/ruby-build.git
Contributing
- Fork it ( http://github.com//capistrano-rbenv-maintenance/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Credits
This is originally based off of a pull request from Stas Sușcov. Gemified and maintained by Bob Breznak