Move instantiating pusher to pusher initializer
This commit is contained in:
parent
165d072d79
commit
c8be0c91e5
|
@ -1,4 +1,9 @@
|
|||
config = ENV.config
|
||||
|
||||
initialize = (container, application) ->
|
||||
if config.pusher.key
|
||||
application.pusher = new Pusher(config.pusher)
|
||||
|
||||
application.register 'pusher:main', application.pusher, { instantiate: false }
|
||||
|
||||
application.inject('route', 'pusher', 'pusher:main')
|
||||
|
|
|
@ -7,9 +7,6 @@ ToTop = Travis.ToTop
|
|||
initialize = (container, application) ->
|
||||
application.slider = new Slider(application.storage)
|
||||
|
||||
if config.pusher.key
|
||||
application.pusher = new Pusher(config.pusher)
|
||||
|
||||
application.tailing = new Tailing($(window), '#tail', '#log')
|
||||
application.toTop = new ToTop($(window), '.to-top', '#log-container')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user