Inject config
into controllers.
Avoid deprecations from globals in template.
This commit is contained in:
parent
aa7fab4cc0
commit
e40d8a282f
|
@ -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>
|
||||||
|
@ -68,7 +68,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>
|
||||||
|
|
|
@ -154,6 +154,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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user