Skip to content

Commit 35d2c6f

Browse files
author
Jon Elverkilde
authored
Merge pull request #155 from pusher/indentation
make an example prettier
2 parents 8fbddc2 + 8dba80f commit 35d2c6f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/presence_channels/presence_channels.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
# You can get these variables from http://dashboard.pusher.com
77
pusher = Pusher::Client.new(
88
app_id: 'your-app-id',
9-
key: 'your-app-key',
9+
key: 'your-app-key',
1010
secret: 'your-app-secret',
11-
cluster: 'your-app-cluster'
11+
cluster: 'your-app-cluster'
1212
)
1313

1414
set :public_folder, 'public'
1515

16-
get "/" do
16+
get '/' do
1717
redirect '/presence_channels.html'
1818
end
1919

@@ -29,9 +29,9 @@
2929
user_id: 'example_user',
3030
user_info: {
3131
name: 'example_name',
32-
email: 'example_email'
32+
email: 'example_email'
3333
}
34-
}
34+
}
3535

3636
if cookies[:user_id] == 'example_cookie'
3737
response = pusher.authenticate(params[:channel_name], params[:socket_id], channel_data)
@@ -49,7 +49,7 @@
4949
message: 'hello world'
5050
})
5151
rescue Pusher::Error => e
52-
# (Pusher::AuthenticationError, Pusher::HTTPError, or Pusher::Error)
52+
# For example, Pusher::AuthenticationError, Pusher::HTTPError, or Pusher::Error
5353
end
5454

5555
'Triggered!'

0 commit comments

Comments
 (0)