finally rename repository to repo

This commit is contained in:
Sven Fuchs 2012-10-06 20:08:31 +02:00
parent 41ff493131
commit 6e4413d5a2
37 changed files with 210 additions and 10693 deletions

View File

@ -53,5 +53,5 @@ Travis.reopen
$('#top .profile').append(element) $('#top .profile').append(element)
Em.run.later (-> element.remove()), 10 Em.run.later (-> element.remove()), 10
element = $('<span></span>') element = $('<span></span>')
$('#repository').append(element) $('#repo').append(element)
Em.run.later (-> element.remove()), 10 Em.run.later (-> element.remove()), 10

View File

@ -29,7 +29,7 @@ require 'controllers/accounts'
require 'controllers/builds' require 'controllers/builds'
require 'controllers/home' require 'controllers/home'
require 'controllers/profile' require 'controllers/profile'
require 'controllers/repositories' require 'controllers/repos'
require 'controllers/repository' require 'controllers/repo'
require 'controllers/sidebar' require 'controllers/sidebar'
require 'controllers/stats' require 'controllers/stats'

View File

@ -1,5 +1,5 @@
Travis.BuildsController = Em.ArrayController.extend Travis.BuildsController = Em.ArrayController.extend
# sortAscending: false # sortAscending: false
repositoryBinding: 'parent.repository' repo: 'parent.repo'
contentBinding: 'parent.builds' contentBinding: 'parent.builds'

View File

@ -1,4 +1,4 @@
Travis.RepositoryController = Travis.Controller.extend Travis.RepoController = Travis.Controller.extend
bindings: [] bindings: []
init: -> init: ->
@ -20,25 +20,25 @@ Travis.RepositoryController = Travis.Controller.extend
this["view#{$.camelize(action)}"]() this["view#{$.camelize(action)}"]()
viewIndex: -> viewIndex: ->
@_bind('repository', 'controllers.repositoriesController.firstObject') @_bind('repo', 'controllers.reposController.firstObject')
@_bind('build', 'repository.lastBuild') @_bind('build', 'repo.lastBuild')
@connectTab('current') @connectTab('current')
viewCurrent: -> viewCurrent: ->
@connectTab('current') @connectTab('current')
@_bind('build', 'repository.lastBuild') @_bind('build', 'repo.lastBuild')
viewBuilds: -> viewBuilds: ->
@connectTab('builds') @connectTab('builds')
@_bind('builds', 'repository.builds') @_bind('builds', 'repo.builds')
viewPullRequests: -> viewPullRequests: ->
@connectTab('pull_requests') @connectTab('pull_requests')
@_bind('builds', 'repository.pullRequests') @_bind('builds', 'repo.pullRequests')
viewBranches: -> viewBranches: ->
@connectTab('branches') @connectTab('branches')
@_bind('builds', 'repository.branches') @_bind('builds', 'repo.branches')
viewBuild: -> viewBuild: ->
@connectTab('build') @connectTab('build')
@ -47,10 +47,10 @@ Travis.RepositoryController = Travis.Controller.extend
@_bind('build', 'job.build') @_bind('build', 'job.build')
@connectTab('job') @connectTab('job')
repositoryObserver: (-> repoObserver: (->
repository = @get('repository') repo = @get('repo')
repository.select() if repository repo.select() if repo
).observes('repository.id') ).observes('repo.id')
connectTab: (tab) -> connectTab: (tab) ->
name = if tab == 'current' then 'build' else tab name = if tab == 'current' then 'build' else tab
@ -68,4 +68,3 @@ Travis.RepositoryController = Travis.Controller.extend
_unbind: -> _unbind: ->
binding.disconnect(this) for binding in @bindings binding.disconnect(this) for binding in @bindings
@bindings.length = 0 @bindings.length = 0

View File

@ -1,4 +1,4 @@
Travis.RepositoriesController = Ember.ArrayController.extend Travis.ReposController = Ember.ArrayController.extend
defaultTab: 'recent' defaultTab: 'recent'
sortProperties: ['sortOrder'] sortProperties: ['sortOrder']
@ -17,13 +17,13 @@ Travis.RepositoriesController = Ember.ArrayController.extend
this["view#{$.camelize(tab)}"](params) this["view#{$.camelize(tab)}"](params)
viewRecent: -> viewRecent: ->
@set('content', Travis.Repository.find()) @set('content', Travis.Repo.find())
viewOwned: -> viewOwned: ->
@set('content', Travis.Repository.ownedBy(Travis.app.get('currentUser.login'))) @set('content', Travis.Repo.ownedBy(Travis.app.get('currentUser.login')))
viewSearch: (params) -> viewSearch: (params) ->
@set('content', Travis.Repository.search(params.search)) @set('content', Travis.Repo.search(params.search))
searchObserver: (-> searchObserver: (->
search = @get('search') search = @get('search')

View File

@ -1,5 +1,5 @@
@Travis.Urls = @Travis.Urls =
repository: (slug) -> repo: (slug) ->
"/#{slug}" "/#{slug}"
builds: (slug) -> builds: (slug) ->
@ -20,7 +20,7 @@
githubCommit: (slug, sha) -> githubCommit: (slug, sha) ->
"http://github.com/#{slug}/commit/#{sha}" "http://github.com/#{slug}/commit/#{sha}"
githubRepository: (slug) -> githubRepo: (slug) ->
"http://github.com/#{slug}" "http://github.com/#{slug}"
githubWatchers: (slug) -> githubWatchers: (slug) ->

View File

@ -6,7 +6,7 @@ require 'models/build'
require 'models/commit' require 'models/commit'
require 'models/hook' require 'models/hook'
require 'models/job' require 'models/job'
require 'models/repository' require 'models/repo'
require 'models/sponsor' require 'models/sponsor'
require 'models/user' require 'models/user'
require 'models/worker' require 'models/worker'

View File

@ -1,7 +1,7 @@
require 'travis/model' require 'travis/model'
@Travis.Branch = Travis.Model.extend Travis.Helpers, @Travis.Branch = Travis.Model.extend Travis.Helpers,
repositoryId: DS.attr('number') repoId: DS.attr('number', key: 'repository_id')
commitId: DS.attr('number') commitId: DS.attr('number')
number: DS.attr('number') number: DS.attr('number')
branch: DS.attr('string') branch: DS.attr('string')
@ -13,9 +13,9 @@ require 'travis/model'
commit: DS.belongsTo('Travis.Commit') commit: DS.belongsTo('Travis.Commit')
repository: (-> repo: (->
Travis.Repository.find @get('repositoryId') if @get('repositoryId') Travis.Repo.find @get('repoId') if @get('repoId')
).property('repositoryId') ).property('repoId')
updateTimes: -> updateTimes: ->
@notifyPropertyChange 'started_at' @notifyPropertyChange 'started_at'
@ -23,6 +23,6 @@ require 'travis/model'
@Travis.Branch.reopenClass @Travis.Branch.reopenClass
byRepositoryId: (id) -> byRepoId: (id) ->
@find repository_id: id @find repository_id: id

View File

@ -2,7 +2,7 @@ require 'travis/model'
@Travis.Build = Travis.Model.extend Travis.DurationCalculations, @Travis.Build = Travis.Model.extend Travis.DurationCalculations,
eventType: DS.attr('string') eventType: DS.attr('string')
repositoryId: DS.attr('number') repoId: DS.attr('number')
commitId: DS.attr('number') commitId: DS.attr('number')
state: DS.attr('string') state: DS.attr('string')
@ -14,7 +14,7 @@ require 'travis/model'
startedAt: DS.attr('string', key: 'started_at') startedAt: DS.attr('string', key: 'started_at')
finishedAt: DS.attr('string', key: 'finished_at') finishedAt: DS.attr('string', key: 'finished_at')
repository: DS.belongsTo('Travis.Repository') repo: DS.belongsTo('Travis.Repo')
commit: DS.belongsTo('Travis.Commit') commit: DS.belongsTo('Travis.Commit')
jobs: DS.hasMany('Travis.Job', key: 'job_ids') jobs: DS.hasMany('Travis.Job', key: 'job_ids')
@ -42,7 +42,7 @@ require 'travis/model'
).property('config') ).property('config')
@Travis.Build.reopenClass @Travis.Build.reopenClass
byRepositoryId: (id, parameters) -> byRepoId: (id, parameters) ->
@find($.extend(parameters || {}, repository_id: id)) @find($.extend(parameters || {}, repository_id: id))
olderThanNumber: (id, build_number) -> olderThanNumber: (id, build_number) ->

