Replace pusher with action cable (#178)

closes #43
This commit is contained in:
Pranav Raj S
2019-10-25 01:37:01 +05:30
committed by Sojan Jose
parent c0354364ff
commit f4358d9993
28 changed files with 144 additions and 165 deletions

13
config/cable.yml Normal file
View File

@@ -0,0 +1,13 @@
development:
adapter: async
test:
adapter: test
staging:
adapter: redis
url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %>
production:
adapter: redis
url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %>

View File

@@ -1,6 +0,0 @@
Pusher.app_id = ENV['pusher_app_id']
Pusher.key = ENV['pusher_key']
Pusher.secret = ENV['pusher_secret']
Pusher.encrypted = true
Pusher.logger = Rails.logger
Pusher.cluster = ENV['pusher_cluster']

View File

@@ -17,19 +17,11 @@ environment.loaders.append('audio', {
environment.config.merge({ resolve });
const {
pusher_cluster: cluster,
pusher_key: token,
fb_app_id: fbAppID,
} = process.env;
const { fb_app_id: fbAppID } = process.env;
environment.plugins.prepend(
'DefinePlugin',
new webpack.DefinePlugin({
__PUSHER__: {
token: `"${token}"`,
cluster: `"${cluster}"`,
},
__FB_ID__: `"${fbAppID}"`,
})
);