Sha256: 3903afc3ee86faf542293a2c512ac7ebfd8546215a342537355e9d687cecac0f
Contents?: true
Size: 1.47 KB
Versions: 15
Compression:
Stored size: 1.47 KB
Contents
module VagrantPlugins module Invade module Validator module Provision # (see: https://docs.vagrantup.com/v2/provisioning/shell.html) class ShellInline attr_accessor :env attr_accessor :shell_inline DEFAULT = { 'name' => 'invade_shell_inline', 'inline' => nil, 'binary' => nil, # Vagrant default is true 'privileged' => nil # Vagrant default is true } def initialize(env, shell_inline) @env = env @shell_inline = shell_inline end def validate return nil unless @shell_inline # NAME @shell_inline['name'] = Validator.validate_string( @shell_inline['name'], 'name', DEFAULT['name'] ) # INLINE SCRIPT @shell_inline['inline'] = Validator.validate_string( @shell_inline['inline'], 'inline', DEFAULT['inline'] ) # BINARY (replace windows newline endings with unix line endings) @shell_inline['binary'] = Validator.validate_boolean( @shell_inline['binary'], 'binary', DEFAULT['binary'] ) # PRIVILEGED (run with sudo) @shell_inline['privileged'] = Validator.validate_boolean( @shell_inline['privileged'], 'privileged', DEFAULT['privileged'] ) @shell_inline end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems