pusher 1.3.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c1e831ac3f0f169a775554ad2ddc6a17aea81a73
4
- data.tar.gz: 7ca020917b73d172417a61b6d9faf73c46deef09
2
+ SHA256:
3
+ metadata.gz: 7959d744c39cb5d96cd4eccba32dc72c288661b5c4013c7e067671e150cfca99
4
+ data.tar.gz: 7ebff63e5c0962778fde1e00245c1194304a7ad6c3c2b0f7303cd41bae405ad6
5
5
  SHA512:
6
- metadata.gz: 0c61c1432ef7d9c72806999f069fd29d30dd7f9444230bfd37a2988a9ab5e6378e43ceded1f40e4323b6825ad3151c5ab5c2e1ec2e8bd698b19c6851592562c6
7
- data.tar.gz: 66fe450f040e212decc89a99b91d12525dace37efa347f612e7bdbc271c9eed0a471427c907345aa09206f26fd2c24fa86f86c5d55518682bbbd9fa5cfdfc408
6
+ metadata.gz: 94532ecd7bce4bf3c4452f44e9b33b39e813addd7b85b17bad3a594cb47f01f5470b379141c2d1a80fd7778ed086c14760a6e80f1791cceffdd2556c88a73d16
7
+ data.tar.gz: 5329924d0af3530d62fed7b0470b9a82db6904eb5c48b29d93ceb7556e4559aa8770f627244687ba8b22595624ea02241172ee5e83272c6adc1567714335512b
@@ -0,0 +1,26 @@
1
+ # Configuration for probot-stale - https://github.com/probot/stale
2
+
3
+ # Number of days of inactivity before an Issue or Pull Request becomes stale
4
+ daysUntilStale: 365
5
+
6
+ # Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7
+ # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8
+ daysUntilClose: 7
9
+
10
+ # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11
+ onlyLabels: []
12
+
13
+ # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14
+ exemptLabels:
15
+ - pinned
16
+ - security
17
+
18
+ # Set to true to ignore issues with an assignee (defaults to false)
19
+ exemptAssignees: true
20
+
21
+ # Comment to post when marking as stale. Set to `false` to disable
22
+ markComment: >
23
+ This issue has been automatically marked as stale because it has not had
24
+ recent activity. It will be closed if no further activity occurs. If you'd
25
+ like this issue to stay open please leave a comment indicating how this issue
26
+ is affecting you. Thankyou.
@@ -1,11 +1,12 @@
1
+ before_install:
2
+ - sudo apt-get -y install libsodium18
3
+
1
4
  language: ruby
2
5
  sudo: false
3
6
  rvm:
4
- - 1.9.3
5
- - 2.0
6
- - 2.1
7
- - 2.2
8
- - 2.3.0
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
9
10
  - jruby
10
11
  - rbx-2
11
12
 
@@ -1,3 +1,34 @@
1
+ 1.4.1 / 2020-10-05
2
+ ==================
3
+
4
+ * Remove rbnacl from dependencies so we don't get errors when it isn't
5
+ required. Thanks @y-yagi!
6
+
7
+ 1.4.0 / 2020-09-29
8
+ ==================
9
+
10
+ * Support for end-to-end encryption.
11
+
12
+ 1.3.3 / 2019-07-02
13
+ ==================
14
+
15
+ * Rewording to clarify "Pusher Channels" or simply "Channels" product name.
16
+
17
+ 1.3.2 / 2018-10-17
18
+ ==================
19
+
20
+ * Return a specific error for "Request Entity Too Large" (body over 10KB).
21
+ * Add a `use_tls` option for SSL (defaults to false).
22
+ * Add a `from_url` client method (in addition to existing `from_env` option).
23
+ * Improved documentation and fixed typos.
24
+ * Add Ruby 2.4 to test matrix.
25
+
26
+ 1.3.1 / 2017-03-15
27
+ ==================
28
+
29
+ * Added missing client batch methods to default client delegations
30
+ * Document raised exception in the `authenticate` method
31
+ * Fixes em-http-request from using v2.5.0 of `addressable` breaking builds.
1
32
 
2
33
  1.3.0 / 2016-08-23
3
34
  ==================
@@ -94,4 +125,3 @@ First release with a changelog !
94
125
 