View File

@ -1,7 +1,7 @@
require 'travis/model' require 'travis/model'
@Travis.Job = Travis.Model.extend Travis.DurationCalculations, @Travis.Job = Travis.Model.extend Travis.DurationCalculations,
repositoryId: DS.attr('number') repoId: DS.attr('number', key: 'repository_id')
buildId: DS.attr('number') buildId: DS.attr('number')
commitId: DS.attr('number') commitId: DS.attr('number')
logId: DS.attr('number') logId: DS.attr('number')
@ -15,7 +15,7 @@ require 'travis/model'
finishedAt: DS.attr('string') finishedAt: DS.attr('string')
allowFailure: DS.attr('boolean', key: 'allow_failure') allowFailure: DS.attr('boolean', key: 'allow_failure')
repository: DS.belongsTo('Travis.Repository', key: 'repository_id') repo: DS.belongsTo('Travis.Repo', key: 'repository_id')
build: DS.belongsTo('Travis.Build', key: 'build_id') build: DS.belongsTo('Travis.Build', key: 'build_id')
commit: DS.belongsTo('Travis.Commit', key: 'commit_id') commit: DS.belongsTo('Travis.Commit', key: 'commit_id')
log: DS.belongsTo('Travis.Artifact', key: 'log_id') log: DS.belongsTo('Travis.Artifact', key: 'log_id')

View File

