437ba6a4cf
Doing this is kinda irresponsible because we don't have any unit testing in place but I've had enough of copy & pasting things around. Although it doesn't make the codebase GREAT, I believe it'll reach a _nice_ status :) Thanks to those changes I realized that skipping configuration of buckets that have already been configured was easier than I thought and should be enough to close GH-85 \o/
22 lines
574 B
Ruby
22 lines
574 B
Ruby
module VagrantPlugins
|
|
module Cachier
|
|
class Bucket
|
|
class Composer < Bucket
|
|
def self.capability
|
|
:composer_path
|
|
end
|
|
|
|
def install
|
|
if guest.capability?(:composer_path)
|
|
if composer_path = guest.capability(:composer_path)
|
|
bucket_path = "/tmp/vagrant-cache/#{@name}"
|
|
symlink(composer_path, create_parent: false)
|
|
end
|
|
else
|
|
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Composer')
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|