about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-08-18 15:49:51 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-08-18 15:49:51 +0200
commit6deb9f966eb9a280cc16428ba9324ffc15ea60a8 (patch)
treeec3574856544cad4766a6bb93905089d8086db0a /config
parent10ba09f5466fe3d34a5ed78202c35f4e4f9d30e6 (diff)
Live timelines using ActionCable
Diffstat (limited to 'config')
-rw-r--r--config/cable.yml3
-rw-r--r--config/environments/development.rb3
-rw-r--r--config/initializers/assets.rb2
-rw-r--r--config/initializers/rack-mini-profiler.rb8
-rw-r--r--config/routes.rb2
5 files changed, 10 insertions, 8 deletions
diff --git a/config/cable.yml b/config/cable.yml
index b544be4b4..978f721af 100644
--- a/config/cable.yml
+++ b/config/cable.yml
@@ -1,5 +1,6 @@
 development:
-  adapter: async
+  adapter: redis
+  url: redis://localhost:6379/1
 
 test:
   adapter: async
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 1affeca11..ba0af1f57 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -64,3 +64,6 @@ Rails.application.configure do
     Bullet.rails_logger = true
   end
 end
+
+require 'sidekiq/testing'
+Sidekiq::Testing.inline!
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index 01ef3e663..23c5b0b67 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0'
 
 # Precompile additional assets.
 # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-# Rails.application.config.assets.precompile += %w( search.js )
+Rails.application.config.assets.precompile += %w( cable.js )
diff --git a/config/initializers/rack-mini-profiler.rb b/config/initializers/rack-mini-profiler.rb
index b1d45e257..7fd50a9af 100644
--- a/config/initializers/rack-mini-profiler.rb
+++ b/config/initializers/rack-mini-profiler.rb
@@ -1,6 +1,2 @@
-require 'rack-mini-profiler'
-
-Rack::MiniProfilerRails.initialize!(Rails.application)
-
-Rails.application.middleware.delete(Rack::MiniProfiler)
-Rails.application.middleware.insert_after(Rack::Deflater, Rack::MiniProfiler)
+Rails.application.middleware.swap(Rack::Deflater, Rack::MiniProfiler)
+Rails.application.middleware.swap(Rack::MiniProfiler, Rack::Deflater)
diff --git a/config/routes.rb b/config/routes.rb
index e9e662ed0..7b6b1ab3a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,6 +1,8 @@
 require 'sidekiq/web'
 
 Rails.application.routes.draw do
+  mount ActionCable.server => '/cable'
+
   authenticate :user, lambda { |u| u.admin? } do
     mount Sidekiq::Web => '/sidekiq'
   end