Sha256: 9f125b11f2a1c08fb956c1c93341f2cb545253c0a15a8405088463d4eff3fd8a
Contents?: true
Size: 862 Bytes
Versions: 13
Compression:
Stored size: 862 Bytes
Contents
module Serverspec module Backend module PowerShell class Command attr_reader :import_functions, :script def initialize &block @import_functions = [] @script = "" instance_eval &block if block_given? end def using *functions functions.each { |f| import_functions << f } end def exec code @script = code end def convert_regexp(target) case target when Regexp target.source else target.to_s.gsub '/', '' end end def get_identity id raise "You must provide a specific Windows user/group" if id =~ /(owner|group|others)/ identity = id || 'Everyone' end def to_s @script end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems