Sha256: 695ef1dc9c929d417b4c05e8eb3ea11a1491a82753f09d2b191d09a8093b7427
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
module VagrantPlugins module Invade module InvadeModule module Provision class ShellInline < InvadeModule attr_reader :result attr_accessor :machine_name, :shell_inline_data def initialize(machine_name, shell_inline_data, result: nil) @machine_name = machine_name @shell_inline_data = shell_inline_data @result = result end def build b = binding begin # Get machine name machine_name = @machine_name # Values for shell provision section name = @shell_inline_data['name'] inline = @shell_inline_data['inline'] binary = @shell_inline_data['binary'] privileged = @shell_inline_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