diff --git a/Gemfile.lock b/Gemfile.lock index fafbc365..8c24520b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,7 +22,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-api.git - revision: 6606af4b43ef64d3ef97efeddda8524aff7c5281 + revision: 8a16b77281680ad637e998b5cf79b6cdff866502 branch: sf-use-services specs: travis-api (0.0.1) diff --git a/assets/javascripts/app/app.coffee b/assets/javascripts/app/app.coffee index beb3183a..d6643b2b 100644 --- a/assets/javascripts/app/app.coffee +++ b/assets/javascripts/app/app.coffee @@ -38,9 +38,9 @@ Travis.reopen @setCurrentUser(JSON.parse($.cookie('user'))) signIn: -> - # user = Travis.Auth.signIn() + user = Travis.Auth.signIn() # console.log(user) - @setCurrentUser(@USER_PAYLOAD) + #@setCurrentUser(@USER_PAYLOAD) @render.apply(this, @get('returnTo') || ['home', 'index']) signOut: -> diff --git a/assets/javascripts/lib/travis/auth.coffee b/assets/javascripts/lib/travis/auth.coffee index 0abcbc0c..2a2a37f8 100644 --- a/assets/javascripts/lib/travis/auth.coffee +++ b/assets/javascripts/lib/travis/auth.coffee @@ -1,5 +1,7 @@ @Travis.Auth = -> - $ => @iframe.appendTo('body') + $ => + @iframe.appendTo('body') + window.addEventListener("message", @receiveMessage) this $.extend Travis.Auth, @@ -11,7 +13,21 @@ $.extend Travis.Auth, $.extend Travis.Auth.prototype, iframe: $('