From d4f96f3f75da11335d8a429138ce1b69f0a3741a Mon Sep 17 00:00:00 2001 From: Bill Cromie Date: Tue, 25 Jun 2013 15:51:59 -0400 Subject: [PATCH] renaming rvmdir -> rvm_path --- lib/vagrant-cachier/bucket/rvm.rb | 10 +++++----- .../cap/linux/{rvmdir.rb => rvm_path.rb} | 10 +++++----- lib/vagrant-cachier/plugin.rb | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) rename lib/vagrant-cachier/cap/linux/{rvmdir.rb => rvm_path.rb} (64%) diff --git a/lib/vagrant-cachier/bucket/rvm.rb b/lib/vagrant-cachier/bucket/rvm.rb index f06abc4..c769ebd 100644 --- a/lib/vagrant-cachier/bucket/rvm.rb +++ b/lib/vagrant-cachier/bucket/rvm.rb @@ -3,21 +3,21 @@ module VagrantPlugins class Bucket class Rvm < Bucket def self.capability - :rvmdir + :rvm_path end def install machine = @env[:machine] guest = machine.guest - if guest.capability?(:rvmdir) - if rvmdir_path = guest.capability(:rvmdir) - prefix = rvmdir_path.split('/').last + if guest.capability?(:rvm_path) + if rvm_path = guest.capability(:rvm_path) + prefix = rvm_path.split('/').last bucket_path = "/tmp/vagrant-cache/#{@name}/#{prefix}" machine.communicate.tap do |comm| comm.execute("mkdir -p #{bucket_path}") - rvm_cache_path = "#{rvmdir_path}/archives" + rvm_cache_path = "#{rvm_path}/archives" @env[:cache_dirs] << rvm_cache_path diff --git a/lib/vagrant-cachier/cap/linux/rvmdir.rb b/lib/vagrant-cachier/cap/linux/rvm_path.rb similarity index 64% rename from lib/vagrant-cachier/cap/linux/rvmdir.rb rename to lib/vagrant-cachier/cap/linux/rvm_path.rb index ff896d4..698d13b 100644 --- a/lib/vagrant-cachier/cap/linux/rvmdir.rb +++ b/lib/vagrant-cachier/cap/linux/rvm_path.rb @@ -2,16 +2,16 @@ module VagrantPlugins module Cachier module Cap module Linux - module Rvmdir - def self.rvmdir(machine) - rvmdir = nil + module RvmPath + def self.rvm_path(machine) + rvm_path = nil machine.communicate.tap do |comm| return unless comm.test('rvm info') comm.execute 'echo $rvm_path' do |buffer, output| - rvmdir = output.chomp if buffer == :stdout + rvm_path = output.chomp if buffer == :stdout end end - return rvmdir + return rvm_path end end end diff --git a/lib/vagrant-cachier/plugin.rb b/lib/vagrant-cachier/plugin.rb index 8a1f3c9..0329ad2 100644 --- a/lib/vagrant-cachier/plugin.rb +++ b/lib/vagrant-cachier/plugin.rb @@ -13,9 +13,9 @@ module VagrantPlugins Cap::Linux::Gemdir end - guest_capability 'linux', 'rvmdir' do - require_relative 'cap/linux/rvmdir' - Cap::Linux::Rvmdir + guest_capability 'linux', 'rvm_path' do + require_relative 'cap/linux/rvm_path' + Cap::Linux::RvmPath end guest_capability 'debian', 'apt_cache_dir' do