Sha256: 289e691929c481c0834af763b73c71f1329de5ea238cc2ecd1c5f842e924c1dd

Contents?: true

Size: 814 Bytes

Versions: 16

Compression:

Stored size: 814 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
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
serverspec-0.10.6 lib/serverspec/backend/powershell/command.rb
serverspec-0.10.5 lib/serverspec/backend/powershell/command.rb
serverspec-0.10.4 lib/serverspec/backend/powershell/command.rb
serverspec-0.10.3 lib/serverspec/backend/powershell/command.rb
serverspec-0.10.2 lib/serverspec/backend/powershell/command.rb
serverspec-0.10.1 lib/serverspec/backend/powershell/command.rb
serverspec-0.10.0 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.8 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.7 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.6 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.5 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.4 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.3 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.2 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.1 lib/serverspec/backend/powershell/command.rb
serverspec-0.9.0 lib/serverspec/backend/powershell/command.rb