@ -1,7 +1,7 @@
require 'travis/expandable_record_array' require 'travis/expandable_record_array'
require 'travis/model' require 'travis/model'
@Travis.Repository = Travis.Model.extend @Travis.Repo = Travis.Model.extend
slug: DS.attr('string') slug: DS.attr('string')
description: DS.attr('string') description: DS.attr('string')
lastBuildId: DS.attr('number') lastBuildId: DS.attr('number')
@ -14,7 +14,7 @@ require 'travis/model'
builds: (-> builds: (->
id = @get('id') id = @get('id')
builds = Travis.Build.byRepositoryId id, event_type: 'push' builds = Travis.Build.byRepoId id, event_type: 'push'
array = Travis.ExpandableRecordArray.create array = Travis.ExpandableRecordArray.create
type: Travis.Build type: Travis.Build
content: Ember.A([]) content: Ember.A([])
@ -27,7 +27,7 @@ require 'travis/model'
pullRequests: (-> pullRequests: (->
id = @get('id') id = @get('id')
builds = Travis.Build.byRepositoryId id, event_type: 'pull_request' builds = Travis.Build.byRepoId id, event_type: 'pull_request'
array = Travis.ExpandableRecordArray.create array = Travis.ExpandableRecordArray.create
type: Travis.Build type: Travis.Build
content: Ember.A([]) content: Ember.A([])
@ -39,7 +39,7 @@ require 'travis/model'
).property() ).property()
branches: (-> branches: (->
Travis.Branch.byRepositoryId @get('id') Travis.Branch.byRepoId @get('id')
).property() ).property()
owner: (-> owner: (->
@ -72,12 +72,14 @@ require 'travis/model'
).property() ).property()
select: -> select: ->
Travis.Repository.select(@get('id')) Travis.Repo.select(@get('id'))
updateTimes: -> updateTimes: ->
@notifyPropertyChange 'lastBuildDuration' @notifyPropertyChange 'lastBuildDuration'
@Travis.Repository.reopenClass @Travis.Repo.reopenClass
url: 'repositories'
recent: -> recent: ->
@find() @find()
@ -92,10 +94,10 @@ require 'travis/model'
if repo.length > 0 then repo else @find(slug: slug) if repo.length > 0 then repo else @find(slug: slug)
select: (id) -> select: (id) ->
@find().forEach (repository) -> @find().forEach (repo) ->
repository.set('selected', repository.get('id') == id) repo.set('selected', repo.get('id') == id)
# buildURL: (slug) -> # buildURL: (slug) ->
# if slug then slug else 'repositories' # if slug then slug else 'repos'

View File

@ -18,9 +18,9 @@ require 'travis/model'
@get('state') == 'working' @get('state') == 'working'
).property('state') ).property('state')
repository: (-> repo: (->
Travis.Repository.find(@get('payload.repository.id')) Travis.Repo.find(@get('payload.repo.id'))
).property('payload.repository.id') ).property('payload.repo.id')
job_id: (-> job_id: (->
@get('payload.job.id') @get('payload.job.id')

View File

@ -6,12 +6,12 @@ Travis.Router = Ember.Router.extend
showRoot: Ember.Route.transitionTo('root.home.show') showRoot: Ember.Route.transitionTo('root.home.show')
showStats: Ember.Route.transitionTo('root.stats') showStats: Ember.Route.transitionTo('root.stats')
showRepository: Ember.Route.transitionTo('root.home.repository.show') showRepo: Ember.Route.transitionTo('root.home.repo.show')
showBuilds: Ember.Route.transitionTo('root.home.repository.builds.index') showBuilds: Ember.Route.transitionTo('root.home.repo.builds.index')
showBuild: Ember.Route.transitionTo('root.home.repository.builds.show') showBuild: Ember.Route.transitionTo('root.home.repo.builds.show')
showPullRequests: Ember.Route.transitionTo('root.home.repository.pullRequests') showPullRequests: Ember.Route.transitionTo('root.home.repo.pullRequests')
showBranches: Ember.Route.transitionTo('root.home.repository.branches') showBranches: Ember.Route.transitionTo('root.home.repo.branches')
showJob: Ember.Route.transitionTo('root.home.repository.job') showJob: Ember.Route.transitionTo('root.home.repo.job')
showProfile: Ember.Route.transitionTo('root.profile') showProfile: Ember.Route.transitionTo('root.profile')
showAccount: Ember.Route.transitionTo('root.profile.account') showAccount: Ember.Route.transitionTo('root.profile.account')
@ -113,26 +113,26 @@ Travis.Router = Ember.Router.extend
connectOutlets: (router) -> connectOutlets: (router) ->
router.get('applicationController').connectOutlet 'home' router.get('applicationController').connectOutlet 'home'
$('body').attr('id', 'home') $('body').attr('id', 'home')
router.get('homeController').connectOutlet 'left', 'repositories' router.get('homeController').connectOutlet 'left', 'repos'
router.get('homeController').connectOutlet 'right', 'sidebar' router.get('homeController').connectOutlet 'right', 'sidebar'
router.get('homeController').connectOutlet 'top', 'top' router.get('homeController').connectOutlet 'top', 'top'
router.get('homeController').connectOutlet 'main', 'repository' router.get('homeController').connectOutlet 'main', 'repo'
show: Ember.Route.extend show: Ember.Route.extend
route: '/' route: '/'
connectOutlets: (router) -> connectOutlets: (router) ->
router.get('repositoryController').activate('index') router.get('repoController').activate('index')
repository: Ember.Route.extend repo: Ember.Route.extend
initialState: 'show' initialState: 'show'
route: '/:owner/:name' route: '/:owner/:name'
connectOutlets: (router, repository) -> connectOutlets: (router, repo) ->
router.get('repositoryController').set 'repository', repository router.get('repoController').set 'repo', repo
deserialize: (router, params) -> deserialize: (router, params) ->
slug = "#{params.owner}/#{params.name}" slug = "#{params.owner}/#{params.name}"
repos = Travis.Repository.bySlug(slug) repos = Travis.Repo.bySlug(slug)
deferred = $.Deferred() deferred = $.Deferred()
observer = -> observer = ->
@ -144,16 +144,16 @@ Travis.Router = Ember.Router.extend
deferred.promise() deferred.promise()
serialize: (router, repository) -> serialize: (router, repo) ->
if repository if repo
{ owner: repository.get('owner'), name: repository.get('name') } { owner: repo.get('owner'), name: repo.get('name') }
else else
{} {}
show: Ember.Route.extend show: Ember.Route.extend
route: '/' route: '/'
connectOutlets: (router) -> connectOutlets: (router) ->
router.get('repositoryController').activate('current') router.get('repoController').activate('current')
builds: Ember.Route.extend builds: Ember.Route.extend
route: '/builds' route: '/builds'
@ -161,8 +161,8 @@ Travis.Router = Ember.Router.extend
index: Ember.Route.extend index: Ember.Route.extend
route: '/' route: '/'
connectOutlets: (router, repository) -> connectOutlets: (router, repo) ->
router.get('repositoryController').activate 'builds' router.get('repoController').activate 'builds'
show: Ember.Route.extend show: Ember.Route.extend
route: '/:build_id' route: '/:build_id'
@ -171,8 +171,8 @@ Travis.Router = Ember.Router.extend
# TODO: apparently when I use id in url, it will pass it # TODO: apparently when I use id in url, it will pass it
# here, why doesn't it use deserialize? # here, why doesn't it use deserialize?
build = Travis.Build.find(build) build = Travis.Build.find(build)
router.get('repositoryController').set 'build', build router.get('repoController').set 'build', build
router.get('repositoryController').activate 'build' router.get('repoController').activate 'build'
serialize: (router, build) -> serialize: (router, build) ->
if build.get if build.get
@ -200,13 +200,13 @@ Travis.Router = Ember.Router.extend
pullRequests: Ember.Route.extend pullRequests: Ember.Route.extend
route: '/pull_requests' route: '/pull_requests'
connectOutlets: (router, repository) -> connectOutlets: (router, repo) ->
router.get('repositoryController').activate 'pull_requests' router.get('repoController').activate 'pull_requests'
branches: Ember.Route.extend branches: Ember.Route.extend
route: '/branches' route: '/branches'
connectOutlets: (router, repository) -> connectOutlets: (router, repo) ->
router.get('repositoryController').activate 'branches' router.get('repoController').activate 'branches'
job: Ember.Route.extend job: Ember.Route.extend
@ -215,8 +215,8 @@ Travis.Router = Ember.Router.extend
unless job.get unless job.get
# In case I use id # In case I use id
job = Travis.Job.find(job) job = Travis.Job.find(job)
router.get('repositoryController').set 'job', job router.get('repoController').set 'job', job
router.get('repositoryController').activate 'job' router.get('repoController').activate 'job'
serialize: (router, job) -> serialize: (router, job) ->
if job.get if job.get

View File

@ -3,8 +3,10 @@ require 'models'
@Travis.RestAdapter = DS.RESTAdapter.extend Travis.Ajax, @Travis.RestAdapter = DS.RESTAdapter.extend Travis.Ajax,
mappings: mappings:
repositories: Travis.Repository repositories: Travis.Repo
repository: Travis.Repository repository: Travis.Repo
repos: Travis.Repo
repo: Travis.Repo
builds: Travis.Build builds: Travis.Build
build: Travis.Build build: Travis.Build
commits: Travis.Commit commits: Travis.Commit
@ -17,7 +19,9 @@ require 'models'
workers: Travis.Worker workers: Travis.Worker
plurals: plurals:
repositories: 'repositories',
repository: 'repositories', repository: 'repositories',
repo: 'repos',
build: 'builds' build: 'builds'
branch: 'branches' branch: 'branches'
job: 'jobs' job: 'jobs'

View File

@ -24,7 +24,7 @@
<td class="number"> <td class="number">
<span class="status"></span> <span class="status"></span>
{{#if job.id}} {{#if job.id}}
<a {{action showJob repository job href=true}}>{{number}}</a> <a {{action showJob repo job href=true}}>{{number}}</a>
{{/if}} {{/if}}
</td> </td>
<td class="duration" {{bindAttr title="startedAt"}}> <td class="duration" {{bindAttr title="startedAt"}}>

View File

@ -7,7 +7,7 @@
<dd class="number"> <dd class="number">
<span class="status"></span> <span class="status"></span>
{{#if job.id}} {{#if job.id}}
<a {{action showJob repository job href=true}}>{{job.number}}</a> <a {{action showJob repo job href=true}}>{{job.number}}</a>
{{/if}} {{/if}}
</dd> </dd>
<dt class="finished_at_label">{{t jobs.finished_at}}</dt> <dt class="finished_at_label">{{t jobs.finished_at}}</dt>

View File

@ -5,9 +5,9 @@
<ul {{bindAttr id="queue.id"}}> <ul {{bindAttr id="queue.id"}}>
{{#each job in queue}} {{#each job in queue}}
{{#view Travis.QueueItemView jobBinding="job"}} {{#view Travis.QueueItemView jobBinding="job"}}
<a {{action showJob job.repository job target="Travis.app.router" href=true}}> <a {{action showJob job.repo job target="Travis.app.router" href=true}}>
<span class="slug"> <span class="slug">
{{job.repository.slug}} {{job.repo.slug}}
</span> </span>
#{{job.number}} #{{job.number}}
</a> </a>

View File

@ -7,12 +7,12 @@
<a {{action toggleInfo target="view"}} class="toggle-info"></a> <a {{action toggleInfo target="view"}} class="toggle-info"></a>
<div class="tab"> <div class="tab">
{{#collection Travis.RepositoriesListView contentBinding="controller"}} {{#collection Travis.ReposListView contentBinding="controller"}}
{{#with view.repository}} {{#with view.repo}}
<div class="slug-and-status"> <div class="slug-and-status">
<span class="status"></span> <span class="status"></span>
{{#if slug}} {{#if slug}}
<a {{action showRepository this href=true}} class="slug">{{slug}}</a> <a {{action showRepo this href=true}} class="slug">{{slug}}</a>
{{/if}} {{/if}}
</div> </div>
{{#if lastBuildId}} {{#if lastBuildId}}

View File

@ -1,6 +1,6 @@
<div id="repository" {{bindAttr class="view.class"}}> <div id="repo" {{bindAttr class="view.class"}}>
{{#if view.repository.isLoaded}} {{#if view.repo.isLoaded}}
{{#with view.repository}} {{#with view.repo}}
<h3> <h3>
<a {{bindAttr href="view.urlGithub"}}>{{slug}}</a> <a {{bindAttr href="view.urlGithub"}}>{{slug}}</a>
</h3> </h3>

View File

@ -1,8 +1,8 @@
<ul class="tabs"> <ul class="tabs">
<li id="tab_current" {{bindAttr class="view.classCurrent"}}> <li id="tab_current" {{bindAttr class="view.classCurrent"}}>
<h5> <h5>
{{#if view.repository.slug}} {{#if view.repo.slug}}
<a {{action showRepository view.repository href=true}}> <a {{action showRepo view.repo href=true}}>
{{t repositories.tabs.current}} {{t repositories.tabs.current}}
</a> </a>
{{/if}} {{/if}}
@ -10,8 +10,8 @@
</li> </li>
<li id="tab_builds" {{bindAttr class="view.classBuilds"}}> <li id="tab_builds" {{bindAttr class="view.classBuilds"}}>
<h5> <h5>
{{#if view.repository.slug}} {{#if view.repo.slug}}
<a {{action showBuilds view.repository href=true}}> <a {{action showBuilds view.repo href=true}}>
{{t repositories.tabs.build_history}} {{t repositories.tabs.build_history}}
</a> </a>
{{/if}} {{/if}}
@ -19,8 +19,8 @@
</li> </li>
<li id="tab_pull_requests" {{bindAttr class="view.classPullRequests"}}> <li id="tab_pull_requests" {{bindAttr class="view.classPullRequests"}}>
<h5> <h5>
{{#if view.repository.slug}} {{#if view.repo.slug}}
<a {{action showPullRequests view.repository href=true}}> <a {{action showPullRequests view.repo href=true}}>
{{t repositories.tabs.pull_requests}} {{t repositories.tabs.pull_requests}}
</a> </a>
{{/if}} {{/if}}
@ -28,8 +28,8 @@
</li> </li>
<li id="tab_branches" {{bindAttr class="view.classBranches"}}> <li id="tab_branches" {{bindAttr class="view.classBranches"}}>
<h5> <h5>
{{#if view.repository.slug}} {{#if view.repo.slug}}
<a {{action showBranches view.repository href=true}}> <a {{action showBranches view.repo href=true}}>
{{t repositories.tabs.branches}} {{t repositories.tabs.branches}}
</a> </a>
{{/if}} {{/if}}

View File

@ -17,7 +17,7 @@
<div class="status"></div> <div class="status"></div>
{{#if worker.isWorking}} {{#if worker.isWorking}}
{{#if worker.job_id}} {{#if worker.job_id}}
<a {{action showJob worker.repository worker.job_id target="Travis.app.router" href=true}} {{bindAttr title="worker.lastSeenAt"}}> <a {{action showJob worker.repo worker.job_id target="Travis.app.router" href=true}} {{bindAttr title="worker.lastSeenAt"}}>
{{view.display}} {{view.display}}
</a> </a>
{{/if}} {{/if}}

View File

@ -4,7 +4,7 @@
buildsBinding: 'controller.builds' buildsBinding: 'controller.builds'
showMore: -> showMore: ->
id = @get('controller.repository.id') id = @get('controller.repo.id')
number = @get('builds.lastObject.number') number = @get('builds.lastObject.number')
@get('builds').load Travis.Build.olderThanNumber(id, number) @get('builds').load Travis.Build.olderThanNumber(id, number)
@ -27,7 +27,7 @@
BuildsItemView: Travis.View.extend BuildsItemView: Travis.View.extend
tagName: 'tr' tagName: 'tr'
classNameBindings: ['color'] classNameBindings: ['color']
repositoryBinding: 'controller.repository' repoBinding: 'controller.repo'
buildBinding: 'context' buildBinding: 'context'
commitBinding: 'build.commit' commitBinding: 'build.commit'
@ -36,19 +36,19 @@
).property('build.result') ).property('build.result')
urlBuild: (-> urlBuild: (->
Travis.Urls.build(@get('repository.slug'), @get('build.id')) Travis.Urls.build(@get('repo.slug'), @get('build.id'))
).property('repository.slug', 'build.id') ).property('repo.slug', 'build.id')
urlGithubCommit: (-> urlGithubCommit: (->
Travis.Urls.githubCommit(@get('repository.slug'), @get('commit.sha')) Travis.Urls.githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repository.slug', 'commit.sha') ).property('repo.slug', 'commit.sha')
BuildView: Travis.View.extend BuildView: Travis.View.extend
templateName: 'builds/show' templateName: 'builds/show'
elementId: 'build' elementId: 'build'
classNameBindings: ['color', 'loading'] classNameBindings: ['color', 'loading']
repositoryBinding: 'controller.repository' repoBinding: 'controller.repo'
buildBinding: 'controller.build' buildBinding: 'controller.build'
commitBinding: 'build.commit' commitBinding: 'build.commit'
@ -61,12 +61,12 @@
).property('build.result') ).property('build.result')
urlBuild: (-> urlBuild: (->
Travis.Urls.build(@get('repository.slug'), @get('build.id')) Travis.Urls.build(@get('repo.slug'), @get('build.id'))
).property('repository.slug', 'build.id') ).property('repo.slug', 'build.id')
urlGithubCommit: (-> urlGithubCommit: (->
Travis.Urls.githubCommit(@get('repository.slug'), @get('commit.sha')) Travis.Urls.githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repository.slug', 'commit.sha') ).property('repo.slug', 'commit.sha')
urlAuthor: (-> urlAuthor: (->
Travis.Urls.email(@get('commit.authorEmail')) Travis.Urls.email(@get('commit.authorEmail'))

View File

@ -6,7 +6,7 @@
JobsItemView: Travis.View.extend JobsItemView: Travis.View.extend
tagName: 'tr' tagName: 'tr'
classNameBindings: ['color'] classNameBindings: ['color']
repositoryBinding: 'context.repository' repoBinding: 'context.repo'
jobBinding: 'context' jobBinding: 'context'
color: (-> color: (->
@ -14,13 +14,13 @@
).property('job.result') ).property('job.result')
urlJob: (-> urlJob: (->
Travis.Urls.job(@get('repository.slug'), @get('job.id')) Travis.Urls.job(@get('repo.slug'), @get('job.id'))
).property('repository.slug', 'job.id') ).property('repo.slug', 'job.id')
JobView: Travis.View.extend JobView: Travis.View.extend
templateName: 'jobs/show' templateName: 'jobs/show'
repositoryBinding: 'controller.repository' repoBinding: 'controller.repo'
jobBinding: 'controller.job' jobBinding: 'controller.job'
commitBinding: 'job.commit' commitBinding: 'job.commit'
@ -29,12 +29,12 @@
).property('job.result') ).property('job.result')
urlJob: (-> urlJob: (->
Travis.Urls.job(@get('repository.slug'), @get('job.id')) Travis.Urls.job(@get('repo.slug'), @get('job.id'))
).property('repository.slug', 'job.id') ).property('repo.slug', 'job.id')
urlGithubCommit: (-> urlGithubCommit: (->
Travis.Urls.githubCommit(@get('repository.slug'), @get('commit.sha')) Travis.Urls.githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repository.slug', 'commit.sha') ).property('repo.slug', 'commit.sha')
urlAuthor: (-> urlAuthor: (->
Travis.Urls.email(@get('commit.authorEmail')) Travis.Urls.email(@get('commit.authorEmail'))

View File

@ -1,34 +1,34 @@
@Travis.reopen @Travis.reopen
RepositoriesView: Travis.View.extend ReposView: Travis.View.extend
templateName: 'repos/list' templateName: 'repos/list'
toggleInfo: (event) -> toggleInfo: (event) ->
$('#repositories').toggleClass('open') $('#repos').toggleClass('open')
RepositoriesListView: Em.CollectionView.extend ReposListView: Em.CollectionView.extend
elementId: 'repositories' elementId: 'repos'
tagName: 'ul' tagName: 'ul'
emptyView: Ember.View.extend emptyView: Ember.View.extend
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>') template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
itemViewClass: Travis.View.extend itemViewClass: Travis.View.extend
repositoryBinding: 'content' repoBinding: 'content'
classNames: ['repository'] classNames: ['repo']
classNameBindings: ['color', 'selected'] classNameBindings: ['color', 'selected']
selectedBinding: 'repository.selected' selectedBinding: 'repo.selected'
color: (-> color: (->
Travis.Helpers.colorForResult(@get('repository.lastBuildResult')) Travis.Helpers.colorForResult(@get('repo.lastBuildResult'))
).property('repository.lastBuildResult') ).property('repo.lastBuildResult')
urlRepository: (-> urlRepo: (->
Travis.Urls.repository(@get('repository.slug')) Travis.Urls.repo(@get('repo.slug'))
).property('repository.slug') ).property('repo.slug')
urlLastBuild: (-> urlLastBuild: (->
Travis.Urls.build(@get('repository.slug'), @get('repository.lastBuildId')) Travis.Urls.build(@get('repo.slug'), @get('repo.lastBuildId'))
).property('repository.slug', 'repository.lastBuildId') ).property('repo.slug', 'repo.lastBuildId')
ReposListTabsView: Travis.View.extend ReposListTabsView: Travis.View.extend
templateName: 'repos/list/tabs' templateName: 'repos/list/tabs'

View File

@ -1,29 +1,29 @@
@Travis.reopen @Travis.reopen
RepositoryView: Travis.View.extend RepoView: Travis.View.extend
templateName: 'repos/show' templateName: 'repos/show'
repositoryBinding: 'controller.repository' repoBinding: 'controller.repo'
class: (-> class: (->
'loading' unless @get('repository.isLoaded') 'loading' unless @get('repo.isLoaded')
).property('repository.isLoaded') ).property('repo.isLoaded')
urlGithub: (-> urlGithub: (->
Travis.Urls.githubRepository(@get('repository.slug')) Travis.Urls.githubRepo(@get('repo.slug'))
).property('repository.slug'), ).property('repo.slug'),
urlGithubWatchers: (-> urlGithubWatchers: (->
Travis.Urls.githubWatchers(@get('repository.slug')) Travis.Urls.githubWatchers(@get('repo.slug'))
).property('repository.slug'), ).property('repo.slug'),
urlGithubNetwork: (-> urlGithubNetwork: (->
Travis.Urls.githubNetwork(@get('repository.slug')) Travis.Urls.githubNetwork(@get('repo.slug'))
).property('repository.slug'), ).property('repo.slug'),
RepoShowTabsView: Travis.View.extend RepoShowTabsView: Travis.View.extend
templateName: 'repos/show/tabs' templateName: 'repos/show/tabs'
repositoryBinding: 'controller.repository' repoBinding: 'controller.repo'
buildBinding: 'controller.build' buildBinding: 'controller.build'
jobBinding: 'controller.job' jobBinding: 'controller.job'
tabBinding: 'controller.tab' tabBinding: 'controller.tab'
@ -60,7 +60,7 @@
RepoShowToolsView: Travis.View.extend RepoShowToolsView: Travis.View.extend
templateName: 'repos/show/tools' templateName: 'repos/show/tools'
repositoryBinding: 'controller.repository' repoBinding: 'controller.repo'
buildBinding: 'controller.build' buildBinding: 'controller.build'
jobBinding: 'controller.job' jobBinding: 'controller.job'
tabBinding: 'controller.tab' tabBinding: 'controller.tab'
@ -70,26 +70,26 @@
@set('active', element.hasClass('display-inline')) @set('active', element.hasClass('display-inline'))
branches: (-> branches: (->
@get('repository.branches') if @get('active') @get('repo.branches') if @get('active')
).property('active', 'repository.branches') ).property('active', 'repo.branches')
urlRepository: (-> urlRepo: (->
'https://' + location.host + Travis.Urls.repository(@get('repository.slug')) 'https://' + location.host + Travis.Urls.repo(@get('repo.slug'))
).property('repository.slug') ).property('repo.slug')
urlStatusImage: (-> urlStatusImage: (->
Travis.Urls.statusImage(@get('repository.slug'), @get('branch.commit.branch')) Travis.Urls.statusImage(@get('repo.slug'), @get('branch.commit.branch'))
).property('repository.slug', 'branch') ).property('repo.slug', 'branch')
markdownStatusImage: (-> markdownStatusImage: (->
"[![Build Status](#{@get('urlStatusImage')})](#{@get('urlRepository')})" "[![Build Status](#{@get('urlStatusImage')})](#{@get('urlRepo')})"
).property('urlStatusImage') ).property('urlStatusImage')
textileStatusImage: (-> textileStatusImage: (->
"!#{@get('urlStatusImage')}!:#{@get('urlRepository')}" "!#{@get('urlStatusImage')}!:#{@get('urlRepo')}"
).property('urlStatusImage') ).property('urlStatusImage')
rdocStatusImage: (-> rdocStatusImage: (->
"{<img src=\"#{@get('urlStatusImage')}\" alt=\"Build Status\" />}[#{@get('urlRepository')}]" "{<img src=\"#{@get('urlStatusImage')}\" alt=\"Build Status\" />}[#{@get('urlRepo')}]"
).property('urlStatusImage') ).property('urlStatusImage')

View File

@ -68,7 +68,7 @@
payload = @get('worker.payload') payload = @get('worker.payload')
if state == 'working' && payload != undefined if state == 'working' && payload != undefined
repo = payload.repository.slug repo = payload.repo.slug
number = ' #' + payload.build.number number = ' #' + payload.build.number
"<span class='name'>#{name}: #{repo}</span> #{number}".htmlSafe() "<span class='name'>#{name}: #{repo}</span> #{number}".htmlSafe()
else else
@ -79,6 +79,6 @@
QueueItemView: Travis.View.extend QueueItemView: Travis.View.extend
tagName: 'li' tagName: 'li'
urlJob: (-> urlJob: (->
Travis.Urls.job(@get('job.repository.slug'), @get('job.id')) Travis.Urls.job(@get('job.repo.slug'), @get('job.id'))
).property('job.repository.slug', 'job.id') ).property('job.repo.slug', 'job.id')

View File

@ -34,8 +34,8 @@ $.fn.extend
$(this).each -> $(this).each ->
$(this).text Utils.timeInWords(parseInt($(this).attr('title'))) $(this).text Utils.timeInWords(parseInt($(this).attr('title')))
updateGithubStats: (repository) -> updateGithubStats: (repo) ->
Utils.updateGithubStats repository, $(this) Utils.updateGithubStats repo, $(this)
$.extend $.extend
isEmpty: (obj) -> isEmpty: (obj) ->

View File

@ -1,7 +1,7 @@
@import "_mixins/all" @import "_mixins/all"
#accounts, #accounts,
#repositories #repos
&.open li .info &.open li .info
display: block display: block

View File

@ -1,6 +1,6 @@
@import "_mixins/all" @import "_mixins/all"
#repository #repo
position: relative position: relative
width: 100% width: 100%
overflow-x: hidden overflow-x: hidden

View File

@ -7,14 +7,14 @@
margin-right: 2px margin-right: 2px
@include border-radius(5px) @include border-radius(5px)
#repositories, #repos,
.number .number
.status .status
background-color: $color-bg-status-pending background-color: $color-bg-status-pending
a a
color: $color-text-status-pending color: $color-text-status-pending
#repositories .green, #repos .green,
.green #summary .number, .green #summary .number,
.list .green .number .list .green .number
.status .status
@ -22,7 +22,7 @@
a a
color: $color-text-status-passed color: $color-text-status-passed
#repositories .red, #repos .red,
.red #summary .number, .red #summary .number,
.list .red .number .list .red .number
.status .status

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2515,12 +2515,12 @@ body > div, body > div > div {
/* line 5, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 5, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts.open li .info, #accounts.open li .info,
#repositories.open li .info { #repos.open li .info {
display: block; display: block;
} }
/* line 8, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 8, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li, #accounts li,
#repositories li { #repos li {
position: relative; position: relative;
font-size: 15px; font-size: 15px;
padding: 15px 20px 15px 15px; padding: 15px 20px 15px 15px;
@ -2529,19 +2529,19 @@ body > div, body > div > div {
} }
/* line 15, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 15, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li:nth-child(odd), #accounts li:nth-child(odd) .indicator span, #accounts li:nth-child(odd), #accounts li:nth-child(odd) .indicator span,
#repositories li:nth-child(odd), #repos li:nth-child(odd),
#repositories li:nth-child(odd) .indicator span { #repos li:nth-child(odd) .indicator span {
background-color: white; background-color: white;
} }
/* line 18, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 18, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li:nth-child(even), #accounts li:nth-child(even) .indicator span, #accounts li:nth-child(even), #accounts li:nth-child(even) .indicator span,
#repositories li:nth-child(even), #repos li:nth-child(even),
#repositories li:nth-child(even) .indicator span { #repos li:nth-child(even) .indicator span {
background-color: #f6f6f6; background-color: #f6f6f6;
} }
/* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .slug-and-status, #accounts li .slug-and-status,
#repositories li .slug-and-status { #repos li .slug-and-status {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -2549,7 +2549,7 @@ body > div, body > div > div {
} }
/* line 28, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 28, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .last_build, #accounts li .last_build,
#repositories li .last_build { #repos li .last_build {
position: absolute; position: absolute;
top: 15px; top: 15px;
right: 20px; right: 20px;
@ -2557,7 +2557,7 @@ body > div, body > div > div {
} }
/* line 37, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 37, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .summary, #accounts li .summary,
#repositories li .summary { #repos li .summary {
margin: 5px 0 0 15px; margin: 5px 0 0 15px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -2567,7 +2567,7 @@ body > div, body > div > div {
} }
/* line 45, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 45, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .info, #accounts li .info,
#repositories li .info { #repos li .info {
overflow: hidden; overflow: hidden;
margin: 12px -20px -15px -45px; margin: 12px -20px -15px -45px;
font-size: 12px; font-size: 12px;
@ -2577,7 +2577,7 @@ body > div, body > div > div {
} }
/* line 52, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 52, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .info p, #accounts li .info p,
#repositories li .info p { #repos li .info p {
margin: 0 -10px 0 -10px; margin: 0 -10px 0 -10px;
padding: 12px 35px 12px 73px; padding: 12px 35px 12px 73px;
-webkit-box-shadow: #bab9a7 0 1px 8px 0 inset; -webkit-box-shadow: #bab9a7 0 1px 8px 0 inset;
@ -2586,7 +2586,7 @@ body > div, body > div > div {
} }
/* line 57, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 57, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .indicator, #accounts li .indicator,
#repositories li .indicator { #repos li .indicator {
display: none; display: none;
position: absolute; position: absolute;
top: 0; top: 0;
@ -2597,7 +2597,7 @@ body > div, body > div > div {
} }
/* line 66, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 66, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .indicator span, #accounts li .indicator span,
#repositories li .indicator span { #repos li .indicator span {
position: relative; position: relative;
display: block; display: block;
top: 50%; top: 50%;
@ -2617,12 +2617,12 @@ body > div, body > div > div {
} }
/* line 78, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 78, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li.selected .indicator, #accounts li.selected .indicator,
#repositories li.selected .indicator { #repos li.selected .indicator {
display: block; display: block;
} }
/* line 81, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */ /* line 81, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts .loading, #accounts .loading,
#repositories .loading { #repos .loading {
padding: 15px 25px 15px 30px; padding: 15px 25px 15px 30px;
background-color: white; background-color: white;
background-image: none; background-image: none;
@ -3623,33 +3623,33 @@ pre#log .fold.open {
} }
/* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository { #repo {
position: relative; position: relative;
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;
} }
/* line 8, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 8, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .description, #repository .language { #repo .description, #repo .language {
font-weight: normal; font-weight: normal;
color: #999999; color: #999999;
} }
/* line 12, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 12, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .language { #repo .language {
display: none; display: none;
padding-right: 5px; padding-right: 5px;
} }
/* line 16, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 16, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats { #repo .github-stats {
position: absolute; position: absolute;
top: 15px; top: 15px;
right: 0; right: 0;
} }
/* line 20, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 20, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats > * { #repo .github-stats > * {
float: left; float: left;
} }
/* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats a { #repo .github-stats a {
height: 16px; height: 16px;
display: block; display: block;
font-size: 12px; font-size: 12px;
@ -3661,11 +3661,11 @@ pre#log .fold.open {
color: #999999; color: #999999;
} }
/* line 32, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 32, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats a.watchers { #repo .github-stats a.watchers {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEge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A8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMDIyNDMxMEZERDMxMUUxQUM0RERDMDAyRkU2RUY2NCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMDIyNDMxMUZERDMxMUUxQUM0RERDMDAyRkU2RUY2NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Piet84cAAAAwUExURZycnLq6utDQ0JCQkK2trezs7MvLy/b29tTU1PDw8Pz8/KSkpPPz8+Hh4cXFxf///4r68HYAAAAQdFJOU////////////////////wDgI10ZAAAAWUlEQVR42qTO0Q6AIAgFUOQiimL9/9+G1Vzrse4TOxtcaH+FvoKpiNqCkkDMhFQuGITezFoHjQkVQDXAziGAb/AJvFbc10p0xFHVOOqrNm8iW/73+iOHAAMAVlIL9c8yrmkAAAAASUVORK5CYII=');
} }
/* line 34, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */ /* line 34, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats a.forks { #repo .github-stats a.forks {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8x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DAyRkU2RUY2NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PopAyIgAAAAwUExURebm5vj4+Kurq7u7u9ra2v39/fLy8tXV1ZCQkMTExM3NzZqamtDQ0MrKypOTk////1zRGooAAAAQdFJOU////////////////////wDgI10ZAAAAYUlEQVR42pSPQRLAIAjEwKqsivr/3xash7Y3czMOGaD5g45E0uTiMsSfUoFsoo0B6OQAxwQz5wBNoVBD2g371h3c0WX4EWSEbqbGsUY8NcorGkUk+pR0gD+LsRzfsrgFGABEEAvG8TNu0wAAAABJRU5ErkJggg==');
} }
/* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/_mixins/ansi.sass */ /* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/_mixins/ansi.sass */
@ -5996,37 +5996,37 @@ pre#log .fold.open {
} }
/* line 12, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */ /* line 12, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .status, #repos .status,
.number .status { .number .status {
background-color: #e7d100; background-color: #e7d100;
} }
/* line 14, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */ /* line 14, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories a, #repos a,
.number a { .number a {
color: #666666; color: #666666;
} }
/* line 20, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */ /* line 20, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .green .status, #repos .green .status,
.green #summary .number .status, .green #summary .number .status,
.list .green .number .status { .list .green .number .status {
background-color: #368c2a; background-color: #368c2a;
} }
/* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */ /* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .green a, #repos .green a,
.green #summary .number a, .green #summary .number a,
.list .green .number a { .list .green .number a {
color: #038035; color: #038035;
} }
/* line 28, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */ /* line 28, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .red .status, #repos .red .status,
.red #summary .number .status, .red #summary .number .status,
.list .red .number .status { .list .red .number .status {
background-color: #cc3d3d; background-color: #cc3d3d;
} }
/* line 30, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */ /* line 30, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .red a, #repos .red a,
.red #summary .number a, .red #summary .number a,
.list .red .number a { .list .red .number a {
color: #cc0000; color: #cc0000;

View File

@ -1 +1 @@
5f08468e a126b5e2

View File

@ -4,7 +4,7 @@
@hasText = (selector, text) -> @hasText = (selector, text) ->
-> $(selector).text().trim() == text -> $(selector).text().trim() == text
@reposRendered = notEmpty('#repositories li a.current') @reposRendered = notEmpty('#repos li a.current')
@buildRendered = notEmpty('#summary .number') @buildRendered = notEmpty('#summary .number')
@buildsRendered = notEmpty('#builds .number') @buildsRendered = notEmpty('#builds .number')
@jobRendered = notEmpty('#summary .number') @jobRendered = notEmpty('#summary .number')

View File

@ -44,7 +44,7 @@
listsItems('repo', items) listsItems('repo', items)
@listsRepo = (data) -> @listsRepo = (data) ->
row = $('#repositories li')[data.row - 1] row = $('#repos li')[data.row - 1]
repo = data.item repo = data.item
expect($('a.current', row).attr('href')).toEqual "/#{repo.slug}" expect($('a.current', row).attr('href')).toEqual "/#{repo.slug}"

View File

@ -2,7 +2,7 @@ require 'ext/jquery'
responseTime = 0 responseTime = 0
repositories = [ repos = [
{ id: 1, owner: 'travis-ci', name: 'travis-core', slug: 'travis-ci/travis-core', build_ids: [1, 2], last_build_id: 1, last_build_number: 1, last_build_result: 0, last_build_duration: 30, last_build_started_at: '2012-07-02T00:00:00Z', last_build_finished_at: '2012-07-02T00:00:30Z', description: 'Description of travis-core' }, { id: 1, owner: 'travis-ci', name: 'travis-core', slug: 'travis-ci/travis-core', build_ids: [1, 2], last_build_id: 1, last_build_number: 1, last_build_result: 0, last_build_duration: 30, last_build_started_at: '2012-07-02T00:00:00Z', last_build_finished_at: '2012-07-02T00:00:30Z', description: 'Description of travis-core' },
{ id: 2, owner: 'travis-ci', name: 'travis-assets', slug: 'travis-ci/travis-assets', build_ids: [3], last_build_id: 3, last_build_number: 3, last_build_result: 1, last_build_duration: 30, last_build_started_at: '2012-07-02T00:01:00Z', last_build_finished_at: '2012-07-01T00:01:30Z', description: 'Description of travis-assets'}, { id: 2, owner: 'travis-ci', name: 'travis-assets', slug: 'travis-ci/travis-assets', build_ids: [3], last_build_id: 3, last_build_number: 3, last_build_result: 1, last_build_duration: 30, last_build_started_at: '2012-07-02T00:01:00Z', last_build_finished_at: '2012-07-01T00:01:30Z', description: 'Description of travis-assets'},
{ id: 3, owner: 'travis-ci', name: 'travis-hub', slug: 'travis-ci/travis-hub', build_ids: [4], last_build_id: 4, last_build_number: 4, last_build_result: undefined, last_build_duration: undefined, last_build_started_at: '2012-07-02T00:02:00Z', last_build_finished_at: undefined, description: 'Description of travis-hub'}, { id: 3, owner: 'travis-ci', name: 'travis-hub', slug: 'travis-ci/travis-hub', build_ids: [4], last_build_id: 4, last_build_number: 4, last_build_result: undefined, last_build_duration: undefined, last_build_started_at: '2012-07-02T00:02:00Z', last_build_finished_at: undefined, description: 'Description of travis-hub'},
@ -63,29 +63,29 @@ hooks = [
$.mockjax $.mockjax
url: '/repositories' url: '/repos'
responseTime: responseTime responseTime: responseTime
response: (settings) -> response: (settings) ->
if !settings.data if !settings.data
this.responseText = { repositories: repositories } this.responseText = { repos: repos }
else if slug = settings.data.slug else if slug = settings.data.slug
this.responseText = { repositories: [$.detect(repositories, (repository) -> repository.slug == slug)] } this.responseText = { repos: [$.detect(repos, (repository) -> repository.slug == slug)] }
else if search = settings.data.search else if search = settings.data.search
this.responseText = { repositories: $.select(repositories, (repository) -> repository.slug.indexOf(search) > -1).toArray() } this.responseText = { repos: $.select(repos, (repository) -> repository.slug.indexOf(search) > -1).toArray() }
else else
raise "don't know this ditty" raise "don't know this ditty"
for repository in repositories for repository in repos
$.mockjax $.mockjax
url: '/' + repository.slug url: '/' + repository.slug
responseTime: responseTime responseTime: responseTime
responseText: { repository: repository } responseText: { repository: repository }
$.mockjax $.mockjax
url: '/repositories' url: '/repos'
data: { slug: repository.slug } data: { slug: repository.slug }
responseTime: responseTime responseTime: responseTime
responseText: { repositories: [repository] } responseText: { repos: [repository] }
$.mockjax $.mockjax
url: '/builds' url: '/builds'