Skip to content

Commit 8314db8

Browse files
author
Makoto Inoue
committed
Changed to take Pusher credentials from ENV if Heroku config vars are set
1 parent 5e177d5 commit 8314db8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

app.rb

+9-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
require 'dm-serializer'
88
require 'pusher'
99

10-
Pusher.app_id = '17'
11-
Pusher.key = 'c9f08e8c50f6f0cfb136'
12-
Pusher.secret = '5eeec6ac0f4da8ad248a'
13-
10+
if ENV['PUSHER_APP_ID']
11+
Pusher.app_id = ENV['PUSHER_APP_ID']
12+
Pusher.key = ENV['PUSHER_KEY']
13+
Pusher.secret = ENV['PUSHER_SECRET']
14+
else
15+
Pusher.app_id = '17'
16+
Pusher.key = 'c9f08e8c50f6f0cfb136'
17+
Pusher.secret = '5eeec6ac0f4da8ad248a'
18+
end
1419
PUSHER_CHANNEL = 'retrospectiveapp-' + Sinatra::Application.environment.to_s
1520

1621

0 commit comments

Comments
 (0)