95
126
  * Bump httpclient to v2.4. See #62 (POODLE SSL)
96
127
  * Fix limited channel count at README.md. Thanks @tricknotes
97
-
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
- Pusher gem
2
- ==========
1
+ # Gem for Pusher Channels
3
2
 
4
- [![Build Status](https://secure.travis-ci.org/pusher/pusher-http-ruby.svg?branch=master)](http://travis-ci.org/pusher/pusher-http-ruby)
3
+ This Gem provides a Ruby interface to [the Pusher HTTP API for Pusher Channels](https://pusher.com/docs/channels/library_auth_reference/rest-api).
5
4
 
6
- ## Installation & Configuration
5
+ [![Build Status](https://secure.travis-ci.org/pusher/pusher-http-ruby.svg?branch=master)](http://travis-ci.org/pusher/pusher-http-ruby) [![Gem Version](https://badge.fury.io/rb/pusher.svg)](https://badge.fury.io/rb/pusher)
7
6
 
8
- Add pusher to your Gemfile, and then run `bundle install`
7
+ ## Installation and Configuration
8
+
9
+ Add `pusher` to your Gemfile, and then run `bundle install`
9
10
 
10
11
  ``` ruby
11
12
  gem 'pusher'
@@ -17,62 +18,60 @@ or install via gem
17
18
  gem install pusher
18
19
  ```
19
20
 
20
- After registering at <http://pusher.com> configure your app with the security credentials.
21
+ After registering at [Pusher](https://dashboard.pusher.com/accounts/sign_up), configure your Channels app with the security credentials.
21
22
 
22
- ### Instantiating a Pusher client
23
+ ### Instantiating a Pusher Channels client
23
24
 
24
- Creating a new Pusher `client` can be done as follows.
25
+ Creating a new Pusher Channels `client` can be done as follows.
25
26
 
26
27
  ``` ruby
27
- pusher_client = Pusher::Client.new(
28
- app_id: 'your-pusher-app-id',
29
- key: 'your-pusher-key',
30
- secret: 'your-pusher-secret'
28
+ require 'pusher'
29
+
30
+ pusher = Pusher::Client.new(
31
+ app_id: 'your-app-id',
32
+ key: 'your-app-key',
33
+ secret: 'your-app-secret',
34
+ cluster: 'your-app-cluster',
35
+ use_tls: true
31
36
  )
32
37
  ```
33
38
 
34
- If you want to set a custom `host` value for your client then you can do so when instantiating a Pusher client like so:
35
-
36
- ``` ruby
37
- pusher_client = Pusher::Client.new(
38
- app_id: 'your-pusher-app-id',
39
- key: 'your-pusher-key',
40
- secret: 'your-pusher-secret',
41
- host: 'your-pusher-host'
42
- )
43
- ```
39
+ The `cluster` value will set the `host` to `api-<cluster>.pusher.com`. The `use_tls` value is optional and defaults to `false`. It will set the `scheme` and `port`. Custom `scheme` and `port` values take precendence over `use_tls`.
44
40
 
45
- If you created your app in a different cluster to the default cluster, you must pass the `cluster` option as follows:
41
+ If you want to set a custom `host` value for your client then you can do so when instantiating a Pusher Channels client like so:
46
42
 
47
43
  ``` ruby
48
- pusher_client = Pusher::Client.new(
49
- app_id: 'your-pusher-app-id',
50
- key: 'your-pusher-key',
51
- secret: 'your-pusher-secret',
52
- cluster: 'your-app-cluster'
44
+ require 'pusher'
45
+
46
+ pusher = Pusher::Client.new(
47
+ app_id: 'your-app-id',
48
+ key: 'your-app-key',
49
+ secret: 'your-app-secret',
50
+ host: 'your-app-host'
53
51
  )
54
52
  ```
55
53
 
56
- This will set the `host` to `api-<cluster>.pusher.com`. If you pass both `host` and `cluster` options, the `host` will take precendence and `cluster` will be ignored.
54
+ If you pass both `host` and `cluster` options, the `host` will take precendence and `cluster` will be ignored.
57
55
 
58
56
  Finally, if you have the configuration set in an `PUSHER_URL` environment
59
57
  variable, you can use:
60
58
 
61
59
  ``` ruby
62
- pusher_client = Pusher::Client.from_env
60
+ pusher = Pusher::Client.from_env
63
61
  ```
64
62
 
65
- ### Global
63
+ ### Global configuration
66
64
 
67
- Configuring Pusher can also be done globally on the Pusher class.
65
+ The library can also be configured globally on the `Pusher` class.
68
66
 
69
67
  ``` ruby
70
- Pusher.app_id = 'your-pusher-app-id'
71
- Pusher.key = 'your-pusher-key'
72
- Pusher.secret = 'your-pusher-secret'
68
+ Pusher.app_id = 'your-app-id'
69
+ Pusher.key = 'your-app-key'
70
+ Pusher.secret = 'your-app-secret'
71
+ Pusher.cluster = 'your-app-cluster'
73
72
  ```
74
73
 
75
- Global configuration will automatically be set from the `PUSHER_URL` environment variable if it exists. This should be in the form `http://KEY:SECRET@api.pusherapp.com/apps/APP_ID`. On Heroku this environment variable will already be set.
74
+ Global configuration will automatically be set from the `PUSHER_URL` environment variable if it exists. This should be in the form `http://KEY:SECRET@HOST/apps/APP_ID`. On Heroku this environment variable will already be set.
76
75
 
77
76
  If you need to make requests via a HTTP proxy then it can be configured
78
77
 
@@ -80,7 +79,8 @@ If you need to make requests via a HTTP proxy then it can be configured
80
79
  Pusher.http_proxy = 'http://(user):(password)@(host):(port)'
81
80
  ```
82
81
 
83
- By default API requests are made over HTTP. HTTPS can be used by setting
82
+ By default API requests are made over HTTP. HTTPS can be used by setting `encrypted` to `true`.
83
+ Issuing this command is going to reset `port` value if it was previously specified.
84
84
 
85
85
  ``` ruby
86
86
  Pusher.encrypted = true
@@ -92,9 +92,9 @@ As of version 0.12, SSL certificates are verified when using the synchronous htt
92
92
  Pusher.default_client.sync_http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
93
93
  ```
94
94
 
95
- ## Interacting with the Pusher service
95
+ ## Interacting with the Channels HTTP API
96
96
 
97
- The Pusher gem contains a number of helpers for interacting with the service. As a general rule, the library adheres to a set of conventions that we have aimed to make universal.
97
+ The `pusher` gem contains a number of helpers for interacting with the API. As a general rule, the library adheres to a set of conventions that we have aimed to make universal.
98
98
 
99
99
  ### Handling errors
100
100
 
@@ -102,7 +102,7 @@ Handle errors by rescuing `Pusher::Error` (all errors are descendants of this er
102
102
 
103
103
  ``` ruby
104
104
  begin
105
- Pusher.trigger('a_channel', 'an_event', :some => 'data')
105
+ pusher.trigger('a_channel', 'an_event', :some => 'data')
106
106
  rescue Pusher::Error => e
107
107
  # (Pusher::AuthenticationError, Pusher::HTTPError, or Pusher::Error)
108
108
  end
@@ -121,14 +121,14 @@ Pusher.logger = Rails.logger
121
121
  An event can be published to one or more channels (limited to 10) in one API call:
122
122
 
123
123
  ``` ruby
124
- Pusher.trigger('channel', 'event', foo: 'bar')
125
- Pusher.trigger(['channel_1', 'channel_2'], 'event_name', foo: 'bar')
124
+ pusher.trigger('channel', 'event', foo: 'bar')
125
+ pusher.trigger(['channel_1', 'channel_2'], 'event_name', foo: 'bar')
126
126
  ```
127
127
 
128
- An optional fourth argument may be used to send additional parameters to the API, for example to [exclude a single connection from receiving the event](http://pusher.com/docs/publisher_api_guide/publisher_excluding_recipients).
128
+ An optional fourth argument may be used to send additional parameters to the API, for example to [exclude a single connection from receiving the event](https://pusher.com/docs/channels/server_api/excluding-event-recipients).
129
129
 
130
130
  ``` ruby
131
- Pusher.trigger('channel', 'event', {foo: 'bar'}, {socket_id: '123.456'})
131
+ pusher.trigger('channel', 'event', {foo: 'bar'}, {socket_id: '123.456'})
132
132
  ```
133
133
 
134
134
  #### Batches
@@ -137,8 +137,8 @@ It's also possible to send multiple events with a single API call (max 10
137
137
  events per call on multi-tenant clusters):
138
138
 
139
139
  ``` ruby
140
- Pusher.trigger_batch([
141
- {channel: 'channel_1', name: 'event_name', data: { foo: 'bar' }}
140
+ pusher.trigger_batch([
141
+ {channel: 'channel_1', name: 'event_name', data: { foo: 'bar' }},
142
142
  {channel: 'channel_1', name: 'event_name', data: { hello: 'world' }}
143
143
  ])
144
144
  ```
@@ -151,69 +151,69 @@ Most examples and documentation will refer to the following syntax for triggerin
151
151
  Pusher['a_channel'].trigger('an_event', :some => 'data')
152
152
  ```
153
153
 
154
- This will continue to work, but has been replaced by `Pusher.trigger` which supports one or multiple channels.
154
+ This will continue to work, but has been replaced by `pusher.trigger` which supports one or multiple channels.
155
155
 
156
- ### Using the Pusher REST API
156
+ ### Getting information about the channels in your Pusher Channels app
157
157
 
158
- This gem provides methods for accessing information from the [Pusher REST API](https://pusher.com/docs/rest_api). The documentation also shows an example of the responses from each of the API endpionts.
158
+ This gem provides methods for accessing information from the [Channels HTTP API](https://pusher.com/docs/channels/library_auth_reference/rest-api). The documentation also shows an example of the responses from each of the API endpoints.
159
159
 
160
160
  The following methods are provided by the gem.
161
161
 
162
- - `Pusher.channel_info('channel_name')` returns information about that channel.
162
+ - `pusher.channel_info('channel_name', {info:"user_count,subscription_count"})` returns a hash describing the state of the channel([docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#get-channels-fetch-info-for-multiple-channels-)).
163
163
 
164
- - `Pusher.channel_users('channel_name')` returns a list of all the users subscribed to the channel.
164
+ - `pusher.channel_users('presence-channel_name')` returns a list of all the users subscribed to the channel (only for Presence Channels) ([docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#get-channels-fetch-info-for-multiple-channels-)).
165
165
 
166
- - `Pusher.channels` returns information about all the channels in your Pusher application.
166
+ - `pusher.channels({filter_by_prefix: 'presence-', info: 'user_count'})` returns a hash of occupied channels (optionally filtered by prefix, f.i. `presence-`), and optionally attributes for these channels ([docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#get-channels-fetch-info-for-multiple-channels-)).
167
167
 
168
168
  ### Asynchronous requests
169
169
 
170
170
  There are two main reasons for using the `_async` methods:
171
171
 
172
- * In a web application where the response from Pusher is not used, but you'd like to avoid a blocking call in the request-response cycle
172
+ * In a web application where the response from the Channels HTTP API is not used, but you'd like to avoid a blocking call in the request-response cycle
173
173
  * Your application is running in an event loop and you need to avoid blocking the reactor
174
174
 
175
175
  Asynchronous calls are supported either by using an event loop (eventmachine, preferred), or via a thread.
176
176
 
177
177
  The following methods are available (in each case the calling interface matches the non-async version):
178
178
 
179
- * `Pusher.get_async`
180
- * `Pusher.post_async`
181
- * `Pusher.trigger_async`
179
+ * `pusher.get_async`
180
+ * `pusher.post_async`
181
+ * `pusher.trigger_async`
182
182
 
183
- It is of course also possible to make calls to pusher via a job queue. This approach is recommended if you're sending a large number of events to pusher.
183
+ It is of course also possible to make calls to the Channels HTTP API via a job queue. This approach is recommended if you're sending a large number of events.
184
184
 
185
- #### With eventmachine
185
+ #### With EventMachine
186
186
 
187
187
  * Add the `em-http-request` gem to your Gemfile (it's not a gem dependency).
188
- * Run the eventmachine reactor (either using `EM.run` or by running inside an evented server such as Thin).
188
+ * Run the EventMachine reactor (either using `EM.run` or by running inside an evented server such as Thin).
189
189
 
190
190
  The `_async` methods return an `EM::Deferrable` which you can bind callbacks to:
191
191
 
192
192
  ``` ruby
193
- Pusher.get_async("/channels").callback { |response|
193
+ pusher.get_async("/channels").callback { |response|
194
194
  # use reponse[:channels]
195
195
  }.errback { |error|
196
196
  # error is an instance of Pusher::Error
197
197
  }
198
198
  ```
199
199
 
200
- A HTTP error or an error response from pusher will cause the errback to be called with an appropriate error object.
200
+ A HTTP error or an error response from Channels will cause the errback to be called with an appropriate error object.
201
201
 
202
- #### Without eventmachine
202
+ #### Without EventMachine
203
203
 
204
- If the eventmachine reactor is not running, async requests will be made using threads (managed by the httpclient gem).
204
+ If the EventMachine reactor is not running, async requests will be made using threads (managed by the httpclient gem).
205
205
 
206
206
  An `HTTPClient::Connection` object is returned immediately which can be [interrogated](http://rubydoc.info/gems/httpclient/HTTPClient/Connection) to discover the status of the request. The usual response checking and processing is not done when the request completes, and frankly this method is most useful when you're not interested in waiting for the response.
207
207
 
208
208
 
209
209
  ## Authenticating subscription requests
210
210
 
211
- It's possible to use the gem to authenticate subscription requests to private or presence channels. The `authenticate` method is available on a channel object for this purpose and returns a JSON object that can be returned to the client that made the request. More information on this authentication scheme can be found in the docs on <http://pusher.com>
211
+ It's possible to use the gem to authenticate subscription requests to private or presence channels. The `authenticate` method is available on a channel object for this purpose and returns a JSON object that can be returned to the client that made the request. More information on this authentication scheme can be found in the docs on <https://pusher.com/docs/channels/server_api/authenticating-users>
212
212
 
213
213
  ### Private channels
214
214
 
215
215
  ``` ruby
216
- Pusher.authenticate('private-my_channel', params[:socket_id])
216
+ pusher.authenticate('private-my_channel', params[:socket_id])
217
217
  ```
218
218
 
219
219
  ### Presence channels
@@ -221,7 +221,7 @@ Pusher.authenticate('private-my_channel', params[:socket_id])
221
221
  These work in a very similar way, but require a unique identifier for the user being authenticated, and optionally some attributes that are provided to clients via presence events:
222
222
 
223
223
  ``` ruby
224
- Pusher.authenticate('presence-my_channel', params[:socket_id],
224
+ pusher.authenticate('presence-my_channel', params[:socket_id],
225
225
  user_id: 'user_id',
226
226
  user_info: {} # optional
227
227
  )
@@ -232,7 +232,7 @@ Pusher.authenticate('presence-my_channel', params[:socket_id],
232
232
  A WebHook object may be created to validate received WebHooks against your app credentials, and to extract events. It should be created with the `Rack::Request` object (available as `request` in Rails controllers or Sinatra handlers for example).
233
233
 
234
234
  ``` ruby
235
- webhook = Pusher.webhook(request)
235
+ webhook = pusher.webhook(request)
236
236
  if webhook.valid?
237
237
  webhook.events.each do |event|
238
238
  case event["name"]
@@ -248,66 +248,53 @@ else
248
248
  end
249
249
  ```
250
250
 
251
- ## Push Notifications (BETA)
251
+ ### End-to-end encryption
252
252
 
253
- Pusher now allows sending native notifications to iOS and Android devices. Check out the [documentation](https://pusher.com/docs/push_notifications) for information on how to set up push notifications on Android and iOS. There is no additional setup required to use it with this library. It works out of the box with the same Pusher instance. All you need are the same pusher credentials. To install the release:
253
+ This library supports [end-to-end encrypted channels](https://pusher.com/docs/channels/using_channels/encrypted-channels). This means that only you and your connected clients will be able to read your messages. Pusher cannot decrypt them. You can enable this feature by following these steps:
254
254
 
255
- ```
256
- $ gem install pusher -v 1.2.0.rc4
257
- ```
255
+ 1. Add the `rbnacl` gem to your Gemfile (it's not a gem dependency).
258
256
 
259
- ### Sending native pushes
257
+ 2. Install [Libsodium](https://github.com/jedisct1/libsodium), which we rely on to do the heavy lifting. [Follow the installation instructions for your platform.](https://github.com/RubyCrypto/rbnacl/wiki/Installing-libsodium)
260
258
 
261
- The native notifications API is hosted at `nativepush-cluster1.pusher.com` and only accepts https requests.
259
+ 3. Encrypted channel subscriptions must be authenticated in the exact same way as private channels. You should therefore [create an authentication endpoint on your server](https://pusher.com/docs/authenticating_users).
262
260
 
263
- You can send pushes by using the `notify` method, either globally or on the instance. The method takes two parameters:
261
+ 4. Next, generate your 32 byte master encryption key, encode it as base64 and pass it to the Pusher constructor.
264
262
 
265
- - `interests`: An Array of strings which represents the interests your devices are subscribed to. These are akin to channels in the DDN with less of an epehemeral nature. Note that currently, you can only publish to, at most, _ten_ interests.
266
- - `data`: The content of the notification represented by a Hash. You must supply either the `gcm` or `apns` key. For a detailed list of the acceptable keys, take a look at the [iOS](https://pusher.com/docs/push_notifications/ios/server) and [Android](https://pusher.com/docs/push_notifications/android/server) docs.
263
+ This is secret and you should never share this with anyone.
264
+ Not even Pusher.
267
265
 
268
- Example:
266
+ ```bash
267
+ openssl rand -base64 32
268
+ ```
269
269
 
270
- ```ruby
271
- data = {
272
- apns: {
273
- aps: {
274
- alert: {
275
- body: 'tada'
276
- }
277
- }
278
- }
279
- }
270
+ ```rb
271
+ pusher = new Pusher::Client.new({
272
+ app_id: 'your-app-id',
273
+ key: 'your-app-key',
274
+ secret: 'your-app-secret',
275
+ cluster: 'your-app-cluster',
276
+ use_tls: true
277
+ encryption_master_key_base64: '<KEY GENERATED BY PREVIOUS COMMAND>',
278
+ });
279
+ ```
280
280
 
281
- pusher.notify(["my-favourite-interest"], data)
282
- ```
281
+ 5. Channels where you wish to use end-to-end encryption should be prefixed with `private-encrypted-`.
283
282
 
284
- ### Errors
285
-
286
- Push notification requests, once submitted to the service are executed asynchronously. To make reporting errors easier, you can supply a `webhook_url` field in the body of the request. This will be used by the service to send a webhook to the supplied URL if there are errors.
287
-
288
- You may also supply a `webhook_level` field in the body, which can either be INFO or DEBUG. It defaults to INFO - where INFO only reports customer facing errors, while DEBUG reports all errors.
289
-
290
- For example:
291
-
292
- ```ruby
293
- data = {
294
- apns: {
295
- aps: {
296
- alert: {
297
- body: "hello"
298
- }
299
- }
300
- },
301
- gcm: {
302
- notification: {
303
- title: "hello",
304
- icon: "icon"
305
- }
306
- },
307
- webhook_url: "http://yolo.com",
308
- webhook_level: "INFO"
309
- }
283
+ 6. Subscribe to these channels in your client, and you're done! You can verify it is working by checking out the debug console on the [https://dashboard.pusher.com/](dashboard) and seeing the scrambled ciphertext.
284
+
285
+ **Important note: This will __not__ encrypt messages on channels that are not prefixed by `private-encrypted-`.**
286
+
287
+ **Limitation**: you cannot trigger a single event on multiple channels in a call to `trigger`, e.g.
288
+
289
+ ```rb
290
+ pusher.trigger(
291
+ ['channel-1', 'private-encrypted-channel-2'],
292
+ 'test_event',
293
+ { message: 'hello world' },
294
+ )
310
295
  ```
311
296
 
312
- **NOTE:** This is currently a BETA feature and there might be minor bugs and issues. Changes to the API will be kept to a minimum, but changes are expected. If you come across any bugs or issues, please do get in touch via [support](support@pusher.com) or create an issue here.
297
+ Rationale: the methods in this library map directly to individual Channels HTTP API requests. If we allowed triggering a single event on multiple channels (some encrypted, some unencrypted), then it would require two API requests: one where the event is encrypted to the encrypted channels, and one where the event is unencrypted for unencrypted channels.
313
298
 
299
+ ## Supported Ruby versions
300
+ 2.4+