This commit starts refactoring of one of the remaining areas where we do weird
tricks to get the desired behaviour. Namely, we were treating "my_repositories"
and "recent" not as individual routes with separate URLs, but only different
states on the repos controller. Such approach leads to various problem with
connecting outlets on rerenders (ie. we don't explicitly connect outlets when
changing from one view to another programatically).
A new cleaner way is to change both tabs into routes.
This part needs further refactoring, but for now I just fixed log view to
teardown and setup things properly in all cases something changes (when element
is inserted or removed, but also when log object is changed).
After upgrading ember to 1.8.1 tests pass, but I found a few cases where
things break (for example when navigating between certain routes). I'm
reverting for now.
This reverts commit fa5e9179af, reversing
changes made to 978c887123.
It seems that directly setting location.hash directly doesn't play nice
with Ember.js URL handling - using it to handle line numbers results in
weird bugs (URL stops being updated after setting hash manually).
This commit gets back to using window.history.pushState() which was
changed to direct hash manipulation in ff1aad3
When the job is restart, we will not get any updates unless we're
subscribed to job updates - that's why we need to subscribe even if the
job is already finished.
The other option to fix this would be to subscribe and unsubscribe also
based on the status, but since subscribing to finished jobs does not
cost us anything, I prefer the simpler solution.
log property in Travis.Job does not change - we create Log instance
when it's accessed and don't refresh it on any occasion, that's why the
observer on log is not needed.
This was causing the log to not refresh sometimes when switching from
one repo to another, I'm reverting for now, we will have to have another
look.
This reverts commit 2e8b74160c.
Conflicts:
assets/scripts/app/controllers/build.coffee
assets/scripts/app/models/build.coffee
assets/scripts/app/templates/builds/show.hbs
assets/scripts/app/views/log.coffee
assets/scripts/vendor/log.js