Sha256: 516150e88e62b85f1d111bf529462f7375d48338d50ddaedfef567db238a2679
Contents?: true
Size: 753 Bytes
Versions: 14
Compression:
Stored size: 753 Bytes
Contents
#!/usr/bin/env ruby # Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true def mac? RUBY_PLATFORM.match?(/darwin/) end def windows? RUBY_PLATFORM.match?(/cygwin|mswin|mingw|bccwin|wince|emx/) end def path base_path = "#{ File.dirname(__FILE__) }/.." if mac? "#{ base_path }/service_executables/mac/contrast-service" elsif windows? "#{ base_path }/service_executables/windows/contrast-service.exe" else "#{ base_path }/service_executables/linux/contrast-service" end end executable_path = path if File.exist?(executable_path) Kernel.exec(executable_path) else puts "Service executable not found at: #{ executable_path }" end
Version data entries
14 entries across 14 versions & 1 rubygems