Ember CLI compat - don't use Travis.*

This commit is contained in:
Piotr Sarnacki 2015-02-02 18:00:57 +01:00
parent 56f4be5bb1
commit 1be07ae5f7
3 changed files with 5 additions and 4 deletions

View File

@ -60,14 +60,14 @@ Controller = Ember.ArrayController.extend
userRepos: (->
if login = @get('currentUser.login')
Travis.Repo.accessibleBy(@store, login)
Repo.accessibleBy(@store, login)
else
[]
).property('currentUser.login')
viewSearch: (phrase) ->
@set('search', phrase)
@set('content', Travis.Repo.search(@store, phrase))
@set('content', Repo.search(@store, phrase))
searchObserver: (->
search = @get('search')

View File

@ -42,7 +42,7 @@ ajax = Em.Object.create
options = options || {}
token = Travis.sessionStorage.getItem('travis.token')
if token && (Travis.ajax.needsAuth(method, url) || options.forceAuth)
if token && (ajax.needsAuth(method, url) || options.forceAuth)
options.headers ||= {}
options.headers['Authorization'] ||= "token #{token}"

View File

@ -1,4 +1,5 @@
config = ENV.config
Ajax = Travis.ajax
Auth = Ember.Object.extend
state: "signed-out"
@ -76,7 +77,7 @@ Auth = Ember.Object.extend
@refreshUserData(data.user)
refreshUserData: (user) ->
Travis.ajax.get "/users/#{user.id}", (data) =>
Ajax.get "/users/#{user.id}", (data) =>
@store.pushPayload(users: [data.user])
# if user is still signed in, update saved data
if @get('signedIn')