diff --git a/Gemfile.lock b/Gemfile.lock index 86e0f18a..41c883d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,6 +18,7 @@ GIT GEM remote: http://rubygems.org/ specs: + backports (2.6.4) chunky_png (1.2.6) coffee-script (2.2.0) coffee-script-source @@ -35,6 +36,8 @@ GEM debugger-linecache (1.1.2) debugger-ruby_core_source (>= 1.1.1) debugger-ruby_core_source (1.1.4) + diff-lcs (1.1.3) + eventmachine (1.0.0) execjs (1.4.0) multi_json (~> 1.0) foreman (0.60.2) @@ -54,15 +57,32 @@ GEM rack rack-ssl (1.3.2) rack + rack-test (0.6.2) + rack (>= 1.0) rake (0.9.2.2) rb-fsevent (0.9.2) rerun (0.7.1) listen + rspec (2.11.0) + rspec-core (~> 2.11.0) + rspec-expectations (~> 2.11.0) + rspec-mocks (~> 2.11.0) + rspec-core (2.11.1) + rspec-expectations (2.11.3) + diff-lcs (~> 1.1.3) + rspec-mocks (2.11.3) sass (3.2.1) sinatra (1.3.3) rack (~> 1.3, >= 1.3.6) rack-protection (~> 1.2) tilt (~> 1.3, >= 1.3.3) + sinatra-contrib (1.3.1) + backports (>= 2.0) + eventmachine + rack-protection + rack-test + sinatra (~> 1.3.0) + tilt (~> 1.3) thor (0.16.0) tilt (1.3.3) uglifier (1.3.0) @@ -86,6 +106,8 @@ DEPENDENCIES rake-pipeline-web-filters! rb-fsevent (~> 0.9.1) rerun + rspec (~> 2.11) sinatra + sinatra-contrib tilt uglifier diff --git a/assets/scripts/app/routes.coffee b/assets/scripts/app/routes.coffee index 7db7b2c8..114858cd 100644 --- a/assets/scripts/app/routes.coffee +++ b/assets/scripts/app/routes.coffee @@ -41,7 +41,10 @@ Travis.Router = Ember.Router.extend reload: -> url = @get('location').getURL() @transitionTo('loading') - @route(url) + # Without ember next @route sometimes hit the place where HistoryLocation + # does not have any state set up yet, so it's best to defer it a little bit. + Ember.run.next this, -> + @route(url) signedIn: -> !!Travis.app.get('auth.user') diff --git a/public/scripts/app.js b/public/scripts/app.js index f861c3b1..a08cef15 100644 --- a/public/scripts/app.js +++ b/public/scripts/app.js @@ -30501,4 +30501,4 @@ var _require=function(){function c(a,c){document.addEventListener?a.addEventList ++g&&setTimeout(c,0)})}}(); (function(){!window.WebSocket&&window.MozWebSocket&&(window.WebSocket=window.MozWebSocket);if(window.WebSocket)Pusher.Transport=window.WebSocket,Pusher.TransportType="native";var c=(document.location.protocol=="http:"?Pusher.cdn_http:Pusher.cdn_https)+Pusher.VERSION,a=[];window.JSON||a.push(c+"/json2"+Pusher.dependency_suffix+".js");if(!window.WebSocket)window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=!0,a.push(c+"/flashfallback"+Pusher.dependency_suffix+".js");var b=function(){return window.WebSocket?function(){Pusher.ready()}: function(){window.WebSocket?(Pusher.Transport=window.WebSocket,Pusher.TransportType="flash",window.WEB_SOCKET_SWF_LOCATION=c+"/WebSocketMain.swf",WebSocket.__addTask(function(){Pusher.ready()}),WebSocket.__initialize()):(Pusher.Transport=null,Pusher.TransportType="none",Pusher.ready())}}(),e=function(a){var b=function(){document.body?a():setTimeout(b,0)};b()},g=function(){e(b)};a.length>0?_require(a,g):g()})(); -;minispade.register('app', "(function() {(function() {\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.slider = new Travis.Slider();\n this.pusher = new Travis.Pusher(Travis.config.pusher_key);\n this.tailing = new Travis.Tailing();\n return this.set('auth', Travis.Auth.create({\n app: this,\n endpoint: Travis.config.api_endpoint\n }));\n },\n storeAfterSignInPath: function(path) {\n return this.get('auth').storeAfterSignInPath(path);\n },\n autoSignIn: function(path) {\n return this.get('auth').autoSignIn(path);\n },\n signIn: function() {\n return this.get('auth').signIn();\n },\n signOut: function() {\n this.get('auth').signOut();\n return this.get('router').send('afterSignOut');\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 $('#repo').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: $('