Fix build and job configs
This commit is contained in:
parent
211b2723f9
commit
1f3f0559bc
|
@ -10,7 +10,7 @@ require 'travis/model'
|
||||||
branch: DS.attr('string')
|
branch: DS.attr('string')
|
||||||
message: DS.attr('string')
|
message: DS.attr('string')
|
||||||
_duration: DS.attr('number')
|
_duration: DS.attr('number')
|
||||||
_config: DS.attr('string')
|
_config: DS.attr('object')
|
||||||
startedAt: DS.attr('string')
|
startedAt: DS.attr('string')
|
||||||
finishedAt: DS.attr('string')
|
finishedAt: DS.attr('string')
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ require 'travis/model'
|
||||||
# TODO: remove when this issue is fixed
|
# TODO: remove when this issue is fixed
|
||||||
fakeBuild: DS.belongsTo('Travis.Build')
|
fakeBuild: DS.belongsTo('Travis.Build')
|
||||||
|
|
||||||
|
_config: DS.attr('object')
|
||||||
|
|
||||||
log: ( ->
|
log: ( ->
|
||||||
Travis.Log.create(job: this)
|
Travis.Log.create(job: this)
|
||||||
).property()
|
).property()
|
||||||
|
@ -37,8 +39,8 @@ require 'travis/model'
|
||||||
).property('repoSlug', 'repoId')
|
).property('repoSlug', 'repoId')
|
||||||
|
|
||||||
config: (->
|
config: (->
|
||||||
Travis.Helpers.compact(@get('data.config'))
|
Travis.Helpers.compact(@get('_config'))
|
||||||
).property('data.config')
|
).property('_config')
|
||||||
|
|
||||||
isFinished: (->
|
isFinished: (->
|
||||||
@get('state') in ['passed', 'failed', 'errored', 'canceled']
|
@get('state') in ['passed', 'failed', 'errored', 'canceled']
|
||||||
|
|
|
@ -119,6 +119,7 @@ Travis.RestAdapter.map 'Travis.Repo', {
|
||||||
Travis.RestAdapter.map 'Travis.Job', {
|
Travis.RestAdapter.map 'Travis.Job', {
|
||||||
repoId: { key: 'repository_id' }
|
repoId: { key: 'repository_id' }
|
||||||
repo: { key: 'repository_id' }
|
repo: { key: 'repository_id' }
|
||||||
|
_config: { key: 'config' }
|
||||||
}
|
}
|
||||||
|
|
||||||
Travis.RestAdapter.map 'Travis.User', {
|
Travis.RestAdapter.map 'Travis.User', {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user