Move instantiating pusher to pusher initializer

This commit is contained in:
Piotr Sarnacki 2015-01-30 17:16:32 +01:00
parent 165d072d79
commit c8be0c91e5
2 changed files with 5 additions and 3 deletions

View File

@ -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')

View File

@ -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')