Commit 6129f3f4 authored by Volker Hilsheimer's avatar Volker Hilsheimer
Browse files

Rename variable to slightly better name

parent 2035e7ab
...@@ -3,14 +3,14 @@ module Minicoin ...@@ -3,14 +3,14 @@ module Minicoin
class Minicoin < Vagrant.plugin(2, :config) class Minicoin < Vagrant.plugin(2, :config)
attr_accessor :machine attr_accessor :machine
attr_accessor :fs_mappings attr_accessor :fs_mappings
attr_accessor :actual_shared_folders attr_accessor :default_shared_folders
attr_accessor :guest_homes attr_accessor :guest_homes
def initialize def initialize
super super
@machine = UNSET_VALUE @machine = UNSET_VALUE
@fs_mappings = {} @fs_mappings = {}
@actual_shared_folders = {} @default_shared_folders = {}
@hash = UNSET_VALUE @hash = UNSET_VALUE
@guest_homes = UNSET_VALUE @guest_homes = UNSET_VALUE
end end
...@@ -29,7 +29,7 @@ module Minicoin ...@@ -29,7 +29,7 @@ module Minicoin
def merge(other) def merge(other)
super.tap do |result| super.tap do |result|
result.fs_mappings = fs_mappings.merge(other.fs_mappings) result.fs_mappings = fs_mappings.merge(other.fs_mappings)
result.actual_shared_folders = actual_shared_folders.merge(other.actual_shared_folders) result.default_shared_folders = default_shared_folders.merge(other.default_shared_folders)
result.guest_homes = other.guest_homes if @guest_homes == UNSET_VALUE result.guest_homes = other.guest_homes if @guest_homes == UNSET_VALUE
result.machine = {} if machine == UNSET_VALUE && other.machine == UNSET_VALUE result.machine = {} if machine == UNSET_VALUE && other.machine == UNSET_VALUE
end end
......
...@@ -289,7 +289,7 @@ module Minicoin ...@@ -289,7 +289,7 @@ module Minicoin
# disable all folder sharing, it makes no sense for a machine in the cloud # disable all folder sharing, it makes no sense for a machine in the cloud
override.vm.synced_folder ".", "/opt/minicoin", disabled: true override.vm.synced_folder ".", "/opt/minicoin", disabled: true
shared_folder = box.minicoin.actual_shared_folders shared_folder = box.minicoin.default_shared_folders
shared_folder.each do |host, guest| shared_folder.each do |host, guest|
override.vm.synced_folder host, guest, disabled: true override.vm.synced_folder host, guest, disabled: true
end end
......
...@@ -45,8 +45,7 @@ module Minicoin ...@@ -45,8 +45,7 @@ module Minicoin
pwd = ENV['minicoin_key'] pwd = ENV['minicoin_key']
override.vm.synced_folder ".", "/opt/minicoin", disabled: true override.vm.synced_folder ".", "/opt/minicoin", disabled: true
shared_folder = box.minicoin.actual_shared_folders box.minicoin.default_shared_folders.each do |host, guest|
shared_folder.each do |host, guest|
override.vm.synced_folder host, guest, disabled: true override.vm.synced_folder host, guest, disabled: true
end end
if @@AZURE_PROFILE.nil? if @@AZURE_PROFILE.nil?
......
...@@ -155,7 +155,7 @@ def share_folders(box, machine, shares) ...@@ -155,7 +155,7 @@ def share_folders(box, machine, shares)
box.vm.synced_folder host, guest, options box.vm.synced_folder host, guest, options
# host-side, slashes are always unix-style # host-side, slashes are always unix-style
host_path = host.gsub("\\", "/") host_path = host.gsub("\\", "/")
box.minicoin.actual_shared_folders[host_path] = guest box.minicoin.default_shared_folders[host_path] = guest
box.minicoin.fs_mappings[host_path] = win_links[guest[1..-1]] || guest box.minicoin.fs_mappings[host_path] = win_links[guest[1..-1]] || guest
end end
win_link_folders(box, win_links) if box.vm.guest == :windows win_link_folders(box, win_links) if box.vm.guest == :windows
......
...@@ -203,13 +203,13 @@ end ...@@ -203,13 +203,13 @@ end
class MockMinicoin class MockMinicoin
attr_accessor :machine attr_accessor :machine
attr_accessor :fs_mappings attr_accessor :fs_mappings
attr_accessor :actual_shared_folders attr_accessor :default_shared_folders
attr_accessor :hash attr_accessor :hash
attr_accessor :guest_homes attr_accessor :guest_homes
def initialize def initialize
@fs_mappings = {} @fs_mappings = {}
@actual_shared_folders = {} @default_shared_folders = {}
@hash = -1 @hash = -1
@guest_homes = nil @guest_homes = nil
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment