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
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-api.git
|
remote: git://github.com/travis-ci/travis-api.git
|
||||||
revision: 18bffa246014e0ae380734277eb180021f1eb2b4
|
revision: 3f5cf5f33a6b6ca0ff1562e18c0cd24d3cc010fa
|
||||||
specs:
|
specs:
|
||||||
travis-api (0.0.1)
|
travis-api (0.0.1)
|
||||||
backports (~> 2.5)
|
backports (~> 2.5)
|
||||||
|
@ -61,7 +61,7 @@ GIT
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-core.git
|
remote: git://github.com/travis-ci/travis-core.git
|
||||||
revision: 45cb3ef8222af247c862e4b8a31c7033927d7048
|
revision: 46fcb22ff1517d73e7a6425a7fc1f876ef771281
|
||||||
branch: sf-travis-api
|
branch: sf-travis-api
|
||||||
specs:
|
specs:
|
||||||
travis-core (0.0.1)
|
travis-core (0.0.1)
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
user = @storeUser(data.user) if data?.user
|
user = @storeUser(data.user) if data?.user
|
||||||
@set('state', if user then 'signed-in' else 'signed-out')
|
@set('state', if user then 'signed-in' else 'signed-out')
|
||||||
@set('user', if user then user else undefined)
|
@set('user', if user then user else undefined)
|
||||||
@app.get('router').transitionTo('authenticated') if @app.get('router')
|
if Travis.app && (router = Travis.app.get('router'))
|
||||||
# Travis.app.get('router').route(@get('returnTo'))
|
router.send('authenticate')
|
||||||
|
|
||||||
storeToken: (token) ->
|
storeToken: (token) ->
|
||||||
sessionStorage.setItem('travis.token', token)
|
sessionStorage.setItem('travis.token', token)
|
||||||
|
|
|
@ -134,12 +134,14 @@ Travis.Router = Ember.Router.extend
|
||||||
needsAuth: (path) ->
|
needsAuth: (path) ->
|
||||||
path.indexOf('/profile') == 0 && !@signedIn()
|
path.indexOf('/profile') == 0 && !@signedIn()
|
||||||
|
|
||||||
|
authenticate: ->
|
||||||
|
@app.get('router').transitionTo('authenticated')
|
||||||
|
|
||||||
loading: Ember.Route.extend
|
loading: Ember.Route.extend
|
||||||
routePath: (router, path) ->
|
routePath: (router, path) ->
|
||||||
if match = path.match(/#.*$/)
|
if match = path.match(/#.*$/)
|
||||||
router.set 'lineNumberHash', match[0]
|
router.set 'lineNumberHash', match[0]
|
||||||
|
|
||||||
|
|
||||||
sessionStorage.setItem('travis.path', path)
|
sessionStorage.setItem('travis.path', path)
|
||||||
if router.needsAuth(path)
|
if router.needsAuth(path)
|
||||||
router.transitionTo('root.auth')
|
router.transitionTo('root.auth')
|
||||||
|
@ -148,16 +150,18 @@ Travis.Router = Ember.Router.extend
|
||||||
router.transitionTo('authenticated')
|
router.transitionTo('authenticated')
|
||||||
|
|
||||||
authenticated: Ember.Route.extend
|
authenticated: Ember.Route.extend
|
||||||
|
authenticate: (->)
|
||||||
connectOutlets: (router) ->
|
connectOutlets: (router) ->
|
||||||
path = sessionStorage.getItem('travis.path')
|
path = sessionStorage.getItem('travis.path')
|
||||||
sessionStorage.removeItem('travis.path')
|
sessionStorage.removeItem('travis.path')
|
||||||
router.transitionTo('root')
|
router.transitionTo('root')
|
||||||
if path
|
if path
|
||||||
router.route(path)
|
router.route(path)
|
||||||
else
|
else
|
||||||
router.route('/')
|
router.route('/')
|
||||||
|
|
||||||
root: Ember.Route.extend
|
root: Ember.Route.extend
|
||||||
|
authenticate: (->)
|
||||||
loading: Ember.State.extend()
|
loading: Ember.State.extend()
|
||||||
|
|
||||||
auth: Ember.Route.extend
|
auth: Ember.Route.extend
|
||||||
|
|
|
@ -10,7 +10,9 @@ class Travis::Web::App
|
||||||
|
|
||||||
def index
|
def index
|
||||||
proc do |env|
|
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
|
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