From 5eb5bc1373968e7270aa94897f3d7ccc71edcc67 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Fri, 28 Sep 2012 11:28:00 +0200 Subject: [PATCH] no need to defer loading the user any more --- Gemfile.lock | 4 ++-- assets/javascripts/app/auth.coffee | 2 +- public/javascripts/application.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0b57c4c7..f9fc168e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-api.git - revision: 5271f21d3cf2c393377308a2717ecf83fa7c7580 + revision: 3e371251f7ae5c3ebf4ce0186783183afaabd599 specs: travis-api (0.0.1) backports (~> 2.5) @@ -60,7 +60,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-core.git - revision: 6d8de39fa098965aad52b51f8f9a3f5490e7def5 + revision: 6c974f0c0ad529748e95222c3145a0f085311ad1 branch: sf-more-services specs: travis-core (0.0.1) diff --git a/assets/javascripts/app/auth.coffee b/assets/javascripts/app/auth.coffee index f88ccbe8..e2a8b46e 100644 --- a/assets/javascripts/app/auth.coffee +++ b/assets/javascripts/app/auth.coffee @@ -7,7 +7,7 @@ init: -> @iframe.appendTo('body') window.addEventListener('message', (e) => @receiveMessage(e)) - Ember.run.next(this, @loadUser) + @loadUser() accessToken: (-> sessionStorage.getItem('travis.token') diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 3c03774a..fbd3ddb3 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1 +1 @@ -minispade.register('templates', "(function() {Ember.TEMPLATES['application']=Ember.Handlebars.compile(\"{{outlet}}\\n\");Ember.TEMPLATES['builds/list']=Ember.Handlebars.compile(\"{{#if builds.isLoaded}}\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n {{#each build in builds}}\\n {{#view Travis.BuildsItemView contextBinding=\\\"build\\\"}}\\n \\n \\n \\n \\n \\n {{/view}}\\n {{/each}}\\n \\n
{{t builds.name}}{{t builds.commit}}{{t builds.message}}{{t builds.duration}}{{t builds.finished_at}}
\\n \\n {{#if id}}\\n \\n {{number}}\\n \\n {{/if}}\\n \\n \\n {{formatCommit commit}}\\n \\n \\n {{{formatMessage commit.message short=\\\"true\\\"}}}\\n \\n {{formatDuration duration}}\\n \\n {{formatTime finishedAt}}\\n
\\n

\\n \\n

\\n{{else}}\\n
Loading
\\n{{/if}}\\n\");Ember.TEMPLATES['builds/show']=Ember.Handlebars.compile(\"{{#with view}}\\n {{#if loading}}\\n Loading\\n {{else}}\\n
\\n
\\n
{{t builds.name}}
\\n
\\n \\n {{#if build.id}}\\n {{build.number}}\\n {{/if}}\\n
\\n
{{t builds.finished_at}}
\\n
{{formatTime build.finishedAt}}
\\n
{{t builds.duration}}
\\n
{{formatDuration build.duration}}
\\n
\\n\\n
\\n
{{t builds.commit}}
\\n
{{formatCommit build.commit}}
\\n {{#if commit.compareUrl}}\\n
{{t builds.compare}}
\\n
{{pathFrom build.commit.compareUrl}}
\\n {{/if}}\\n {{#if commit.authorName}}\\n
{{t builds.author}}
\\n
{{build.commit.authorName}}
\\n {{/if}}\\n {{#if commit.committerName}}\\n
{{t builds.committer}}
\\n
{{build.commit.committerName}}
\\n {{/if}}\\n
\\n\\n
{{t builds.message}}
\\n
{{{formatMessage build.commit.message}}}
\\n\\n {{#unless isMatrix}}\\n
{{t builds.config}}
\\n
{{formatConfig build.config}}
\\n {{/unless}}\\n
\\n\\n {{#if build.isMatrix}}\\n {{view Travis.JobsView jobsBinding=\\\"build.requiredJobs\\\" required=\\\"true\\\"}}\\n {{view Travis.JobsView jobsBinding=\\\"build.allowedFailureJobs\\\"}}\\n {{else}}\\n {{view Travis.LogView contextBinding=\\\"build.jobs.firstObject\\\"}}\\n {{/if}}\\n {{/if}}\\n{{/with}}\\n\");Ember.TEMPLATES['jobs/list']=Ember.Handlebars.compile(\"{{#if view.jobs.length}}\\n {{#if view.required}}\\n \\n \\n {{else}}\\n
\\n {{t jobs.build_matrix}}\\n
\\n \\n {{/if}}\\n \\n \\n {{#each key in view.build.configKeys}}\\n \\n {{/each}}\\n \\n \\n \\n {{#each job in view.jobs}}\\n {{#view Travis.JobsItemView contextBinding=\\\"job\\\"}}\\n \\n \\n \\n {{#each value in configValues}}\\n \\n {{/each}}\\n {{/view}}\\n {{/each}}\\n \\n
\\n {{t jobs.allowed_failures}}\\n \\n
{{key}}
\\n \\n {{#if job.id}}\\n {{number}}\\n {{/if}}\\n \\n {{formatDuration duration}}\\n \\n {{formatTime finishedAt}}\\n {{value}}
\\n\\n {{#unless view.required}}\\n
\\n

{{t \\\"jobs.allowed_failures\\\"}}

\\n

\\n Allowed Failures are items in your build matrix that are allowed to\\n fail without causing the entire build to be shown as failed.\\n

\\n

\\n You can define allowed failures in the build matrix as follows:\\n

\\n
matrix:\\n  allow_failures:\\n    - rvm: ruby-head
\\n

\\n This lets you add in experimental and preparatory builds to test against versions or\\n configurations that you are not ready to officially support.\\n

\\n
\\n {{/unless}}\\n{{/if}}\\n\");Ember.TEMPLATES['jobs/log']=Ember.Handlebars.compile(\"{{view.logSubscriber}}\\n\\n{{#if log.isLoaded}}\\n
\\n    \\n    \\n  {{{formatLog log.body}}}
\\n\\n {{#if sponsor.name}}\\n

\\n {{t builds.messages.sponsored_by}}\\n {{sponsor.name}}\\n

\\n {{/if}}\\n\\n To top\\n{{else}}\\n
\\n Loading\\n
\\n{{/if}}\\n\");Ember.TEMPLATES['jobs/show']=Ember.Handlebars.compile(\"{{#with view}}\\n {{#if job.isLoaded}}\\n
\\n
\\n
\\n
Job
\\n
\\n \\n {{#if job.id}}\\n {{job.number}}\\n {{/if}}\\n
\\n
{{t jobs.finished_at}}
\\n
{{formatTime job.finishedAt}}
\\n
{{t jobs.duration}}
\\n
{{formatDuration job.duration}}
\\n
\\n\\n
\\n
{{t jobs.commit}}
\\n
{{formatCommit commit}}
\\n {{#if commit.compareUrl}}\\n
{{t jobs.compare}}
\\n
{{pathFrom commit.compareUrl}}
\\n {{/if}}\\n {{#if commit.authorName}}\\n
{{t jobs.author}}
\\n
{{commit.authorName}}
\\n {{/if}}\\n {{#if commit.committerName}}\\n
{{t jobs.committer}}
\\n
{{commit.committerName}}
\\n {{/if}}\\n
\\n\\n
{{t jobs.message}}
\\n
{{formatMessage commit.message}}
\\n
{{t jobs.config}}
\\n
{{formatConfig job.config}}
\\n
\\n\\n {{view Travis.LogView contextBinding=\\\"job\\\"}}}\\n
\\n {{else}}\\n
\\n Loading\\n
\\n {{/if}}\\n{{/with}}\\n\");Ember.TEMPLATES['layouts/home']=Ember.Handlebars.compile(\"
\\n {{outlet top}}\\n
\\n\\n
\\n
\\n {{outlet left}}\\n
\\n\\n
\\n {{outlet main}}\\n
\\n\\n
\\n {{outlet right}}\\n
\\n
\\n\");Ember.TEMPLATES['layouts/profile']=Ember.Handlebars.compile(\"
\\n {{outlet top}}\\n
\\n\\n
\\n
\\n {{outlet left}}\\n
\\n\\n
\\n {{outlet main}}\\n
\\n\\n
\\n
\\n
 \\n
\\n\\n
\\n

Getting started?

\\n

\\n Please read our guide.\\n It will only take a few minutes :)\\n

\\n

\\n You can find detailled docs on our about site.\\n

\\n

\\n If you need help please don't hesitate to join\\n #travis on irc.freenode.net\\n or our mailinglist.\\n

\\n
\\n
\\n
\\n\");Ember.TEMPLATES['layouts/sidebar']=Ember.Handlebars.compile(\"\\n {{t layouts.application.fork_me}}\\n\\n\\n
\\n
 \\n
\\n\\n{{view view.DecksView}}\\n{{view view.WorkersView}}\\n{{view view.QueuesView}}\\n{{view view.LinksView}}\\n\\n
\\n

{{t layouts.about.join}}

\\n \\n
\\n\");Ember.TEMPLATES['layouts/simple']=Ember.Handlebars.compile(\"
\\n {{outlet top}}\\n
\\n\\n
\\n
\\n {{outlet main}}\\n
\\n
\\n\\n\");Ember.TEMPLATES['layouts/top']=Ember.Handlebars.compile(\"\\n

Travis

\\n
\\n\\n\\n\");Ember.TEMPLATES['profile/accounts']=Ember.Handlebars.compile(\"
\\n
\\n\\n\\n\\n
\\n {{#collection Travis.AccountsListView contentBinding=\\\"controller\\\"}}\\n {{view.name}}\\n

\\n Repositories:\\n {{view.content.reposCount}}\\n

\\n {{/collection}}\\n
\\n\");Ember.TEMPLATES['profile/show']=Ember.Handlebars.compile(\"

{{view.name}}

\\n\\n{{view Travis.ProfileTabsView}}\\n\\n
\\n {{outlet pane}}\\n
\\n\\n\");Ember.TEMPLATES['profile/tabs']=Ember.Handlebars.compile(\"\\n\");Ember.TEMPLATES['profile/tabs/hooks']=Ember.Handlebars.compile(\"

\\n {{{t profiles.show.message.your_repos}}}\\n

\\n\\n{{#if hooks.isLoaded}}\\n {{#if user.isSyncing}}\\n

\\n Please wait while we sync from GitHub\\n

\\n {{else}}\\n

\\n Last synchronized from GitHub: {{formatTime user.syncedAt}}\\n \\n

\\n\\n \\n {{/if}}\\n{{else}}\\n

\\n Loading\\n

\\n{{/if}}\\n\\n\\n\");Ember.TEMPLATES['profile/tabs/user']=Ember.Handlebars.compile(\"\\n\\n
\\n
\\n {{t profiles.show.github}}:\\n
\\n
\\n {{user.login}}\\n
\\n
\\n {{t profiles.show.email}}:\\n
\\n
\\n {{user.email}}\\n
\\n
\\n {{t profiles.show.token}}:\\n
\\n
\\n {{user.token}}\\n
\\n
\\n\\n
\\n {{view Ember.Select id=\\\"locale\\\"\\n contentBinding=\\\"view.locales\\\"\\n valueBinding=\\\"Travis.app.currentUser.locale\\\"\\n optionLabelPath=\\\"content.name\\\"\\n optionValuePath=\\\"content.key\\\"}}\\n\\n \\n
\\n\\n\\n\");Ember.TEMPLATES['queues/list']=Ember.Handlebars.compile(\"\\n\");Ember.TEMPLATES['repos/list']=Ember.Handlebars.compile(\"
\\n {{view Ember.TextField valueBinding=\\\"controller.search\\\"}}\\n
\\n\\n{{view Travis.ReposListTabsView}}\\n\\n\\n\\n
\\n {{#collection Travis.RepositoriesListView contentBinding=\\\"controller\\\"}}\\n {{#with view.repository}}\\n
\\n \\n {{#if slug}}\\n {{slug}}\\n {{/if}}\\n
\\n {{#if lastBuildId}}\\n {{lastBuildNumber}}\\n {{/if}}\\n\\n

\\n {{t repositories.duration}}:\\n {{formatDuration lastBuildDuration}},\\n {{t repositories.finished_at}}:\\n {{formatTime lastBuildFinishedAt}}\\n

\\n\\n
\\n\\n {{#if description}}\\n
\\n

{{description}}

\\n
\\n {{/if}}\\n {{/with}}\\n {{/collection}}\\n
\\n\");Ember.TEMPLATES['repos/list/tabs']=Ember.Handlebars.compile(\"\\n\\n\");Ember.TEMPLATES['repos/show']=Ember.Handlebars.compile(\"
\\n {{#if view.repository.isLoaded}}\\n {{#with view.repository}}\\n

\\n {{slug}}\\n

\\n\\n

{{description}}

\\n\\n \\n\\n {{view Travis.RepoShowTabsView}}\\n {{view Travis.RepoShowToolsView}}\\n {{/with}}\\n\\n {{else}}\\n Loading\\n {{/if}}\\n\\n
\\n {{outlet pane}}\\n
\\n
\\n\\n\");Ember.TEMPLATES['repos/show/tabs']=Ember.Handlebars.compile(\"\\n\");Ember.TEMPLATES['repos/show/tools']=Ember.Handlebars.compile(\"
\\n \\n
\\n

\\n \\n {{#if view.branches.isLoaded}}\\n {{view Ember.Select contentBinding=\\\"view.branches\\\" selectionBinding=\\\"view.branch\\\" optionLabelPath=\\\"content.commit.branch\\\" optionValuePath=\\\"content.commit.branch\\\"}}\\n {{else}}\\n \\n {{/if}}\\n

\\n

\\n \\n \\n

\\n

\\n \\n \\n

\\n

\\n \\n \\n

\\n

\\n \\n \\n

\\n
\\n
\\n\");Ember.TEMPLATES['sponsors/decks']=Ember.Handlebars.compile(\"

{{t layouts.application.sponsers}}

\\n\\n\\n\\n

\\n \\n {{{t layouts.application.sponsors_link}}}\\n \\n

\\n\");Ember.TEMPLATES['sponsors/links']=Ember.Handlebars.compile(\"
\\n

{{t layouts.application.sponsers}}

\\n\\n \\n\\n

\\n \\n {{{t layouts.application.sponsors_link}}}\\n \\n

\\n
\\n\\n\");Ember.TEMPLATES['stats/show']=Ember.Handlebars.compile(\"
\\n
\\n\");Ember.TEMPLATES['workers/list']=Ember.Handlebars.compile(\"{{#view Travis.WorkersView}}\\n

\\n {{t workers}}\\n \\n

\\n \\n{{/view}}\\n\");\n})();\n//@ sourceURL=templates");minispade.register('app', "(function() {(function() {\nminispade.require('travis');\nminispade.require('auth');\nminispade.require('controllers');\nminispade.require('helpers');\nminispade.require('models');\nminispade.require('pusher');\nminispade.require('routes');\nminispade.require('slider');\nminispade.require('store');\nminispade.require('tailing');\nminispade.require('templates');\nminispade.require('views');\nminispade.require('config/locales');\nminispade.require('data/sponsors');\n\n Travis.reopen({\n App: Em.Application.extend({\n autoinit: false,\n currentUserBinding: 'auth.user',\n authStateBinding: 'auth.state',\n init: function() {\n this._super.apply(this, arguments);\n this.store = Travis.Store.create();\n this.store.loadMany(Travis.Sponsor, Travis.SPONSORS);\n this.set('auth', Travis.Auth.create({\n store: this.store,\n endpoint: Travis.config.api_endpoint\n }));\n this.slider = new Travis.Slider();\n this.pusher = new Travis.Pusher();\n return this.tailing = new Travis.Tailing();\n },\n signIn: function() {\n return this.get('auth').signIn();\n },\n signOut: function() {\n return this.get('auth').signOut();\n },\n receive: function() {\n return this.store.receive.apply(this.store, arguments);\n },\n toggleSidebar: function() {\n var element;\n $('body').toggleClass('maximized');\n element = $('');\n $('#top .profile').append(element);\n Em.run.later((function() {\n return element.remove();\n }), 10);\n element = $('');\n $('#repository').append(element);\n return Em.run.later((function() {\n return element.remove();\n }), 10);\n }\n })\n });\n\n}).call(this);\n\n})();\n//@ sourceURL=app");minispade.register('auth', "(function() {(function() {\n\n this.Travis.Auth = Ember.Object.extend({\n iframe: $('