Skip to content

Commit

Permalink
add rvm:info_list
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Sep 4, 2013
1 parent 4a73935 commit e3242b3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions Manifest.yml
Expand Up @@ -10,6 +10,7 @@
- lib/rvm/capistrano/empty_gemset.rb
- lib/rvm/capistrano/gem_install_uninstall.rb
- lib/rvm/capistrano/gemset_import_export.rb
- lib/rvm/capistrano/info_list.rb
- lib/rvm/capistrano/install_pkgs.rb
- lib/rvm/capistrano/install_ruby.rb
- lib/rvm/capistrano/install_rvm.rb
Expand Down
12 changes: 11 additions & 1 deletion README.md
Expand Up @@ -33,6 +33,7 @@ modules which allow selecting which parts of it should be included.
- `base` - minimal code, does not change behaviors, only provides definitions like `:rvm_shell`
- `selector` - extends `base` to automatically `set :default_shell`
- `selector_mixed` - alternative version of `selector` allowing to select which servers should be RVM aware
- `info_list` - adds tasks `rvm:info`, `rvm:list` and `rvm:info_list`
- `install_rvm` - adds task `rvm:install_rvm` - it also updates rvm if already installed
- `install_ruby` - adds task `rvm:install_ruby`
- `create_gemset` - adds task `rvm:create_gemset`
Expand All @@ -42,7 +43,7 @@ modules which allow selecting which parts of it should be included.
- `gemset_import_export` - adds tasks `rvm:import_gemset` / `rvm:export_gemset`
- `alias_and_wrapp` - adds tasks `rvm:create_alias` / `rvm:create_wrappers` / `rvm:show_alias_path`

By default `rvm/capistrano` loads: `selector`, `install_rvm`, `install_ruby`, `create_gemset`.
By default `rvm/capistrano` loads: `selector`, `info_list`, `install_rvm`, `install_ruby`, `create_gemset`.

Warning: `selector` and `selector_mixed` are to be used separately they can not be used both at the same time.

Expand Down Expand Up @@ -163,6 +164,12 @@ task :example do
end
```

### Show info on remote rvm and list rubies

```bash
cap rvm:info_list
```

## Options

- `:rvm_ruby_string` - which ruby should be loaded
Expand Down Expand Up @@ -212,6 +219,9 @@ $ cap -T rvm
cap rvm:create_gemset # Create gemset
cap rvm:export_gemset # Export the current RVM ruby gemset contents to a file.
cap rvm:import_gemset # Import file contents to the current RVM ruby gemset.
cap rvm:info # Show rvm info
cap rvm:info_list # Show info and list rubies
cap rvm:list # List rvm rubies
cap rvm:install_ruby # Install RVM ruby to the server, create gemset ...
cap rvm:install_rvm # Install/update RVM of the given choice to the server.
cap rvm:install_pkgs # Install RVM packages to the server.
Expand Down
1 change: 1 addition & 0 deletions lib/rvm/capistrano.rb
@@ -1,6 +1,7 @@
# Recipes for using RVM on a server with capistrano.

require 'rvm/capistrano/selector'
require 'rvm/capistrano/info_list'
require 'rvm/capistrano/install_rvm'
require 'rvm/capistrano/install_ruby'
require 'rvm/capistrano/create_gemset'
Expand Down
23 changes: 23 additions & 0 deletions lib/rvm/capistrano/info_list.rb
@@ -0,0 +1,23 @@
require 'rvm/capistrano/base'
require 'rvm/capistrano/helpers/with_rvm_group'

rvm_with_capistrano do
namespace :rvm do

desc "Show rvm info"
rvm_task :info do
run_rvm("info")
end

desc "List rvm rubies"
rvm_task :list do
run_rvm("list")
end

desc "Show info and list rubies"
task :info_list do
info
list
end
end
end

0 comments on commit e3242b3

Please sign in to comment.