Sha256: b7595762c4350ad709975f7bce92e7c0262686ab29c03090f7c161065ff1d302

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

module VagrantPlugins
  module Invade
    module InvadeModule
      module SyncedFolder

        class Nfs < InvadeModule

          attr_reader :result
          attr_accessor :machine_name, :nfs_data

          def initialize(machine_name, nfs_data, result: nil)
            @machine_name = machine_name
            @nfs_data  = nfs_data
            @result = result
          end

          def build
            b = binding

            begin

              # Get machine name
              machine_name = @machine_name

              # Values for provider sections
              enabled = @nfs_data['enabled']
              uid = @nfs_data['uid']
              gid = @nfs_data['gid']
              source = @nfs_data['source']
              path = @nfs_data['path']
              mount_options = @nfs_data['mount_options']

              eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__)))
              @result = eruby.result b
            rescue TypeError, SyntaxError, SystemCallError => e
              raise(e)
            end
          end

        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-invade-0.6.4 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb
vagrant-invade-0.6.3 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb
vagrant-invade-0.6.2 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb
vagrant-invade-0.6.1 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb
vagrant-invade-0.6.0 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb