Skip to content

Commit

Permalink
Merged: Adding a little tweak to allow the emptying of gemsets, update
Browse files Browse the repository at this point in the history
  • Loading branch information
vishvish authored and mpapis committed Jun 29, 2013
1 parent a4c3572 commit 0eb6dc1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions Manifest.yml
Expand Up @@ -4,5 +4,6 @@
- Rakefile
- LICENSE
- lib/rvm/capistrano.rb
- lib/rvm/capistrano/empty_gemset.rb
- lib/rvm/capistrano/version.rb
- lib/rvm/capistrano/selector.rb
19 changes: 19 additions & 0 deletions lib/rvm/capistrano/empty_gemset.rb
@@ -0,0 +1,19 @@
# Extension to empty gemset.

module Capistrano extend self
Configuration.instance(true).load do
namespace :rvm do
desc "Empty gemset"
task :empty_gemset do
ruby, gemset = rvm_ruby_string.to_s.strip.split /@/
if %w( release_path default ).include? "#{ruby}"
raise "gemset can not be emptied when using :rvm_ruby_string => :#{ruby}"
else
if gemset
run "#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm --force gemset empty #{gemset}", :shell => "#{rvm_install_shell}"
end
end
end
end
end if const_defined? :Configuration
end

0 comments on commit 0eb6dc1

Please sign in to comment.