diff --git a/README.md b/README.md index 72e477a0..9da26c89 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/travis-ci/travis-web.png?branch=master)](https://travis-ci.org/travis-ci/travis-web) ### Running the app -The app is developed using [http://ember-cli.com](Ember CLI). It requires nodejs +The app is developed using [Ember CLI](http://ember-cli.com). It requires nodejs with npm installed. In order to run the app you need to install dependencies with: diff --git a/app/routes/dashboard/repositories.coffee b/app/routes/dashboard/repositories.coffee index e679cf18..762b7c8a 100644 --- a/app/routes/dashboard/repositories.coffee +++ b/app/routes/dashboard/repositories.coffee @@ -14,6 +14,13 @@ Route = TravisRoute.extend }).then (response) -> response.repositories.sortBy('last_build.finished_at').filter( (repo) -> repo.last_build + ).sort( (a, b) -> + if !a.last_build.finished_at || a.last_build.finished_at > b.last_build.finished_at + return -1 + else if !b.last_build.finished_at || b.last_build.finished_at > a.last_build.finished_at + return 1 + else + return 0 ).map( (repo) -> Ember.Object.create(repo) ) diff --git a/app/routes/main.coffee b/app/routes/main.coffee index 3b9c8e60..44376f91 100644 --- a/app/routes/main.coffee +++ b/app/routes/main.coffee @@ -19,7 +19,7 @@ Route = TravisRoute.extend activate: -> # subscribe to pusher only if we're at a main route - unless config.pro - @get('pusher').subscribeAll(['common']) + if !config.pro && @pusher + @pusher.subscribeAll(['common']) `export default Route` diff --git a/app/utils/urls.coffee b/app/utils/urls.coffee index a6088527..6f91752e 100644 --- a/app/utils/urls.coffee +++ b/app/utils/urls.coffee @@ -39,6 +39,7 @@ email = (email) -> "mailto:#{email}" gravatarImage = (email, size) -> - "https://www.gravatar.com/avatar/#{md5(email)}?s=#{size}&d=#{encodeURIComponent(config.avatar_default_url)}" + avatarDefaultUrl = 'https://travis-ci.org/images/ui/default-avatar.png' + "https://www.gravatar.com/avatar/#{md5(email)}?s=#{size}&d=#{encodeURIComponent(avatarDefaultUrl)}" `export { plainTextLog, githubPullRequest, githubCommit, githubRepo, githubWatchers, githubNetwork, githubAdmin, statusImage, ccXml, email, gravatarImage }`