Sha256: 342dd1eccdf6bcb7d113ca10613ffe228a933ecc1576c27ddb01b0952039b940
Contents?: true
Size: 759 Bytes
Versions: 18
Compression:
Stored size: 759 Bytes
Contents
require 'rbconfig' require 'English' class TesttrackCli include Singleton def skip_testtrack_cli? Rails.env.test? || (Rails.env.development? && project_initialized?) || ENV.key?('SKIP_TESTTRACK_CLI') end def project_initialized? File.exist?(File.join('testtrack', 'schema.yml')) end def call(*args) system(path, *args) $CHILD_STATUS end def path TestTrackRailsClient::Engine.root.join("vendor", "bin", "testtrack-cli", filename).to_s end def filename case host_os when /darwin/ "testtrack.darwin" when /linux/ "testtrack.linux" else raise "no testtrack binary for platform #{host_os}" end end private def host_os RbConfig::CONFIG['host_os'] end end
Version data entries
18 entries across 18 versions & 1 rubygems