vagrant-cachier-ng/lib/vagrant-cachier/bucket/generic.rb
Gustavo L. de M. Chaves a63156e482 Implement generic bucket
This bucket must be explicitly enabled and may be useful for users
wanting a generic caching mechanism that they can use directly instead
of via some predefined packaging system.

For instance, this enables one to implement a cache for packages
downloaded via wget or curl.
2014-03-23 22:29:23 -03:00

19 lines
491 B
Ruby

module VagrantPlugins
module Cachier
class Bucket
class Generic < Bucket
def self.capability
:generic_cache_dir
end
def install
if @configs.has_key?(:cache_dir)
@name = @configs.has_key?(:name) ? "generic-#{@configs[:name]}" : "generic"
symlink(@configs[:cache_dir])
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Generic')
end
end
end
end
end