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)
Em.run.later (-> element.remove()), 10
element = $('<span></span>')
$('#repository').append(element)
$('#repo').append(element)
Em.run.later (-> element.remove()), 10

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
require 'travis/model'
@Travis.Job = Travis.Model.extend Travis.DurationCalculations,
repositoryId: DS.attr('number')
repoId: DS.attr('number', key: 'repository_id')
buildId: DS.attr('number')
commitId: DS.attr('number')
logId: DS.attr('number')
@ -15,7 +15,7 @@ require 'travis/model'
finishedAt: DS.attr('string')
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')
commit: DS.belongsTo('Travis.Commit', key: 'commit_id')
log: DS.belongsTo('Travis.Artifact', key: 'log_id')

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,9 +5,9 @@
<ul {{bindAttr id="queue.id"}}>
{{#each job in queue}}
{{#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">
{{job.repository.slug}}
{{job.repo.slug}}
</span>
#{{job.number}}
</a>

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@
<div class="status"></div>
{{#if worker.isWorking}}
{{#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}}
</a>
{{/if}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,14 +7,14 @@
margin-right: 2px
@include border-radius(5px)
#repositories,
#repos,
.number
.status
background-color: $color-bg-status-pending
a
color: $color-text-status-pending
#repositories .green,
#repos .green,
.green #summary .number,
.list .green .number
.status
@ -22,7 +22,7 @@
a
color: $color-text-status-passed
#repositories .red,
#repos .red,
.red #summary .number,
.list .red .number
.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 */
#accounts.open li .info,
#repositories.open li .info {
#repos.open li .info {
display: block;
}
/* line 8, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li,
#repositories li {
#repos li {
position: relative;
font-size: 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 */
#accounts li:nth-child(odd), #accounts li:nth-child(odd) .indicator span,
#repositories li:nth-child(odd),
#repositories li:nth-child(odd) .indicator span {
#repos li:nth-child(odd),
#repos li:nth-child(odd) .indicator span {
background-color: white;
}
/* 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,
#repositories li:nth-child(even),
#repositories li:nth-child(even) .indicator span {
#repos li:nth-child(even),
#repos li:nth-child(even) .indicator span {
background-color: #f6f6f6;
}
/* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts li .slug-and-status,
#repositories li .slug-and-status {
#repos li .slug-and-status {
white-space: nowrap;
overflow: hidden;
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 */
#accounts li .last_build,
#repositories li .last_build {
#repos li .last_build {
position: absolute;
top: 15px;
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 */
#accounts li .summary,
#repositories li .summary {
#repos li .summary {
margin: 5px 0 0 15px;
white-space: nowrap;
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 */
#accounts li .info,
#repositories li .info {
#repos li .info {
overflow: hidden;
margin: 12px -20px -15px -45px;
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 */
#accounts li .info p,
#repositories li .info p {
#repos li .info p {
margin: 0 -10px 0 -10px;
padding: 12px 35px 12px 73px;
-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 */
#accounts li .indicator,
#repositories li .indicator {
#repos li .indicator {
display: none;
position: absolute;
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 */
#accounts li .indicator span,
#repositories li .indicator span {
#repos li .indicator span {
position: relative;
display: block;
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 */
#accounts li.selected .indicator,
#repositories li.selected .indicator {
#repos li.selected .indicator {
display: block;
}
/* line 81, /Users/sven/Development/projects/travis/travis-web/assets/styles/left/list.sass */
#accounts .loading,
#repositories .loading {
#repos .loading {
padding: 15px 25px 15px 30px;
background-color: white;
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 */
#repository {
#repo {
position: relative;
width: 100%;
overflow-x: hidden;
}
/* 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;
color: #999999;
}
/* line 12, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .language {
#repo .language {
display: none;
padding-right: 5px;
}
/* line 16, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats {
#repo .github-stats {
position: absolute;
top: 15px;
right: 0;
}
/* line 20, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats > * {
#repo .github-stats > * {
float: left;
}
/* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/main/repository.sass */
#repository .github-stats a {
#repo .github-stats a {
height: 16px;
display: block;
font-size: 12px;
@ -3661,11 +3661,11 @@ pre#log .fold.open {
color: #999999;
}
/* 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+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzAyMjQzMTJGREQzMTFFMUFDNEREQzAwMkZFNkVGNjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzAyMjQzMTNGREQzMTFFMUFDNEREQzAwMkZFNkVGNjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMDIyNDMxMEZERDMxMUUxQUM0RERDMDAyRkU2RUY2NCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMDIyNDMxMUZERDMxMUUxQUM0RERDMDAyRkU2RUY2NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/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 */
#repository .github-stats a.forks {
#repo .github-stats a.forks {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzAyMjQzMTZGREQzMTFFMUFDNEREQzAwMkZFNkVGNjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0U1QTlDREFGREQzMTFFMUFDNEREQzAwMkZFNkVGNjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMDIyNDMxNEZERDMxMUUxQUM0RERDMDAyRkU2RUY2NCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMDIyNDMxNUZERDMxMUUxQUM0RERDMDAyRkU2RUY2NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PopAyIgAAAAwUExURebm5vj4+Kurq7u7u9ra2v39/fLy8tXV1ZCQkMTExM3NzZqamtDQ0MrKypOTk////1zRGooAAAAQdFJOU////////////////////wDgI10ZAAAAYUlEQVR42pSPQRLAIAjEwKqsivr/3xash7Y3czMOGaD5g45E0uTiMsSfUoFsoo0B6OQAxwQz5wBNoVBD2g371h3c0WX4EWSEbqbGsUY8NcorGkUk+pR0gD+LsRzfsrgFGABEEAvG8TNu0wAAAABJRU5ErkJggg==');
}
/* 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 */
#repositories .status,
#repos .status,
.number .status {
background-color: #e7d100;
}
/* line 14, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories a,
#repos a,
.number a {
color: #666666;
}
/* line 20, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .green .status,
#repos .green .status,
.green #summary .number .status,
.list .green .number .status {
background-color: #368c2a;
}
/* line 22, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .green a,
#repos .green a,
.green #summary .number a,
.list .green .number a {
color: #038035;
}
/* line 28, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .red .status,
#repos .red .status,
.red #summary .number .status,
.list .red .number .status {
background-color: #cc3d3d;
}
/* line 30, /Users/sven/Development/projects/travis/travis-web/assets/styles/status.sass */
#repositories .red a,
#repos .red a,
.red #summary .number a,
.list .red .number a {
color: #cc0000;

View File

@ -1 +1 @@
5f08468e
a126b5e2

View File

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

View File

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

View File

@ -2,7 +2,7 @@ require 'ext/jquery'
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: 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'},
@ -63,29 +63,29 @@ hooks = [
$.mockjax
url: '/repositories'
url: '/repos'
responseTime: responseTime
response: (settings) ->
if !settings.data
this.responseText = { repositories: repositories }
this.responseText = { repos: repos }
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
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
raise "don't know this ditty"
for repository in repositories
for repository in repos
$.mockjax
url: '/' + repository.slug
responseTime: responseTime
responseText: { repository: repository }
$.mockjax
url: '/repositories'
url: '/repos'
data: { slug: repository.slug }
responseTime: responseTime
responseText: { repositories: [repository] }
responseText: { repos: [repository] }
$.mockjax
url: '/builds'