Revert "Revert "Merge pull request #308 from rwjblue/update-ember""
This reverts commit 840ce5a47d
.
This commit is contained in:
parent
ce11b48c9d
commit
09eeeaff1b
|
@ -1,19 +1,11 @@
|
||||||
delegate = (name, options) ->
|
|
||||||
options ||= options
|
|
||||||
->
|
|
||||||
target = @get(options.to)
|
|
||||||
target[name].apply(target, arguments)
|
|
||||||
|
|
||||||
Travis.CurrentUserController = Em.ObjectController.extend
|
Travis.CurrentUserController = Em.ObjectController.extend
|
||||||
sync: ->
|
sync: ->
|
||||||
@get('content').sync()
|
@get('model').sync()
|
||||||
|
|
||||||
content: (->
|
model: Ember.computed.alias('auth.currentUser')
|
||||||
@get('auth.currentUser')
|
|
||||||
).property('auth.currentUser')
|
|
||||||
|
|
||||||
syncingDidChange: (->
|
syncingDidChange: (->
|
||||||
if (user = @get('content')) && user.get('isSyncing') && !user.get('syncedAt')
|
if (user = @get('model')) && user.get('isSyncing') && !user.get('syncedAt')
|
||||||
Ember.run.scheduleOnce 'routerTransitions', this, ->
|
Ember.run.scheduleOnce 'routerTransitions', this, ->
|
||||||
@container.lookup('router:main').send('renderFirstSync')
|
@container.lookup('router:main').send('renderFirstSync')
|
||||||
).observes('isSyncing', 'content')
|
).observes('isSyncing', 'auth.currentUser')
|
||||||
|
|
|
@ -6,13 +6,13 @@ Travis.FlashController = Ember.ArrayController.extend
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
@set('flashes', Travis.LimitedArray.create(limit: 2, content: []))
|
@set('flashes', Travis.LimitedArray.create(limit: 2, content: []))
|
||||||
|
|
||||||
content: (->
|
model: (->
|
||||||
broadcasts = @get('unseenBroadcasts')
|
broadcasts = @get('unseenBroadcasts')
|
||||||
flashes = @get('flashes')
|
flashes = @get('flashes')
|
||||||
content = []
|
model = []
|
||||||
content = content.concat(broadcasts.toArray()) if broadcasts
|
model = model.concat(broadcasts.toArray()) if broadcasts
|
||||||
content = content.concat(flashes.toArray().reverse()) if flashes
|
model = model.concat(flashes.toArray().reverse()) if flashes
|
||||||
content.uniq()
|
model.uniq()
|
||||||
).property('unseenBroadcasts.length', 'flashes.length')
|
).property('unseenBroadcasts.length', 'flashes.length')
|
||||||
|
|
||||||
unseenBroadcasts: (->
|
unseenBroadcasts: (->
|
||||||
|
|
|
@ -10,7 +10,8 @@ Travis.RepoController = Travis.Controller.extend
|
||||||
|
|
||||||
init: ->
|
init: ->
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
Visibility.every Travis.INTERVALS.updateTimes, @updateTimes.bind(this)
|
if !Ember.testing
|
||||||
|
Visibility.every Travis.INTERVALS.updateTimes, @updateTimes.bind(this)
|
||||||
|
|
||||||
updateTimes: ->
|
updateTimes: ->
|
||||||
Ember.run this, ->
|
Ember.run this, ->
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
require 'ext/ember/bound_helper'
|
|
||||||
|
|
||||||
safe = (string) ->
|
safe = (string) ->
|
||||||
new Handlebars.SafeString(string)
|
new Handlebars.SafeString(string)
|
||||||
|
|
||||||
|
@ -125,7 +123,7 @@ Ember.Handlebars.helper('travis-errors', (name, options) ->
|
||||||
Handlebars.registerHelper 'tipsy', (text, tip) ->
|
Handlebars.registerHelper 'tipsy', (text, tip) ->
|
||||||
safe '<span class="tool-tip" original-title="' + tip + '">' + text + '</span>'
|
safe '<span class="tool-tip" original-title="' + tip + '">' + text + '</span>'
|
||||||
|
|
||||||
Ember.registerBoundHelper 'capitalize', (value, options) ->
|
Ember.Handlebars.registerBoundHelper 'capitalize', (value, options) ->
|
||||||
if value?
|
if value?
|
||||||
safe $.capitalize(value)
|
safe $.capitalize(value)
|
||||||
else
|
else
|
||||||
|
@ -140,10 +138,10 @@ Ember.Handlebars.helper('githubCommitLink', (slug, commitSha) ->
|
||||||
safe '<a class="github-link only-on-hover" href="' + url + '">' + sha + '</a>'
|
safe '<a class="github-link only-on-hover" href="' + url + '">' + sha + '</a>'
|
||||||
)
|
)
|
||||||
|
|
||||||
Ember.registerBoundHelper 'formatTime', (value, options) ->
|
Ember.Handlebars.registerBoundHelper 'formatTime', (value, options) ->
|
||||||
safe Travis.Helpers.timeAgoInWords(value) || '-'
|
safe Travis.Helpers.timeAgoInWords(value) || '-'
|
||||||
|
|
||||||
Ember.registerBoundHelper 'formatDuration', (duration, options) ->
|
Ember.Handlebars.registerBoundHelper 'formatDuration', (duration, options) ->
|
||||||
safe Travis.Helpers.timeInWords(duration)
|
safe Travis.Helpers.timeInWords(duration)
|
||||||
|
|
||||||
Ember.Handlebars.helper('formatCommit', (commit) ->
|
Ember.Handlebars.helper('formatCommit', (commit) ->
|
||||||
|
@ -153,16 +151,16 @@ Ember.Handlebars.helper('formatCommit', (commit) ->
|
||||||
Ember.Handlebars.helper 'formatSha', (sha) ->
|
Ember.Handlebars.helper 'formatSha', (sha) ->
|
||||||
safe Travis.Helpers.formatSha(sha)
|
safe Travis.Helpers.formatSha(sha)
|
||||||
|
|
||||||
Ember.registerBoundHelper 'pathFrom', (url, options) ->
|
Ember.Handlebars.registerBoundHelper 'pathFrom', (url, options) ->
|
||||||
safe Travis.Helpers.pathFrom(url)
|
safe Travis.Helpers.pathFrom(url)
|
||||||
|
|
||||||
Ember.Handlebars.helper 'formatMessage', (message, options) ->
|
Ember.Handlebars.helper 'formatMessage', (message, options) ->
|
||||||
safe Travis.Helpers.formatMessage(message, options.hash)
|
safe Travis.Helpers.formatMessage(message, options.hash)
|
||||||
|
|
||||||
Ember.registerBoundHelper 'formatConfig', (config, options) ->
|
Ember.Handlebars.registerBoundHelper 'formatConfig', (config, options) ->
|
||||||
safe Travis.Helpers.formatConfig(config)
|
safe Travis.Helpers.formatConfig(config)
|
||||||
|
|
||||||
Ember.registerBoundHelper 'shortCompareShas', (url, options) ->
|
Ember.Handlebars.registerBoundHelper 'shortCompareShas', (url, options) ->
|
||||||
path = Travis.Helpers.pathFrom(url)
|
path = Travis.Helpers.pathFrom(url)
|
||||||
if path.indexOf('...') >= 0
|
if path.indexOf('...') >= 0
|
||||||
shas = path.split('...')
|
shas = path.split('...')
|
||||||
|
@ -170,7 +168,7 @@ Ember.registerBoundHelper 'shortCompareShas', (url, options) ->
|
||||||
else
|
else
|
||||||
path
|
path
|
||||||
|
|
||||||
Ember.registerBoundHelper 'formatLog', (log, options) ->
|
Ember.Handlebars.registerBoundHelper 'formatLog', (log, options) ->
|
||||||
parentView = @get 'parentView'
|
parentView = @get 'parentView'
|
||||||
repo = parentView.get(options.repo)
|
repo = parentView.get(options.repo)
|
||||||
item = parentView.get(options.item)
|
item = parentView.get(options.item)
|
||||||
|
|
|
@ -64,13 +64,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#unless build.isMatrix}}
|
{{#unless build.isMatrix}}
|
||||||
{{view Travis.AnnotationsView annotationsBinding="build.jobs.firstObject.annotations"}}
|
{{view 'annotations' annotations=build.jobs.firstObject.annotations}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
{{#if build.isMatrix}}
|
{{#if build.isMatrix}}
|
||||||
{{view Travis.JobsView jobsBinding="build.requiredJobs" required="true"}}
|
{{view 'jobs' jobs=build.requiredJobs required="true"}}
|
||||||
{{view Travis.JobsView jobsBinding="build.allowedFailureJobs"}}
|
{{view 'jobs' jobs=build.allowedFailureJobs}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{view Travis.LogView jobBinding="build.jobs.firstObject"}}
|
{{view 'log' job=build.jobs.firstObject}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
{{#if view.jobs.length}}
|
{{#if view.jobs.length}}
|
||||||
|
<table {{bind-attr id=view.jobTableId}} class="list">
|
||||||
{{#if view.required}}
|
{{#if view.required}}
|
||||||
<table id="jobs" class="list">
|
<caption>
|
||||||
<caption>
|
Build Matrix
|
||||||
Build Matrix
|
</caption>
|
||||||
</caption>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<table id="allowed_failure_jobs" class="list">
|
<caption>
|
||||||
<caption>
|
Allowed Failures
|
||||||
Allowed Failures
|
<a title="What's this?" class="help open-popup" name="help-allowed_failures" {{action "popup" target="view"}}></a>
|
||||||
<a title="What's this?" class="help open-popup" name="help-allowed_failures" {{action "popup" target="view"}}></a>
|
</caption>
|
||||||
</caption>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -20,7 +19,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each job in view.jobs}}
|
{{#each job in view.jobs}}
|
||||||
{{#view Travis.JobsItemView contextBinding="job"}}
|
{{#view 'jobs-item' context=job}}
|
||||||
<td class="number">
|
<td class="number">
|
||||||
<span class="status"></span>
|
<span class="status"></span>
|
||||||
{{#if job.id}}
|
{{#if job.id}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{#if view.log.isLoaded}}
|
{{#if view.log.isLoaded}}
|
||||||
{{view Travis.PreView jobBinding="view.job" logBinding="view.log"}}
|
{{view 'pre' job=view.job log=view.log}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div id="log" class="loading">
|
<div id="log" class="loading">
|
||||||
<span>Loading</span>
|
<span>Loading</span>
|
||||||
|
|
|
@ -62,9 +62,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{view Travis.AnnotationsView annotationsBinding="view.annotations"}}
|
{{view 'annotations' annotations=view.annotations}}
|
||||||
|
|
||||||
{{view Travis.LogView jobBinding="job"}}
|
{{view 'log' job=job}}
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div id="job" class="loading">
|
<div id="job" class="loading">
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div id="search_box">
|
<div id="search_box">
|
||||||
{{view Ember.TextField valueBinding="controller.search" placeholder="Search all repositories"}}
|
{{input value=controller.search placeholder="Search all repositories"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{view Travis.ReposListTabsView}}
|
{{view 'repos-list-tabs'}}
|
||||||
|
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
{{#if isLoaded}}
|
{{#if isLoaded}}
|
||||||
{{#collection Travis.ReposListView contentBinding="this"}}
|
{{#collection 'repos-list' content=this}}
|
||||||
{{#with view.repo}}
|
{{#with view.repo}}
|
||||||
<div class="slug-and-status">
|
<div class="slug-and-status">
|
||||||
<span class="status"></span>
|
<span class="status"></span>
|
||||||
|
|
|
@ -7,20 +7,19 @@
|
||||||
<div id="repo-header">
|
<div id="repo-header">
|
||||||
<h3>{{#link-to "repo" this}}{{slug}}{{/link-to}}</h3>
|
<h3>{{#link-to "repo" this}}{{slug}}{{/link-to}}</h3>
|
||||||
<div class="github-icon"><a {{bind-attr href="controller.urlGithub"}}><img src="/images/icons/github.svg" width="21" height="21"/></a></div>
|
<div class="github-icon"><a {{bind-attr href="controller.urlGithub"}}><img src="/images/icons/github.svg" width="21" height="21"/></a></div>
|
||||||
|
|
||||||
<div class="status-image">
|
<div class="status-image">
|
||||||
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target="view"}}>
|
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target="view"}}>
|
||||||
<img {{bind-attr src="view.statusImageUrl"}} title="Build Status Images"/>
|
<img {{bind-attr src="view.statusImageUrl"}} title="Build Status Images"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{view Travis.RepoShowToolsView}}
|
{{view 'repo-show-tools'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="description">{{description}}</p>
|
<p class="description">{{description}}</p>
|
||||||
|
|
||||||
{{view Travis.RepoShowTabsView}}
|
{{view 'repo-show-tabs'}}
|
||||||
{{view Travis.RepoActionsView}}
|
{{view 'repo-actions'}}
|
||||||
{{/with}}
|
{{/with}}
|
||||||
|
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<li id="tab_current" {{bind-attr class="view.classCurrent"}}>
|
<li id="tab_current" {{bind-attr class="view.classCurrent"}}>
|
||||||
<h5>
|
<h5>
|
||||||
{{#if repo.slug}}
|
{{#if repo.slug}}
|
||||||
{{#link-to "repo" repo currentWhen="repo.index"}}
|
{{#link-to "repo" repo current-when="repo.index"}}
|
||||||
Current
|
Current
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</h5>
|
</h5>
|
||||||
</li>
|
</li>
|
||||||
{{#if Travis.config.caches_enabled}}
|
{{#if config.caches_enabled}}
|
||||||
<li id="tab_caches" {{bind-attr class="view.classCaches"}}>
|
<li id="tab_caches" {{bind-attr class="view.classCaches"}}>
|
||||||
<h5>
|
<h5>
|
||||||
{{#if repo.slug}}
|
{{#if repo.slug}}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<li>
|
<li>
|
||||||
{{#link-to "requests" view.repo}}Requests{{/link-to}}
|
{{#link-to "requests" view.repo}}Requests{{/link-to}}
|
||||||
</li>
|
</li>
|
||||||
{{#if Travis.config.caches_enabled}}
|
{{#if config.caches_enabled}}
|
||||||
<li>
|
<li>
|
||||||
{{#link-to "caches" view.repo}}Caches{{/link-to}}
|
{{#link-to "caches" view.repo}}Caches{{/link-to}}
|
||||||
</li>
|
</li>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<p>
|
<p>
|
||||||
Integrating <a href="https://codeclimate.com">Code Climate's test coverage</a> reporting with your test
|
Integrating <a href="https://codeclimate.com">Code Climate's test coverage</a> reporting with your test
|
||||||
suite on Travis CI allows to track changes in coverage over time. If you haven't tried it out already, <a
|
suite on Travis CI allows to track changes in coverage over time. If you haven't tried it out already, <a
|
||||||
{{bind-attr href="Travis.config.code_climate_url"}}" target="_blank">sign
|
{{bind-attr href=config.code_climate_url}}" target="_blank">sign
|
||||||
up today</a> to improve your code's quality. New customers get 20% off for the first three months!
|
up today</a> to improve your code's quality. New customers get 20% off for the first three months!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<ul class="navigation">
|
<ul class="navigation">
|
||||||
<li>{{#link-to "settings.index"}}General Settings{{/link-to}}</li>
|
<li>{{#link-to "settings.index"}}General Settings{{/link-to}}</li>
|
||||||
<li>{{#link-to "env_vars"}}Environment Variables{{/link-to}}</li>
|
<li>{{#link-to "env_vars"}}Environment Variables{{/link-to}}</li>
|
||||||
{{#if Travis.config.ssh_key_enabled}}
|
{{#if config.ssh_key_enabled}}
|
||||||
<li>{{#link-to "ssh_key"}}SSH Key{{/link-to}}</li>
|
<li>{{#link-to "ssh_key"}}SSH Key{{/link-to}}</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Travis.reopen
|
Travis.reopen
|
||||||
ApplicationView: Travis.View.extend
|
ApplicationView: Travis.View.extend
|
||||||
templateName: (-> @get 'controller.templateName' ).property('controller.templateName')
|
templateName: Ember.computed.alias('controller.templateName')
|
||||||
classNames: ['application']
|
classNames: ['application']
|
||||||
|
|
||||||
templateNameDidChange: (->
|
templateNameDidChange: (->
|
||||||
|
|
|
@ -3,6 +3,13 @@ Travis.reopen
|
||||||
templateName: 'jobs/list'
|
templateName: 'jobs/list'
|
||||||
buildBinding: 'controller.build'
|
buildBinding: 'controller.build'
|
||||||
|
|
||||||
|
jobTableId: Ember.computed(->
|
||||||
|
if @get('required')
|
||||||
|
'jobs'
|
||||||
|
else
|
||||||
|
'allowed_failure_jobs'
|
||||||
|
)
|
||||||
|
|
||||||
JobsItemView: Travis.View.extend
|
JobsItemView: Travis.View.extend
|
||||||
tagName: 'tr'
|
tagName: 'tr'
|
||||||
classNameBindings: ['color']
|
classNameBindings: ['color']
|
||||||
|
|
|
@ -37,12 +37,12 @@ Travis.reopen
|
||||||
@lineSelector?.willDestroy()
|
@lineSelector?.willDestroy()
|
||||||
|
|
||||||
versionDidChange: (->
|
versionDidChange: (->
|
||||||
@rerender() if @get('state') == 'inDOM'
|
@rerender() if @get('_state') == 'inDOM'
|
||||||
).observes('log.version')
|
).observes('log.version')
|
||||||
|
|
||||||
logDidChange: (->
|
logDidChange: (->
|
||||||
console.log 'log view: log did change: rerender' if Log.DEBUG
|
console.log 'log view: log did change: rerender' if Log.DEBUG
|
||||||
@rerender() if @get('state') == 'inDOM'
|
@rerender() if @get('_state') == 'inDOM'
|
||||||
).observes('log')
|
).observes('log')
|
||||||
|
|
||||||
createEngine: ->
|
createEngine: ->
|
||||||
|
|
|
@ -21,9 +21,9 @@ Travis.reopen
|
||||||
# TODO: look into fixing it in more general way
|
# TODO: look into fixing it in more general way
|
||||||
Ember.run.schedule('afterRender', this, ->
|
Ember.run.schedule('afterRender', this, ->
|
||||||
pane = Ember.get('_outlets.pane')
|
pane = Ember.get('_outlets.pane')
|
||||||
if @get('controller.repo.isLoaded') && @state == 'inDOM' &&
|
if @get('controller.repo.isLoaded') && @_state == 'inDOM' &&
|
||||||
@get('controller.repo.lastBuild') &&
|
@get('controller.repo.lastBuild') &&
|
||||||
@get('controller.tab') == 'current' && (!pane || pane.state == 'destroyed')
|
@get('controller.tab') == 'current' && (!pane || pane._state == 'destroyed')
|
||||||
view = @get('controller.container').lookup('view:build')
|
view = @get('controller.container').lookup('view:build')
|
||||||
view.set('controller', @get('controller.container').lookup('controller:build'))
|
view.set('controller', @get('controller.container').lookup('controller:build'))
|
||||||
Ember.run.next =>
|
Ember.run.next =>
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
// https://gist.github.com/2018185
|
|
||||||
// For reference: https://github.com/wagenet/ember.js/blob/ac66dcb8a1cbe91d736074441f853e0da474ee6e/packages/ember-handlebars/lib/views/bound_property_view.js
|
|
||||||
var BoundHelperView = Ember.View.extend(Ember._Metamorph, {
|
|
||||||
|
|
||||||
context: null,
|
|
||||||
options: null,
|
|
||||||
property: null,
|
|
||||||
// paths of the property that are also observed
|
|
||||||
propertyPaths: [],
|
|
||||||
|
|
||||||
value: Ember.K,
|
|
||||||
|
|
||||||
valueForRender: function() {
|
|
||||||
var value = this.value(Ember.get(this.context, this.property), this.options);
|
|
||||||
if (this.options.escaped) { value = Handlebars.Utils.escapeExpression(value); }
|
|
||||||
return value;
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function(buffer) {
|
|
||||||
buffer.push(this.valueForRender());
|
|
||||||
},
|
|
||||||
|
|
||||||
valueDidChange: function() {
|
|
||||||
if (this.morph.isRemoved()) { return; }
|
|
||||||
this.morph.html(this.valueForRender());
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement: function() {
|
|
||||||
this.valueDidChange();
|
|
||||||
},
|
|
||||||
|
|
||||||
init: function() {
|
|
||||||
this._super();
|
|
||||||
Ember.addObserver(this.context, this.property, this, 'valueDidChange');
|
|
||||||
this.get('propertyPaths').forEach(function(propName) {
|
|
||||||
Ember.addObserver(this.context, this.property + '.' + propName, this, 'valueDidChange');
|
|
||||||
}, this);
|
|
||||||
},
|
|
||||||
|
|
||||||
destroy: function() {
|
|
||||||
Ember.removeObserver(this.context, this.property, this, 'valueDidChange');
|
|
||||||
this.get('propertyPaths').forEach(function(propName) {
|
|
||||||
this.context.removeObserver(this.property + '.' + propName, this, 'valueDidChange');
|
|
||||||
}, this);
|
|
||||||
this._super();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
Ember.registerBoundHelper = function(name, func) {
|
|
||||||
var propertyPaths = Array.prototype.slice.call(arguments, 2);
|
|
||||||
Ember.Handlebars.registerHelper(name, function(property, options) {
|
|
||||||
var data = options.data,
|
|
||||||
view = data.view,
|
|
||||||
ctx = this;
|
|
||||||
|
|
||||||
var bindView = view.createChildView(BoundHelperView, {
|
|
||||||
property: property,
|
|
||||||
propertyPaths: propertyPaths,
|
|
||||||
context: ctx,
|
|
||||||
options: options.hash,
|
|
||||||
value: func
|
|
||||||
});
|
|
||||||
|
|
||||||
view.appendChild(bindView);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ Travis.LogChunks = Em.ArrayProxy.extend
|
||||||
if part.final
|
if part.final
|
||||||
@notifyPropertyChange('final')
|
@notifyPropertyChange('final')
|
||||||
|
|
||||||
Ember.run.once this, ->
|
Ember.run this, ->
|
||||||
@tryFinalizing()
|
Ember.run.once this, ->
|
||||||
@resetTimeout()
|
@tryFinalizing()
|
||||||
|
@resetTimeout()
|
||||||
|
|
|
@ -5,53 +5,56 @@ module "Build page",
|
||||||
Ember.run -> Travis.reset()
|
Ember.run -> Travis.reset()
|
||||||
|
|
||||||
test "displaying information on build page", ->
|
test "displaying information on build page", ->
|
||||||
visit('/travis-ci/travis-core/builds').then ->
|
visit('/travis-ci/travis-core/builds')
|
||||||
visit('/travis-ci/travis-core/builds/1').then ->
|
visit('/travis-ci/travis-core/builds/1')
|
||||||
listsRepos [
|
andThen(->
|
||||||
{ slug: 'travis-ci/travis-hub', build: { number: 4, url: '/travis-ci/travis-hub/builds/4', duration: '1 min', finishedAt: '-' } }
|
listsRepos [
|
||||||
{ slug: 'travis-ci/travis-core', build: { number: 1, url: '/travis-ci/travis-core/builds/1', duration: '30 sec', finishedAt: '3 minutes ago' } }
|
{ slug: 'travis-ci/travis-hub', build: { number: 4, url: '/travis-ci/travis-hub/builds/4', duration: '1 min', finishedAt: '-' } }
|
||||||
{ slug: 'travis-ci/travis-assets', build: { number: 3, url: '/travis-ci/travis-assets/builds/3', duration: '30 sec', finishedAt: 'a day ago' } }
|
{ slug: 'travis-ci/travis-core', build: { number: 1, url: '/travis-ci/travis-core/builds/1', duration: '30 sec', finishedAt: '3 minutes ago' } }
|
||||||
|
{ slug: 'travis-ci/travis-assets', build: { number: 3, url: '/travis-ci/travis-assets/builds/3', duration: '30 sec', finishedAt: 'a day ago' } }
|
||||||
|
]
|
||||||
|
|
||||||
|
displaysRepository
|
||||||
|
href: '/travis-ci/travis-core'
|
||||||
|
|
||||||
|
displaysSummary
|
||||||
|
type: 'build'
|
||||||
|
id: 1
|
||||||
|
repo: 'travis-ci/travis-core'
|
||||||
|
commit: '1234567'
|
||||||
|
branch: 'master'
|
||||||
|
compare: '0123456..1234567'
|
||||||
|
finishedAt: '3 minutes ago'
|
||||||
|
duration: '30 sec'
|
||||||
|
message: 'commit message 1'
|
||||||
|
|
||||||
|
displaysSummaryGravatars
|
||||||
|
authorEmail: 'author@email.com'
|
||||||
|
committerEmail: 'committer@email.com'
|
||||||
|
|
||||||
|
|
||||||
|
displaysTabs
|
||||||
|
current: { href: '/travis-ci/travis-core' }
|
||||||
|
builds: { href: '/travis-ci/travis-core/builds' }
|
||||||
|
build: { href: '/travis-ci/travis-core/builds/1', active: true }
|
||||||
|
job: { hidden: true }
|
||||||
|
|
||||||
|
listsJobs
|
||||||
|
table: '#jobs'
|
||||||
|
headers: ['Job', 'Duration', 'Finished', 'Ruby']
|
||||||
|
jobs: [
|
||||||
|
{ color: 'green', id: 1, number: '1.1', repo: 'travis-ci/travis-core', finishedAt: '3 minutes ago', duration: '30 sec', rvm: 'rbx' }
|
||||||
|
{ color: 'red', id: 2, number: '1.2', repo: 'travis-ci/travis-core', finishedAt: '2 minutes ago', duration: '40 sec', rvm: '1.9.3' }
|
||||||
]
|
]
|
||||||
|
|
||||||
displaysRepository
|
listsJobs
|
||||||
href: '/travis-ci/travis-core'
|
table: '#allowed_failure_jobs'
|
||||||
|
headers: ['Job', 'Duration', 'Finished', 'Ruby']
|
||||||
|
jobs: [
|
||||||
|
{ color: '', id: 3, number: '1.3', repo: 'travis-ci/travis-core', finishedAt: '-', duration: '-', rvm: 'jruby' }
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
displaysSummary
|
|
||||||
type: 'build'
|
|
||||||
id: 1
|
|
||||||
repo: 'travis-ci/travis-core'
|
|
||||||
commit: '1234567'
|
|
||||||
branch: 'master'
|
|
||||||
compare: '0123456..1234567'
|
|
||||||
finishedAt: '3 minutes ago'
|
|
||||||
duration: '30 sec'
|
|
||||||
message: 'commit message 1'
|
|
||||||
|
|
||||||
displaysSummaryGravatars
|
|
||||||
authorEmail: 'author@email.com'
|
|
||||||
committerEmail: 'committer@email.com'
|
|
||||||
|
|
||||||
|
|
||||||
displaysTabs
|
|
||||||
current: { href: '/travis-ci/travis-core' }
|
|
||||||
builds: { href: '/travis-ci/travis-core/builds' }
|
|
||||||
build: { href: '/travis-ci/travis-core/builds/1', active: true }
|
|
||||||
job: { hidden: true }
|
|
||||||
|
|
||||||
listsJobs
|
|
||||||
table: '#jobs'
|
|
||||||
headers: ['Job', 'Duration', 'Finished', 'Ruby']
|
|
||||||
jobs: [
|
|
||||||
{ color: 'green', id: 1, number: '1.1', repo: 'travis-ci/travis-core', finishedAt: '3 minutes ago', duration: '30 sec', rvm: 'rbx' }
|
|
||||||
{ color: 'red', id: 2, number: '1.2', repo: 'travis-ci/travis-core', finishedAt: '2 minutes ago', duration: '40 sec', rvm: '1.9.3' }
|
|
||||||
]
|
|
||||||
|
|
||||||
listsJobs
|
|
||||||
table: '#allowed_failure_jobs'
|
|
||||||
headers: ['Job', 'Duration', 'Finished', 'Ruby']
|
|
||||||
jobs: [
|
|
||||||
{ color: '', id: 3, number: '1.3', repo: 'travis-ci/travis-core', finishedAt: '-', duration: '-', rvm: 'jruby' }
|
|
||||||
]
|
|
||||||
|
|
||||||
test "updating current build", ->
|
test "updating current build", ->
|
||||||
visit('/travis-ci/travis-core').then ->
|
visit('/travis-ci/travis-core').then ->
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
module "Router",
|
module "Router",
|
||||||
setup: ->
|
|
||||||
Ember.run -> Travis.advanceReadiness()
|
|
||||||
teardown: ->
|
teardown: ->
|
||||||
Ember.run -> Travis.reset()
|
Ember.run -> Travis.reset()
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
element = $("td.finished_at", row)
|
element = $("td.finished_at", row)
|
||||||
equal(element.text().trim(), job.finishedAt)
|
equal(element.text().trim(), job.finishedAt)
|
||||||
|
|
||||||
element = $("td:nth-child(6)", row)
|
element = $("td:nth-child(4)", row)
|
||||||
equal(element.text().trim(), job.rvm)
|
equal(element.text().trim(), job.rvm)
|
||||||
|
|
||||||
@listsQueuedJobs = (jobs) ->
|
@listsQueuedJobs = (jobs) ->
|
||||||
|
|
|
@ -40,7 +40,7 @@ test "it triggers downloading missing parts if there is a missing part, even tho
|
||||||
, 40
|
, 40
|
||||||
|
|
||||||
test "it triggers downloading next parts if there is no final part", ->
|
test "it triggers downloading next parts if there is no final part", ->
|
||||||
expect(2)
|
expect(4)
|
||||||
stop()
|
stop()
|
||||||
|
|
||||||
callback = (missingNumbers, after) ->
|
callback = (missingNumbers, after) ->
|
||||||
|
@ -58,7 +58,7 @@ test "it triggers downloading next parts if there is no final part", ->
|
||||||
, 35
|
, 35
|
||||||
|
|
||||||
test "it triggers downloading all available parts if there is no parts yet", ->
|
test "it triggers downloading all available parts if there is no parts yet", ->
|
||||||
expect(1)
|
expect(2)
|
||||||
stop()
|
stop()
|
||||||
|
|
||||||
callback = (missingNumbers, after) ->
|
callback = (missingNumbers, after) ->
|
||||||
|
|
|
@ -158,6 +158,15 @@ Travis.initializer
|
||||||
s = document.getElementsByTagName('script')[0]
|
s = document.getElementsByTagName('script')[0]
|
||||||
s.parentNode.insertBefore(ga, s)
|
s.parentNode.insertBefore(ga, s)
|
||||||
|
|
||||||
|
Travis.initializer
|
||||||
|
name: 'inject-config'
|
||||||
|
|
||||||
|
initialize: (container, application) ->
|
||||||
|
application.register 'config:main', Travis.config, { instantiate: false }
|
||||||
|
|
||||||
|
application.inject('controller', 'config', 'config:main')
|
||||||
|
|
||||||
|
|
||||||
Travis.Router.reopen
|
Travis.Router.reopen
|
||||||
didTransition: ->
|
didTransition: ->
|
||||||
@_super.apply @, arguments
|
@_super.apply @, arguments
|
||||||
|
|
51282
assets/scripts/vendor/ember.js
vendored
51282
assets/scripts/vendor/ember.js
vendored
File diff suppressed because it is too large
Load Diff
49584
assets/scripts/vendor/ember.prod.js
vendored
49584
assets/scripts/vendor/ember.prod.js
vendored
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta rel="travis.api_endpoint" href="">
|
<meta rel="travis.api_endpoint" href="">
|
||||||
|
<meta rel="travis.source_endpoint" href="https://github.com">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community</title>
|
<title>Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community</title>
|
||||||
<link rel="icon" type="image/png" href="/favicon.ico">
|
<link rel="icon" type="image/png" href="/favicon.ico">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user