diff --git a/Gemfile b/Gemfile index 43a5712..6287adb 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'jbuilder', '~> 2.0' gem 'pg', '~> 0.21' gem 'puma' gem 'rails', '5.2.1' -gem 'redis' +gem 'redis', '~> 3.0' gem 'autoprefixer-rails' gem 'bootstrap-sass', '~> 3.3' diff --git a/Gemfile.lock b/Gemfile.lock index 1afadce..a0193ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -143,7 +143,7 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) - redis (4.0.2) + redis (3.3.5) responders (2.4.0) actionpack (>= 4.2.0, < 5.3) railties (>= 4.2.0, < 5.3) @@ -215,7 +215,7 @@ DEPENDENCIES pry-rails puma rails (= 5.2.1) - redis + redis (~> 3.0) sass-rails simple_form spring diff --git a/config/cable.yml b/config/cable.yml index 4ace22b..5427c66 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -6,5 +6,5 @@ test: production: adapter: redis - url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + url: ${REDISTOGO_URL} channel_prefix: polyglot_production diff --git a/config/environments/production.rb b/config/environments/production.rb index 0fb7c9b..c90a719 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -46,8 +46,8 @@ Rails.application.configure do # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil - # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + config.action_cable.url = 'wss://polyglot-173.herokuapp.com/cable' + config.action_cable.allowed_request_origins = [ '*' ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true @@ -94,4 +94,7 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Backwards compatibility + config.assets.js_compressor = Uglifier.new(harmony: true) end