2013-06-17 21:17:31 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Cachier
|
|
|
|
class Bucket
|
|
|
|
class Rvm < Bucket
|
|
|
|
def self.capability
|
2013-06-25 19:51:59 +00:00
|
|
|
:rvm_path
|
2013-06-17 21:17:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2013-06-25 19:51:59 +00:00
|
|
|
if guest.capability?(:rvm_path)
|
|
|
|
if rvm_path = guest.capability(:rvm_path)
|
2014-02-14 03:15:43 +00:00
|
|
|
prefix = rvm_path.split('/').last
|
|
|
|
bucket_path = "/tmp/vagrant-cache/#{@name}/#{prefix}"
|
|
|
|
rvm_cache_path = "#{rvm_path}/archives"
|
2013-06-17 21:17:31 +00:00
|
|
|
|
2014-02-14 03:15:43 +00:00
|
|
|
symlink(rvm_cache_path, bucket_path)
|
2013-06-17 21:17:31 +00:00
|
|
|
end
|
|
|
|
else
|
2013-08-03 17:26:10 +00:00
|
|
|
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'RVM')
|
2013-06-17 21:17:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|