Sha256: acb69ee2b385ffb6b79a26fe2c1b6e18598b3b1e9332ae616ae8b89d49dd4b20

Contents?: true

Size: 913 Bytes

Versions: 2

Compression:

Stored size: 913 Bytes

Contents

module VagrantPlugins
  module Invade
    module InvadeModule

      class Nfs < InvadeModule

        attr_reader :result
        attr_accessor :nfs_data

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

        def build
          b = binding

          begin

            # Values for nfs part
            functional = @nfs_data['functional']
            @nfs_data['map_uid'] ? map_uid = @nfs_data['map_uid'] : map_uid = Process.uid
            @nfs_data['map_gid'] ? map_gid = @nfs_data['map_gid'] : map_gid = Process.gid
            verify_installed = @nfs_data['verify_installed']

            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

Version data entries

2 entries across 2 versions & 1 rubygems

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