Sha256: 7bee0edf5ad946d96145c5c5679d3727751b9d85b7136e86de62a29e96b75e73
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
module VagrantPlugins module Invade module InvadeModule module Provision class Shell < InvadeModule attr_reader :result attr_accessor :machine_name, :shell_data def initialize(machine_name, shell_data, result: nil) @machine_name = machine_name @shell_data = shell_data @result = result end def build b = binding begin # Get machine name machine_name = @machine_name # Values for shell provision section name = @shell_data['name'] path = @shell_data['path'] binary = @shell_data['binary'] privileged = @shell_data['privileged'] 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
3 entries across 3 versions & 1 rubygems