Merge branch 'master' of github.com:travis-ci/travis-web
Conflicts: Gemfile.lock public/scripts/app.js public/scripts/min/app.js public/styles/app.css public/version
This commit is contained in:
commit
6e7382ed05
|
@ -43,7 +43,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: git://github.com/travis-ci/travis-api.git
|
||||
revision: 18bffa246014e0ae380734277eb180021f1eb2b4
|
||||
revision: 3f5cf5f33a6b6ca0ff1562e18c0cd24d3cc010fa
|
||||
specs:
|
||||
travis-api (0.0.1)
|
||||
backports (~> 2.5)
|
||||
|
@ -61,7 +61,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: git://github.com/travis-ci/travis-core.git
|
||||
revision: 45cb3ef8222af247c862e4b8a31c7033927d7048
|
||||
revision: 46fcb22ff1517d73e7a6425a7fc1f876ef771281
|
||||
branch: sf-travis-api
|
||||
specs:
|
||||
travis-core (0.0.1)
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
user = @storeUser(data.user) if data?.user
|
||||
@set('state', if user then 'signed-in' else 'signed-out')
|
||||
@set('user', if user then user else undefined)
|
||||
@app.get('router').transitionTo('authenticated') if @app.get('router')
|
||||
# Travis.app.get('router').route(@get('returnTo'))
|
||||
if Travis.app && (router = Travis.app.get('router'))
|
||||
router.send('authenticate')
|
||||
|
||||
storeToken: (token) ->
|
||||
sessionStorage.setItem('travis.token', token)
|
||||
|
|
|
@ -134,12 +134,14 @@ Travis.Router = Ember.Router.extend
|
|||
needsAuth: (path) ->
|
||||
path.indexOf('/profile') == 0 && !@signedIn()
|
||||
|
||||
authenticate: ->
|
||||
@app.get('router').transitionTo('authenticated')
|
||||
|
||||
loading: Ember.Route.extend
|
||||
routePath: (router, path) ->
|
||||
if match = path.match(/#.*$/)
|
||||
router.set 'lineNumberHash', match[0]
|
||||
|
||||
|
||||
sessionStorage.setItem('travis.path', path)
|
||||
if router.needsAuth(path)
|
||||
router.transitionTo('root.auth')
|
||||
|
@ -148,16 +150,18 @@ Travis.Router = Ember.Router.extend
|
|||
router.transitionTo('authenticated')
|
||||
|
||||
authenticated: Ember.Route.extend
|
||||
authenticate: (->)
|
||||
connectOutlets: (router) ->
|
||||
path = sessionStorage.getItem('travis.path')
|
||||
sessionStorage.removeItem('travis.path')
|
||||
router.transitionTo('root')
|
||||
if path
|
||||
router.route(path)
|
||||
else
|
||||
else
|
||||
router.route('/')
|
||||
|
||||
root: Ember.Route.extend
|
||||
authenticate: (->)
|
||||
loading: Ember.State.extend()
|
||||
|
||||
auth: Ember.Route.extend
|
||||
|
|
|
@ -10,7 +10,9 @@ class Travis::Web::App
|
|||
|
||||
def index
|
||||
proc do |env|
|
||||
Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env)
|
||||
status, headers, body = Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env)
|
||||
headers.delete 'Last-Modified'
|
||||
[status, headers, body]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
5643087a
|
||||
f7cd2bee
|
Loading…
Reference in New Issue
Block a user