fetch method returns a promise instead of an actual object. We used find
before, because this was the way we did things before upgrade to Ember
Model. Returning a promise from a model hook pauses router rendering for
the time a resource is loading, which makes it much easier to deal with
asynchronous requests. Thanks to that we can remove parts of the code,
which dealt with it manually.
After update specs fail when there is an unexpected ajax query, because
the response is not an ajax response.
A long term solution is to remove mockjax from specs, because it makes
them brittle and they usually fail after small changes. A better
approach would be to use fixtures, which are available for ember model
When a lot of pusher events come with build updates, lastBuildDidChange
can run quite frequently. We can avoid that by using scheduleOnce, which
will ensure that only the last invocation of lastBuildDidChange will be
run for a given runloop run.
Don't successfully `githubify` strings prepended with an `@` symbol if
what's matched actually resembles an email address. @mentions should
only be githubified if there is a word boundary before it.
This fixestravis-ci/travis-ci#1591
Signed-off-by: David Celis <me@davidcel.is>
lastBuildHash uses information for last build, which is available on the
repo object, so it will not trigger an ajax request if we haven't
fetched a build yet.
When first sync template is displayed, user usually doesn't have any
repos, which also triggers rendering of getting started template. The
fix for this is to handle the action to render getting started page on
first sync and do nothing in such case.
I also added a test to ensure that it works correctly.
When user activates a repository in the profile page, we now will
display this repository on the 'My Repositories' list. When user chooses
this repository, she will see an explenation why there is no builds and
what could be done to fix this.
Conflicts:
assets/scripts/app/controllers.coffee
assets/scripts/app/models/repo.coffee
assets/scripts/app/templates/repos/list.hbs