Sha256: 1c3e2baf8fb3da5c93f15877795d6a1552c62313612051da7cc90eceff103fae
Contents?: true
Size: 1.34 KB
Versions: 16
Compression:
Stored size: 1.34 KB
Contents
module VagrantPlugins module Invade module Builder module Plugin require 'erubis' class WinNFSd attr_reader :result attr_accessor :machine_name, :ui, :winnfsd_data def initialize(machine_name, ui, winnfsd_data, result: nil) @machine_name = machine_name @ui = ui @winnfsd_data = winnfsd_data @result = result end def build unless Vagrant.has_plugin?('vagrant-winnfsd') @ui.error("[Invade] Plugin 'vagrant-winnfsd' not installed but defined. Use 'vagrant plugin install vagrant-winnfsd' to install it.") @result = "" else b = binding template_file = "#{TEMPLATE_PATH}/plugin/winnfsd.erb" begin # Get machine name machine_name = @machine_name # Values for winnfsd section logging = @winnfsd_data['logging'] uid = @winnfsd_data['uid'] gid = @winnfsd_data['gid'] eruby = Erubis::Eruby.new(File.read(template_file)) @result = eruby.result b rescue TypeError, SyntaxError, SystemCallError => e raise(e) end end end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems