Sha256: dee22c63c0cd0efa118dc8d02657a18a90e55cd5fc06dcff9770d1dc504158da

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 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']
              linux__nfs_options = @nfs_data['linux__nfs_options']
              bsd__nfs_options = @nfs_data['bsd__nfs_options']
              nfs_version = @nfs_data['nfs_version']
              nfs_udp = @nfs_data['nfs_udp']

              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

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-invade-0.8.0 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb
vagrant-invade-0.7.0 lib/vagrant-invade/module/synced_folder/nfs/nfs.rb