
We no longer need this check, because it was only relevant with Ember Data. Additionally it was a cause of a travis-ci/travis-ci#1992, because of wrong syntax: unless someFunction false or true will only check for a result of someFunction with an argument being the result of `or` expression.
13 lines
382 B
CoffeeScript
13 lines
382 B
CoffeeScript
Travis.DurationCalculations = Ember.Mixin.create
|
|
duration: (->
|
|
if duration = @get('_duration')
|
|
duration
|
|
else
|
|
Travis.Helpers.durationFrom(@get('startedAt'), @get('finishedAt'))
|
|
).property('_duration', 'finishedAt', 'startedAt')
|
|
|
|
updateTimes: ->
|
|
unless @get('isFinished')
|
|
@notifyPropertyChange '_duration'
|
|
@notifyPropertyChange 'finished_at'
|