rpush 4.2.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +201 -163
- data/lib/rpush/client/active_model/gcm/notification.rb +2 -2
- data/lib/rpush/version.rb +2 -2
- data/spec/functional/gcm_priority_spec.rb +40 -0
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: daf8831c7c441107a793e39486aeb6012a321ba26804a64ebd19f48de9043ec8
|
|
4
|
+
data.tar.gz: 243005ebaf4ccc03e0b7b6a3ca74e7d20dfb703fbe51255c828ce8f780aca18c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 864f79ac67d9907c87fe9a1d9fa5f34fe7f99c9e1df8b03452791f7ee054d3eba7386f65824780b6c7e7985ae704d74778bb1c18c8bd026bb2edd01875fb327b
|
|
7
|
+
data.tar.gz: 2abbf6ed3e8dbe81537dd2107ff77c60d89c3f84879ee391a7eae887b70c1687d58f4ceb0494a2fde5ccf57cde491516de34be553fac0f53c88da49396d7a273
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## Unreleased
|
|
3
|
+
## [Unreleased](https://github.com/rpush/rpush/tree/HEAD)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[Full Changelog](https://github.com/rpush/rpush/compare/v4.2.0...HEAD)
|
|
6
|
+
|
|
7
|
+
**Merged pull requests:**
|
|
8
|
+
|
|
9
|
+
- Test with Ruby 2.7 [\#550](https://github.com/rpush/rpush/pull/550) ([aried3r](https://github.com/aried3r))
|
|
10
|
+
- Fix GCM priority when using Redis [\#549](https://github.com/rpush/rpush/pull/549) ([daniel-nelson](https://github.com/daniel-nelson))
|
|
11
|
+
- Drop support for Rails 4.2 [\#547](https://github.com/rpush/rpush/pull/547) ([aried3r](https://github.com/aried3r))
|
|
6
12
|
|
|
7
13
|
## 4.2.0 (2019-12-13)
|
|
8
14
|
|
|
@@ -178,15 +184,15 @@ When upgrading, don't forget to run `bundle exec rpush init` to get all the late
|
|
|
178
184
|
|
|
179
185
|
#### Fixes
|
|
180
186
|
|
|
181
|
-
|
|
182
|
-
|
|
187
|
+
- Fixes migrations added in 3.0.1 ([#396](https://github.com/rpush/rpush/pull/396) by [@grosser](https://github.com/grosser))
|
|
188
|
+
- Actually run these migrations in the test suite ([#399](https://github.com/rpush/rpush/pull/399) by [@aried3r](https://github.com/aried3r))
|
|
183
189
|
|
|
184
190
|
## 3.0.1 (2017-11-30)
|
|
185
191
|
|
|
186
192
|
#### Enhancements
|
|
187
193
|
|
|
188
|
-
|
|
189
|
-
|
|
194
|
+
- Reduce booleans to true/false, do not allow nil ([#384](https://github.com/rpush/rpush/pull/384)) by [@grosser](https://github.com/grosser)
|
|
195
|
+
- Better error message for error 8 in APNS ([#387](https://github.com/rpush/rpush/pull/387/files)) by [@grosser](https://github.com/grosser)
|
|
190
196
|
|
|
191
197
|
## 3.0.0 (2017-09-15)
|
|
192
198
|
|
|
@@ -194,7 +200,7 @@ Same as 3.0.0.rc1 including:
|
|
|
194
200
|
|
|
195
201
|
#### Features
|
|
196
202
|
|
|
197
|
-
|
|
203
|
+
- Added support for latest modis version ([#378](https://github.com/rpush/rpush/pull/378)) by [@milgner](https://github.com/milgner)
|
|
198
204
|
|
|
199
205
|
## 3.0.0.rc1 (2017-08-31)
|
|
200
206
|
|
|
@@ -202,233 +208,265 @@ When upgrading, don't forget to run `bundle exec rpush init` to get all the late
|
|
|
202
208
|
|
|
203
209
|
#### Features
|
|
204
210
|
|
|
205
|
-
|
|
206
|
-
|
|
211
|
+
- Added support for APNS `mutable-content` ([#296](https://github.com/rpush/rpush/pull/296) by [@tdtran](https://github.com/tdtran))
|
|
212
|
+
- Added support for HTTP2 base APNS Api ([#315](https://github.com/rpush/rpush/pull/315) by [@soulfly](https://github.com/soulfly) and [@Nattfodd](https://github.com/Nattfodd))
|
|
207
213
|
|
|
208
214
|
#### Changes
|
|
209
215
|
|
|
210
|
-
|
|
216
|
+
- **Breaking:** Dropped support for old Rubies and Rails versions. rpush 3.0 only supports Ruby versions 2.2.2 or higher and
|
|
211
217
|
Rails 4.2 or higher. ([#366](https://github.com/rpush/rpush/pull/366) by [@aried3r](https://github.com/aried3r))
|
|
212
|
-
|
|
213
|
-
|
|
218
|
+
- **Breaking:** Dropped MongoDB support because there was no one maintaining it. But we're open to adding it back in. ([#366](https://github.com/rpush/rpush/pull/366) by [@aried3r](https://github.com/aried3r))
|
|
219
|
+
- **Breaking:** Dropped JRuby support. ([#366](https://github.com/rpush/rpush/pull/366) by [@aried3r](https://github.com/aried3r))
|
|
214
220
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
221
|
+
- Make synchronizer aware of GCM and WNS apps ([#254](https://github.com/rpush/rpush/pull/254) by [@wouterh](https://github.com/wouterh))
|
|
222
|
+
- Precise after init commit msg ([#266](https://github.com/rpush/rpush/pull/266) by [@azranel](https://github.com/azranel))
|
|
223
|
+
- Use new GCM endpoint ([#303](https://github.com/rpush/rpush/pull/303) by [@aried3r](https://github.com/aried3r))
|
|
224
|
+
- Remove sound default value ([#320](https://github.com/rpush/rpush/pull/320) by [@amaierhofer](https://github.com/amaierhofer))
|
|
219
225
|
|
|
220
226
|
#### Bugfixes
|
|
221
227
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
228
|
+
- ~~~Lock `net-http-persistent` dependency to `< 3`. See also [#306](https://github.com/rpush/rpush/issues/306) for more details. (by [@amaierhofer](https://github.com/amaierhofer))~~~
|
|
229
|
+
- Fix `net-http-persistent` initializer to support version 2.x as well as 3.x. ([#309](https://github.com/rpush/rpush/pull/309) by [@amirmujkic](https://github.com/amirmujkic))
|
|
230
|
+
- Fixed Rpush::ApnsFeedback being run on every application type when using Redis. ([#318](https://github.com/rpush/rpush/pull/318) by [@robertasg](https://github.com/robertasg))
|
|
225
231
|
|
|
226
232
|
## 2.7.0 (February 9, 2016)
|
|
227
233
|
|
|
228
234
|
#### Features
|
|
229
235
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
- Added support for GCM priorities. ([#243](https://github.com/rpush/rpush/pull/243) by [@aried3r](https://github.com/aried3r))
|
|
237
|
+
- Added support for GCM notification payload ([#246](https://github.com/rpush/rpush/pull/246) by [@aried3r](https://github.com/aried3r))
|
|
238
|
+
- Added support for Windows Raw Notifications (in JSON form) ([#238](https://github.com/rpush/rpush/pull/238) by [@mseppae](https://github.com/mseppae))
|
|
239
|
+
- Added WNS badge notifications ([#247](https://github.com/rpush/rpush/pull/247) by [@wouterh](https://github.com/wouterh))
|
|
240
|
+
- Added the `launch` argument of WNS toast notifications ([#247](https://github.com/rpush/rpush/pull/247) by [@wouterh](https://github.com/wouterh))
|
|
241
|
+
- Added sound in WNS toast notifications ([#247](https://github.com/rpush/rpush/pull/247) by [@wouterh](https://github.com/wouterh))
|
|
236
242
|
|
|
237
243
|
#### Changes
|
|
238
244
|
|
|
239
|
-
|
|
245
|
+
- Change `alert` type from `string` to `text` in ActiveRecord to allow bigger alert dictionaries. ([#248](https://github.com/rpush/rpush/pull/248) by [@schmidt](https://github.com/schmidt))
|
|
240
246
|
|
|
241
247
|
#### Fixes
|
|
242
248
|
|
|
243
|
-
|
|
244
|
-
|
|
249
|
+
- Fixed issue where setting the `mdm` parameter broke `to_binary` for MDM APNs ([#234](https://github.com/rpush/rpush/pull/234) by [@troya2](https://github.com/troya2))
|
|
250
|
+
- Fixed `as_json` ([#231](https://github.com/rpush/rpush/issues/231) by [@aried3r](https://github.com/aried3r))
|
|
245
251
|
|
|
246
252
|
## 2.6.0 (January 25, 2016)
|
|
247
253
|
|
|
248
254
|
#### Features
|
|
249
255
|
|
|
250
|
-
|
|
256
|
+
- Added support for GCM for iOS' `content_available`. ([#221](https://github.com/rpush/rpush/pull/221))
|
|
251
257
|
|
|
252
258
|
#### Fixes
|
|
253
259
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
260
|
+
- Fix typo in Oracle support. ([#185](https://github.com/rpush/rpush/pull/185))
|
|
261
|
+
- Remove `param` tag from WNS message. ([#190](https://github.com/rpush/rpush/pull/190))
|
|
262
|
+
- Fixed WNS response headers parser. ([#192](https://github.com/rpush/rpush/pull/192))
|
|
263
|
+
- GCM: fixed raise of unhandled errors. ([#193](https://github.com/rpush/rpush/pull/193))
|
|
264
|
+
- Fix issue with custom PID file set in `Rpush.config`. ([#224](https://github.com/rpush/rpush/pull/224), [#225](https://github.com/rpush/rpush/pull/225))
|
|
259
265
|
|
|
260
266
|
## 2.5.0 (July 19, 2015)
|
|
261
|
-
Features:
|
|
262
|
-
* Add 'rpush status' to inspect running Rpush internal status.
|
|
263
|
-
* ActiveRecord logging is no longer redirected to rpush.log when embedded (#138).
|
|
264
|
-
* Support for WNS (Windows RT) (#137).
|
|
265
|
-
* Indexes added to some Mongoid fields (#151).
|
|
266
|
-
* Added support for Oracle.
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
Features:
|
|
269
|
+
|
|
270
|
+
- Add 'rpush status' to inspect running Rpush internal status.
|
|
271
|
+
- ActiveRecord logging is no longer redirected to rpush.log when embedded (#138).
|
|
272
|
+
- Support for WNS (Windows RT) (#137).
|
|
273
|
+
- Indexes added to some Mongoid fields (#151).
|
|
274
|
+
- Added support for Oracle.
|
|
275
|
+
|
|
276
|
+
Bug fixes:
|
|
277
|
+
|
|
278
|
+
- Fix for handling APNs error when using `rpush push` or `Rpush.push`.
|
|
279
|
+
- Fix backwards compatibility issue with ActiveRecord (#144).
|
|
271
280
|
|
|
272
281
|
## 2.4.0 (Feb 18, 2015)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
|
|
283
|
+
Features:
|
|
284
|
+
|
|
285
|
+
- Support for MongoDB (using Mongoid).
|
|
286
|
+
- config.feedback_poll is now deprecated, use config.apns.feedback_receiver.frequency instead.
|
|
287
|
+
- Add config.apns.feedback_receiver.enabled to optionally enable the APNs feedback receiver (#129).
|
|
288
|
+
- Passing configuration options directly to Rpush.embed and Rpush.push is now deprecated.
|
|
289
|
+
|
|
290
|
+
Bug fixes:
|
|
291
|
+
|
|
292
|
+
- Fix setting the log level when using Rails 4+ or without Rails (#124).
|
|
293
|
+
- Fix the possibility for excessive error logging when using APNs (#128).
|
|
294
|
+
- Re-use timestamp when replacing a migration with the same name (#91).
|
|
295
|
+
- Ensure App/Notification type is updated during 2.0 upgrade migration (#102).
|
|
284
296
|
|
|
285
297
|
## 2.3.2 (Jan 30, 2015)
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
298
|
+
|
|
299
|
+
Bug fixes:
|
|
300
|
+
|
|
301
|
+
- Internal sleep mechanism would sometimes no wait for the full duration specified.
|
|
302
|
+
- Rpush.push nows delivers all pending notifications before returning.
|
|
303
|
+
- Require thor >= 0.18.1 (#121).
|
|
290
304
|
|
|
291
305
|
## 2.3.1 (Jan 24, 2015)
|
|
292
|
-
|
|
306
|
+
|
|
307
|
+
- Fix CPU thrashing while waiting for an APNs connection be established (#119).
|
|
293
308
|
|
|
294
309
|
## 2.3.0 (Jan 19, 2015)
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
310
|
+
|
|
311
|
+
- Add 'version' CLI command.
|
|
312
|
+
- Rpush::Wpns::Notification now supports setting the 'data' attribute.
|
|
313
|
+
- ActiveRecord is now directed to the configured Rpush logger (#104).
|
|
314
|
+
- Logs are reopened when the HUP signal is received (#95).
|
|
315
|
+
- Fix setting config.redis_options (#114).
|
|
316
|
+
- Increase frequency of TCP keepalive probes on Linux.
|
|
317
|
+
- APNs notifications are no longer marked as failed when a dropped connection is detected, as it's impossible to know exactly how many actually failed (if any).
|
|
318
|
+
- Notifications are now retried instead of being marked as failed if a TCP/HTTP connection cannot be established.
|
|
303
319
|
|
|
304
320
|
## 2.2.0 (Oct 7, 2014)
|
|
305
|
-
|
|
306
|
-
|
|
321
|
+
|
|
322
|
+
- Numerous command-line fixes, sorry folks!
|
|
323
|
+
- Add 'rpush push' command-line command for one-off use.
|
|
307
324
|
|
|
308
325
|
## 2.1.0 (Oct 4, 2014)
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
326
|
+
|
|
327
|
+
- Bump APNs max payload size to 2048 for iOS 8.
|
|
328
|
+
- Add 'category' for iOS 8.
|
|
329
|
+
- Add url_args for Safari Push Notification Support (#77).
|
|
330
|
+
- Improved command-line interface.
|
|
331
|
+
- Rails integration is now optional.
|
|
332
|
+
- Added log_level config option.
|
|
333
|
+
- log_dir is now deprecated and has no effect, use log_file instead.
|
|
316
334
|
|
|
317
335
|
## 2.0.1 (Sept 13, 2014)
|
|
318
|
-
|
|
319
|
-
|
|
336
|
+
|
|
337
|
+
- Add ssl_certificate_revoked reflection (#68).
|
|
338
|
+
- Fix for Postgis support in 2.0.0 migration (#70).
|
|
320
339
|
|
|
321
340
|
## 2.0.0 (Sept 6, 2014)
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
341
|
+
|
|
342
|
+
- Use APNs enhanced binary format version 2.
|
|
343
|
+
- Support running multiple Rpush processes when using ActiveRecord and Redis.
|
|
344
|
+
- APNs error detection is now performed asynchronously, 'check_for_errors' is therefore deprecated.
|
|
345
|
+
- Deprecated attributes_for_device accessors. Use data instead.
|
|
346
|
+
- Fix signal handling to work with Ruby 2.x. (#40).
|
|
347
|
+
- You no longer need to signal HUP after creating a new app, they will be loaded automatically for you.
|
|
348
|
+
- APNs notifications are now delivered in batches, greatly improving throughput.
|
|
349
|
+
- Signaling HUP now also causes Rpush to immediately check for new notifications.
|
|
350
|
+
- The 'wakeup' config option has been removed.
|
|
351
|
+
- The 'batch_storage_updates' config option has been deprecated, storage backends will now always batch updates where appropriate.
|
|
352
|
+
- The rpush process title updates with number of queued notifications and number of dispatchers.
|
|
353
|
+
- Rpush::Apns::Feedback#app has been renamed to app_id and is now an Integer.
|
|
354
|
+
- An app is restarted when the HUP signal is received if its certificate or environment attribute changed.
|
|
335
355
|
|
|
336
356
|
## 1.0.0 (Feb 9, 2014)
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
357
|
+
|
|
358
|
+
- Renamed to Rpush (from Rapns). Version number reset to 1.0.0.
|
|
359
|
+
- Reduce default batch size to 100.
|
|
360
|
+
- Fix sqlite3 support (#160).
|
|
361
|
+
- Drop support for Ruby 1.8.
|
|
362
|
+
- Improve APNs certificate validation errors (#192) @mattconnolly).
|
|
363
|
+
- Support for Windows Phone notifications (#191) (@matiaslina).
|
|
364
|
+
- Support for Amazon device messaging (#173) (@darrylyip).
|
|
365
|
+
- Add two new GCM reflections: gcm_delivered_to_recipient, gcm_failed_to_recipient (#184) (@jakeonfire).
|
|
366
|
+
- Fix migration issues (#181) (@jcoleman).
|
|
367
|
+
- Add GCM gcm_invalid_registration_id reflection (#171) (@marcrohloff).
|
|
368
|
+
- Feature: wakeup feeder via UDP socket (#164) (@mattconnolly).
|
|
369
|
+
- Fix reflections when using batches (#161).
|
|
370
|
+
- Only perform APNs certificate validation for APNs apps (#133).
|
|
371
|
+
- The deprecated on_apns_feedback has now been removed.
|
|
372
|
+
- The deprecated airbrake_notify config option has been removed.
|
|
373
|
+
- Removed the deprecated ability to set attributes_for_device using mass-assignment.
|
|
374
|
+
- Fixed issue where database connections may not be released from the connection pool.
|
|
354
375
|
|
|
355
376
|
## 3.4.1 (Aug 30, 2013)
|
|
356
|
-
|
|
357
|
-
|
|
377
|
+
|
|
378
|
+
- Silence unintended airbrake_notify deprecation warning (#158).
|
|
379
|
+
- Add :dependent => :destroy to app notifications (#156).
|
|
358
380
|
|
|
359
381
|
## 3.4.0 (Aug 28, 2013)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
382
|
+
|
|
383
|
+
- Rails 4 support.
|
|
384
|
+
- Add apns_certificate_will_expire reflection.
|
|
385
|
+
- Perform storage update in batches where possible, to increase throughput.
|
|
386
|
+
- airbrake_notify is now deprecated, use the Reflection API instead.
|
|
387
|
+
- Fix calling the notification_delivered reflection twice (#149).
|
|
365
388
|
|
|
366
389
|
## 3.3.2 (June 30, 2013)
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
390
|
+
|
|
391
|
+
- Fix Rails 3.0.x compatibility (#138) (@yoppi).
|
|
392
|
+
- Ensure Rails does not set a default value for text columns (#137).
|
|
393
|
+
- Fix error in down action for add_gcm migration (#135) (@alexperto).
|
|
370
394
|
|
|
371
395
|
## 3.3.1 (June 2, 2013)
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
396
|
+
|
|
397
|
+
- Fix compatibility with postgres_ext (#104).
|
|
398
|
+
- Add ability to switch the logger (@maxsz).
|
|
399
|
+
- Do not validate presence of alert, badge or sound - not actually required by the APNs (#129) (@wilg).
|
|
400
|
+
- Catch IOError from an APNs connection. (@maxsz).
|
|
401
|
+
- Allow nested hashes in APNs notification attributes (@perezda).
|
|
377
402
|
|
|
378
403
|
## 3.3.0 (April 21, 2013)
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
404
|
+
|
|
405
|
+
- GCM: collapse_key is no longer required to set expiry (time_to_live).
|
|
406
|
+
- Add reflection for GCM canonical IDs.
|
|
407
|
+
- Add Rpush::Daemon.store to decouple storage backend.
|
|
382
408
|
|
|
383
409
|
## 3.2.0 (Apr 1, 2013)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
410
|
+
|
|
411
|
+
- Rpush.apns_feedback for one time feedback retrieval. Rpush.push no longer checks for feedback (#117, #105).
|
|
412
|
+
- Lazily connect to the APNs only when a notification is to be delivered (#111).
|
|
413
|
+
- Ensure all notifications are sent when using Rpush.push (#107).
|
|
414
|
+
- Fix issue with running Rpush.push more than once in the same process (#106).
|
|
388
415
|
|
|
389
416
|
## 3.1.0 (Jan 26, 2013)
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
417
|
+
|
|
418
|
+
- Rpush.reflect API for fine-grained introspection.
|
|
419
|
+
- Rpush.embed API for embedding Rpush into an existing process.
|
|
420
|
+
- Rpush.push API for using Rpush in scheduled jobs.
|
|
421
|
+
- Fix issue with integration with ActiveScaffold (#98) (@jeffarena).
|
|
422
|
+
- Fix content-available setter for APNs (#95) (@dup2).
|
|
423
|
+
- GCM validation fixes (#96) (@DianthuDia).
|
|
396
424
|
|
|
397
425
|
## 3.0.1 (Dec 16, 2012)
|
|
398
|
-
|
|
426
|
+
|
|
427
|
+
- Fix compatibility with Rails 3.0.x. Fixes #89.
|
|
399
428
|
|
|
400
429
|
## 3.0.0 (Dec 15, 2012)
|
|
401
|
-
* Add support for Google Cloud Messaging.
|
|
402
|
-
* Fix Heroku logging issue.
|
|
403
430
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
431
|
+
- Add support for Google Cloud Messaging.
|
|
432
|
+
- Fix Heroku logging issue.
|
|
433
|
+
|
|
434
|
+
## 2.0.5 (Nov 4, 2012)
|
|
435
|
+
|
|
436
|
+
- Support content-available (#68).
|
|
437
|
+
- Append to log files.
|
|
438
|
+
- Fire a callback when Feedback is received.
|
|
439
|
+
|
|
440
|
+
## 2.0.5.rc1 (Oct 5, 2012)
|
|
441
|
+
|
|
442
|
+
- Release db connections back into the pool after use (#72).
|
|
443
|
+
- Continue to start daemon if a connection cannot be made during startup (#62) (@mattconnolly).
|
|
444
|
+
|
|
445
|
+
## 2.0.4 (Aug 6, 2012)
|
|
446
|
+
|
|
447
|
+
- Don't exit when there aren't any Rpush::App instances, just warn (#55).
|
|
448
|
+
|
|
449
|
+
## 2.0.3 (July 26, 2012)
|
|
450
|
+
|
|
451
|
+
- JRuby support.
|
|
452
|
+
- Explicitly list all attributes instead of calling column_names (#53).
|
|
408
453
|
|
|
409
|
-
## 2.0.
|
|
410
|
-
* Release db connections back into the pool after use (#72).
|
|
411
|
-
* Continue to start daemon if a connection cannot be made during startup (#62) (@mattconnolly).
|
|
454
|
+
## 2.0.2 (July 25, 2012)
|
|
412
455
|
|
|
413
|
-
|
|
414
|
-
|
|
456
|
+
- Support MultiJson < 1.3.0.
|
|
457
|
+
- Make all model attributes accessible.
|
|
415
458
|
|
|
416
|
-
## 2.0.
|
|
417
|
-
* JRuby support.
|
|
418
|
-
* Explicitly list all attributes instead of calling column_names (#53).
|
|
459
|
+
## 2.0.1 (July 7, 2012)
|
|
419
460
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
* Make all model attributes accessible.
|
|
461
|
+
- Fix delivery when using Ruby 1.8.
|
|
462
|
+
- MultiJson support.
|
|
423
463
|
|
|
424
|
-
## 2.0.
|
|
425
|
-
* Fix delivery when using Ruby 1.8.
|
|
426
|
-
* MultiJson support.
|
|
464
|
+
## 2.0.0 (June 19, 2012)
|
|
427
465
|
|
|
428
|
-
|
|
466
|
+
- Support for multiple apps.
|
|
467
|
+
- Hot Updates - add/remove apps without restart.
|
|
468
|
+
- MDM support.
|
|
469
|
+
- Removed rpush.yml in favour of command line options.
|
|
470
|
+
- Started the changelog!
|
|
429
471
|
|
|
430
|
-
|
|
431
|
-
* Hot Updates - add/remove apps without restart.
|
|
432
|
-
* MDM support.
|
|
433
|
-
* Removed rpush.yml in favour of command line options.
|
|
434
|
-
* Started the changelog!
|
|
472
|
+
\* _This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_
|
|
@@ -26,9 +26,9 @@ module Rpush
|
|
|
26
26
|
# I'm not happy about it, but this will have to do until I can take a further look.
|
|
27
27
|
def priority=(priority)
|
|
28
28
|
case priority
|
|
29
|
-
when 'high'
|
|
29
|
+
when 'high', GCM_PRIORITY_HIGH
|
|
30
30
|
super(GCM_PRIORITY_HIGH)
|
|
31
|
-
when 'normal'
|
|
31
|
+
when 'normal', GCM_PRIORITY_NORMAL
|
|
32
32
|
super(GCM_PRIORITY_NORMAL)
|
|
33
33
|
else
|
|
34
34
|
errors.add(:priority, 'must be one of either "normal" or "high"')
|
data/lib/rpush/version.rb
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
require 'functional_spec_helper'
|
|
2
|
+
|
|
3
|
+
describe 'GCM priority' do
|
|
4
|
+
let(:app) { Rpush::Gcm::App.new }
|
|
5
|
+
let(:notification) { Rpush::Gcm::Notification.new }
|
|
6
|
+
let(:hydrated_notification) { Rpush::Gcm::Notification.find(notification.id) }
|
|
7
|
+
let(:response) { double(Net::HTTPResponse, code: 200) }
|
|
8
|
+
let(:http) { double(Net::HTTP::Persistent, request: response, shutdown: nil) }
|
|
9
|
+
let(:priority) { 'normal' }
|
|
10
|
+
|
|
11
|
+
before do
|
|
12
|
+
app.name = 'test'
|
|
13
|
+
app.auth_key = 'abc123'
|
|
14
|
+
app.save!
|
|
15
|
+
|
|
16
|
+
notification.app_id = app.id
|
|
17
|
+
notification.registration_ids = ['foo']
|
|
18
|
+
notification.data = { message: 'test' }
|
|
19
|
+
notification.priority = priority
|
|
20
|
+
notification.save!
|
|
21
|
+
|
|
22
|
+
allow(Net::HTTP::Persistent).to receive_messages(new: http)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'supports normal priority' do
|
|
26
|
+
expect(hydrated_notification.as_json['priority']).to eq('normal')
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
context 'high priority' do
|
|
30
|
+
let(:priority) { 'high' }
|
|
31
|
+
|
|
32
|
+
it 'supports high priority' do
|
|
33
|
+
expect(hydrated_notification.as_json['priority']).to eq('high')
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'does not add an error when receiving expected priority' do
|
|
38
|
+
expect(hydrated_notification.errors.messages[:priority]).to be_empty
|
|
39
|
+
end
|
|
40
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rpush
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 5.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ian Leitch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multi_json
|
|
@@ -72,14 +72,14 @@ dependencies:
|
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
75
|
+
version: '5.0'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
82
|
+
version: '5.0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: thor
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -539,6 +539,7 @@ files:
|
|
|
539
539
|
- spec/functional/apns_spec.rb
|
|
540
540
|
- spec/functional/cli_spec.rb
|
|
541
541
|
- spec/functional/embed_spec.rb
|
|
542
|
+
- spec/functional/gcm_priority_spec.rb
|
|
542
543
|
- spec/functional/gcm_spec.rb
|
|
543
544
|
- spec/functional/new_app_spec.rb
|
|
544
545
|
- spec/functional/pushy_spec.rb
|
|
@@ -634,7 +635,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
634
635
|
- !ruby/object:Gem::Version
|
|
635
636
|
version: '0'
|
|
636
637
|
requirements: []
|
|
637
|
-
rubygems_version: 3.
|
|
638
|
+
rubygems_version: 3.1.2
|
|
638
639
|
signing_key:
|
|
639
640
|
specification_version: 4
|
|
640
641
|
summary: The push notification service for Ruby.
|
|
@@ -645,6 +646,7 @@ test_files:
|
|
|
645
646
|
- spec/functional/apns_spec.rb
|
|
646
647
|
- spec/functional/cli_spec.rb
|
|
647
648
|
- spec/functional/embed_spec.rb
|
|
649
|
+
- spec/functional/gcm_priority_spec.rb
|
|
648
650
|
- spec/functional/gcm_spec.rb
|
|
649
651
|
- spec/functional/new_app_spec.rb
|
|
650
652
|
- spec/functional/pushy_spec.rb
|