Sha256: b77af069e65fea64d48858680a7a389345fb6a3dcf3e2ff0e138f3091c348bc9

Contents?: true

Size: 602 Bytes

Versions: 9

Compression:

Stored size: 602 Bytes

Contents

require 'rbconfig'

class TesttrackCli
  include Singleton

  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

9 entries across 9 versions & 1 rubygems

Version Path
test_track_rails_client-4.0.0.alpha28 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha27 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha26 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha25 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha24 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha23 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha22 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha21 app/models/testtrack_cli.rb
test_track_rails_client-4.0.0.alpha20 app/models/testtrack_cli.rb