Sha256: 52566c4628615f717b59547a0dab6ab293a79e2cdef767287ec63f5836cc5fe3

Contents?: true

Size: 695 Bytes

Versions: 8

Compression:

Stored size: 695 Bytes

Contents

class Teabag.Runner

  @run: false

  constructor: ->
    return if @constructor.run
    @constructor.run = true
    @fixturePath = "#{Teabag.root}/fixtures"
    @params = @getParams()
    @setup()


  getParams: ->
    params = {}
    for param in Teabag.location.search.substring(1).split("&")
      [name, value] = param.split("=")
      params[decodeURIComponent(name)] = decodeURIComponent(value)
    params


  getReporter: ->
    if @params["reporter"]
      Teabag.Reporters[@params["reporter"]]
    else
      if window.navigator.userAgent.match(/PhantomJS/)
        Teabag.Reporters.Console
      else
        Teabag.Reporters.HTML


  setup: ->
    # left for subclasses to implement

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
teabag-0.5.1 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.5.0 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.4.6 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.4.5 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.4.4 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.4.3 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.4.2 app/assets/javascripts/teabag/base/runner.coffee
teabag-0.4.1 app/assets/javascripts/teabag/base/runner.coffee