rpush 4.2.0 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +248 -163
  3. data/README.md +103 -17
  4. data/lib/generators/templates/add_gcm.rb +4 -4
  5. data/lib/generators/templates/add_rpush.rb +4 -4
  6. data/lib/generators/templates/rpush.rb +4 -0
  7. data/lib/generators/templates/rpush_3_3_1_updates.rb +2 -2
  8. data/lib/rpush/cli.rb +1 -1
  9. data/lib/rpush/client/active_model.rb +4 -1
  10. data/lib/rpush/client/active_model/adm/data_validator.rb +1 -1
  11. data/lib/rpush/client/active_model/apns/device_token_format_validator.rb +2 -2
  12. data/lib/rpush/client/active_model/apns/notification.rb +9 -1
  13. data/lib/rpush/client/active_model/apns/notification_payload_size_validator.rb +15 -0
  14. data/lib/rpush/client/active_model/apns2/notification.rb +14 -0
  15. data/lib/rpush/client/active_model/gcm/expiry_collapse_key_mutual_inclusion_validator.rb +1 -1
  16. data/lib/rpush/client/active_model/gcm/notification.rb +2 -2
  17. data/lib/rpush/client/active_model/payload_data_size_validator.rb +1 -1
  18. data/lib/rpush/client/active_model/registration_ids_count_validator.rb +1 -1
  19. data/lib/rpush/client/active_model/webpush/app.rb +41 -0
  20. data/lib/rpush/client/active_model/webpush/notification.rb +66 -0
  21. data/lib/rpush/client/active_record.rb +4 -0
  22. data/lib/rpush/client/active_record/apns/active_record_serializable_notification.rb +65 -0
  23. data/lib/rpush/client/active_record/apns/notification.rb +1 -57
  24. data/lib/rpush/client/active_record/apns2/notification.rb +4 -1
  25. data/lib/rpush/client/active_record/apnsp8/notification.rb +1 -0
  26. data/lib/rpush/client/active_record/webpush/app.rb +11 -0
  27. data/lib/rpush/client/active_record/webpush/notification.rb +12 -0
  28. data/lib/rpush/client/redis.rb +3 -0
  29. data/lib/rpush/client/redis/apns2/notification.rb +1 -0
  30. data/lib/rpush/client/redis/apnsp8/notification.rb +2 -0
  31. data/lib/rpush/client/redis/pushy/notification.rb +0 -1
  32. data/lib/rpush/client/redis/webpush/app.rb +15 -0
  33. data/lib/rpush/client/redis/webpush/notification.rb +15 -0
  34. data/lib/rpush/configuration.rb +3 -2
  35. data/lib/rpush/daemon.rb +4 -1
  36. data/lib/rpush/daemon/apns/feedback_receiver.rb +1 -1
  37. data/lib/rpush/daemon/apns2/delivery.rb +13 -2
  38. data/lib/rpush/daemon/apnsp8/delivery.rb +7 -2
  39. data/lib/rpush/daemon/app_runner.rb +1 -1
  40. data/lib/rpush/daemon/batch.rb +12 -5
  41. data/lib/rpush/daemon/delivery.rb +1 -2
  42. data/lib/rpush/daemon/store/active_record/reconnectable.rb +1 -1
  43. data/lib/rpush/daemon/webpush.rb +10 -0
  44. data/lib/rpush/daemon/webpush/delivery.rb +114 -0
  45. data/lib/rpush/logger.rb +1 -0
  46. data/lib/rpush/version.rb +2 -2
  47. data/spec/functional/apns2_spec.rb +97 -2
  48. data/spec/functional/gcm_priority_spec.rb +40 -0
  49. data/spec/functional/webpush_spec.rb +30 -0
  50. data/spec/spec_helper.rb +2 -0
  51. data/spec/support/simplecov_helper.rb +1 -1
  52. data/spec/unit/client/active_record/adm/app_spec.rb +2 -54
  53. data/spec/unit/client/active_record/adm/notification_spec.rb +2 -39
  54. data/spec/unit/client/active_record/apns/app_spec.rb +3 -26
  55. data/spec/unit/client/active_record/apns/feedback_spec.rb +1 -5
  56. data/spec/unit/client/active_record/apns/notification_spec.rb +29 -293
  57. data/spec/unit/client/active_record/apns2/app_spec.rb +4 -0
  58. data/spec/unit/client/active_record/apns2/notification_spec.rb +65 -0
  59. data/spec/unit/client/active_record/apnsp8/notification_spec.rb +28 -0
  60. data/spec/unit/client/active_record/app_spec.rb +1 -26
  61. data/spec/unit/client/active_record/gcm/app_spec.rb +3 -1
  62. data/spec/unit/client/active_record/gcm/notification_spec.rb +6 -88
  63. data/spec/unit/client/active_record/notification_spec.rb +3 -11
  64. data/spec/unit/client/active_record/pushy/app_spec.rb +2 -13
  65. data/spec/unit/client/active_record/pushy/notification_spec.rb +2 -55
  66. data/spec/unit/client/active_record/shared/app.rb +14 -0
  67. data/spec/unit/{notification_shared.rb → client/active_record/shared/notification.rb} +12 -7
  68. data/spec/unit/client/active_record/webpush/app_spec.rb +6 -0
  69. data/spec/unit/client/active_record/webpush/notification_spec.rb +6 -0
  70. data/spec/unit/client/active_record/wns/badge_notification_spec.rb +1 -11
  71. data/spec/unit/client/active_record/wns/raw_notification_spec.rb +3 -12
  72. data/spec/unit/client/active_record/wpns/app_spec.rb +3 -1
  73. data/spec/unit/client/active_record/wpns/notification_spec.rb +2 -17
  74. data/spec/unit/client/redis/adm/app_spec.rb +5 -0
  75. data/spec/unit/client/redis/adm/notification_spec.rb +5 -0
  76. data/spec/unit/client/redis/apns/app_spec.rb +5 -0
  77. data/spec/unit/client/redis/apns/feedback_spec.rb +5 -0
  78. data/spec/unit/client/redis/apns/notification_spec.rb +50 -0
  79. data/spec/unit/client/redis/apns2/app_spec.rb +4 -0
  80. data/spec/unit/client/redis/apns2/notification_spec.rb +50 -0
  81. data/spec/unit/client/redis/apnsp8/notification_spec.rb +29 -0
  82. data/spec/unit/client/redis/app_spec.rb +5 -0
  83. data/spec/unit/client/redis/gcm/app_spec.rb +5 -0
  84. data/spec/unit/client/redis/gcm/notification_spec.rb +5 -0
  85. data/spec/unit/client/redis/notification_spec.rb +5 -0
  86. data/spec/unit/client/redis/pushy/app_spec.rb +5 -0
  87. data/spec/unit/client/redis/pushy/notification_spec.rb +5 -0
  88. data/spec/unit/client/redis/webpush/app_spec.rb +5 -0
  89. data/spec/unit/client/redis/webpush/notification_spec.rb +5 -0
  90. data/spec/unit/client/redis/wns/badge_notification_spec.rb +5 -0
  91. data/spec/unit/client/redis/wns/raw_notification_spec.rb +22 -0
  92. data/spec/unit/client/redis/wpns/app_spec.rb +5 -0
  93. data/spec/unit/client/redis/wpns/notification_spec.rb +5 -0
  94. data/spec/unit/client/shared/adm/app.rb +51 -0
  95. data/spec/unit/client/shared/adm/notification.rb +39 -0
  96. data/spec/unit/client/shared/apns/app.rb +29 -0
  97. data/spec/unit/client/shared/apns/feedback.rb +9 -0
  98. data/spec/unit/client/shared/apns/notification.rb +262 -0
  99. data/spec/unit/client/shared/app.rb +17 -0
  100. data/spec/unit/client/shared/gcm/app.rb +4 -0
  101. data/spec/unit/client/shared/gcm/notification.rb +77 -0
  102. data/spec/unit/client/shared/notification.rb +10 -0
  103. data/spec/unit/client/shared/pushy/app.rb +17 -0
  104. data/spec/unit/client/shared/pushy/notification.rb +55 -0
  105. data/spec/unit/client/shared/webpush/app.rb +33 -0
  106. data/spec/unit/client/shared/webpush/notification.rb +83 -0
  107. data/spec/unit/client/shared/wns/badge_notification.rb +15 -0
  108. data/spec/unit/client/shared/wns/raw_notification.rb +21 -0
  109. data/spec/unit/client/shared/wpns/app.rb +4 -0
  110. data/spec/unit/client/shared/wpns/notification.rb +18 -0
  111. data/spec/unit/daemon/batch_spec.rb +50 -2
  112. data/spec/unit/daemon/delivery_spec.rb +10 -0
  113. data/spec/unit/daemon/pushy/delivery_spec.rb +5 -3
  114. data/spec/unit/daemon/shared/store.rb +312 -0
  115. data/spec/unit/daemon/store/active_record/reconnectable_spec.rb +7 -7
  116. data/spec/unit/daemon/store/active_record_spec.rb +2 -290
  117. data/spec/unit/daemon/store/redis_spec.rb +2 -291
  118. data/spec/unit/daemon/webpush/delivery_spec.rb +144 -0
  119. data/spec/unit_spec_helper.rb +3 -0
  120. metadata +135 -12
  121. data/lib/rpush/client/active_model/apns/binary_notification_validator.rb +0 -16
@@ -0,0 +1,144 @@
1
+ require 'unit_spec_helper'
2
+
3
+ describe Rpush::Daemon::Webpush::Delivery do
4
+ let(:app) { Rpush::Webpush::App.create!(name: 'MyApp', vapid_keypair: VAPID_KEYPAIR) }
5
+
6
+ # Push subscription information as received from a client browser when the
7
+ # user subscribed to push notifications.
8
+ let(:device_reg) {
9
+ { endpoint: 'https://webpush-provider.example.org/push/some-id',
10
+ keys: {'auth' => 'DgN9EBia1o057BdhCOGURA', 'p256dh' => 'BAtxJ--7vHq9IVm8utUB3peJ4lpxRqk1rukCIkVJOomS83QkCnrQ4EyYQsSaCRgy_c8XPytgXxuyAvRJdnTPK4A'} }
11
+ }
12
+
13
+ let(:data) { { message: 'some message' } }
14
+ let(:notification) { Rpush::Webpush::Notification.create!(app: app, registration_ids: [device_reg], data: data) }
15
+ let(:batch) { instance_double('Rpush::Daemon::Batch', notification_processed: nil) }
16
+ let(:response) { instance_double('Net::HTTPResponse', code: response_code, header: response_header, body: response_body) }
17
+ let(:response_code) { 201 }
18
+ let(:response_header) { {} }
19
+ let(:response_body) { nil }
20
+ let(:http) { instance_double('Net::HTTP::Persistent', request: response) }
21
+ let(:logger) { instance_double('Rpush::Logger', error: nil, info: nil, warn: nil, internal_logger: nil) }
22
+ let(:now) { Time.parse('2020-10-13 00:00:00 UTC') }
23
+
24
+ before do
25
+ allow(Rpush).to receive_messages(logger: logger)
26
+ allow(Time).to receive_messages(now: now)
27
+ end
28
+
29
+ subject(:delivery) { described_class.new(app, http, notification, batch) }
30
+
31
+ describe '#perform' do
32
+ shared_examples 'process notification' do
33
+ it 'invoke batch.notification_processed' do
34
+ subject.perform rescue nil
35
+ expect(batch).to have_received(:notification_processed)
36
+ end
37
+ end
38
+
39
+ context 'when response code is 201' do
40
+ before do
41
+ allow(batch).to receive(:mark_delivered)
42
+ Rpush::Daemon.store = Rpush::Daemon::Store.const_get(Rpush.config.client.to_s.camelcase).new
43
+ end
44
+
45
+ it 'marks the notification as delivered' do
46
+ delivery.perform
47
+ expect(batch).to have_received(:mark_delivered).with(notification)
48
+ end
49
+
50
+ it_behaves_like 'process notification'
51
+ end
52
+
53
+ shared_examples 'retry delivery' do |options|
54
+ let(:response_code) { options[:response_code] }
55
+
56
+ shared_examples 'logs' do |log_options|
57
+ let(:deliver_after) { log_options[:deliver_after] }
58
+
59
+ let(:expected_log_message) do
60
+ "[MyApp] Webpush endpoint responded with a #{response_code} error. Notification #{notification.id} will be retried after #{deliver_after} (retry 1)."
61
+ end
62
+
63
+ it 'logs that the notification will be retried' do
64
+ delivery.perform
65
+ expect(logger).to have_received(:info).with(expected_log_message)
66
+ end
67
+ end
68
+
69
+ context 'when Retry-After header is present' do
70
+ let(:response_header) { { 'retry-after' => 10 } }
71
+
72
+ before do
73
+ allow(delivery).to receive(:mark_retryable) do
74
+ notification.deliver_after = now + 10.seconds
75
+ notification.retries += 1
76
+ end
77
+ end
78
+
79
+ it 'retry the notification' do
80
+ delivery.perform
81
+ expect(delivery).to have_received(:mark_retryable).with(notification, now + 10.seconds)
82
+ end
83
+
84
+ it_behaves_like 'logs', deliver_after: '2020-10-13 00:00:10'
85
+ it_behaves_like 'process notification'
86
+ end
87
+
88
+ context 'when Retry-After header is not present' do
89
+ before do
90
+ allow(delivery).to receive(:mark_retryable_exponential) do
91
+ notification.deliver_after = now + 2.seconds
92
+ notification.retries = 1
93
+ end
94
+ end
95
+
96
+ it 'retry the notification' do
97
+ delivery.perform
98
+ expect(delivery).to have_received(:mark_retryable_exponential).with(notification)
99
+ end
100
+
101
+ it_behaves_like 'logs', deliver_after: '2020-10-13 00:00:02'
102
+ it_behaves_like 'process notification'
103
+ end
104
+ end
105
+
106
+ it_behaves_like 'retry delivery', response_code: 429
107
+ it_behaves_like 'retry delivery', response_code: 500
108
+ it_behaves_like 'retry delivery', response_code: 502
109
+ it_behaves_like 'retry delivery', response_code: 503
110
+ it_behaves_like 'retry delivery', response_code: 504
111
+
112
+ context 'when delivery failed' do
113
+ let(:response_code) { 400 }
114
+ let(:fail_message) { 'that was a bad request' }
115
+ before do
116
+ allow(response).to receive(:body) { fail_message }
117
+ allow(batch).to receive(:mark_failed)
118
+ end
119
+
120
+ it 'marks the notification as failed' do
121
+ expect { delivery.perform }.to raise_error(Rpush::DeliveryError)
122
+ expected_message = "Unable to deliver notification #{notification.id}, " \
123
+ "received error 400 (Bad Request: #{fail_message})"
124
+ expect(batch).to have_received(:mark_failed).with(notification, 400, expected_message)
125
+ end
126
+
127
+ it_behaves_like 'process notification'
128
+ end
129
+
130
+ context 'when SocketError raised' do
131
+ before do
132
+ allow(http).to receive(:request) { raise SocketError }
133
+ allow(delivery).to receive(:mark_retryable)
134
+ end
135
+
136
+ it 'retry delivery after 10 seconds' do
137
+ expect { delivery.perform }.to raise_error(SocketError)
138
+ expect(delivery).to have_received(:mark_retryable).with(notification, now + 10.seconds, SocketError)
139
+ end
140
+
141
+ it_behaves_like 'process notification'
142
+ end
143
+ end
144
+ end
@@ -1,6 +1,9 @@
1
1
  require 'spec_helper'
2
2
  require 'rails'
3
3
 
4
+ # load all shared example files
5
+ Dir["./spec/unit/**/shared/**/*.rb"].sort.each { |f| require f }
6
+
4
7
  def unit_example?(metadata)
5
8
  metadata[:file_path] =~ %r{spec/unit}
6
9
  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.2.0
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Leitch
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-13 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -44,14 +44,20 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.14'
47
+ version: '0.18'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 0.18.3
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
55
  - - "~>"
53
56
  - !ruby/object:Gem::Version
54
- version: '0.14'
57
+ version: '0.18'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 0.18.3
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: jwt
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +78,14 @@ dependencies:
72
78
  requirements:
73
79
  - - ">="
74
80
  - !ruby/object:Gem::Version
75
- version: '0'
81
+ version: '5.0'
76
82
  type: :runtime
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - ">="
81
87
  - !ruby/object:Gem::Version
82
- version: '0'
88
+ version: '5.0'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: thor
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -128,6 +134,20 @@ dependencies:
128
134
  - - ">="
129
135
  - !ruby/object:Gem::Version
130
136
  version: '0'
137
+ - !ruby/object:Gem::Dependency
138
+ name: webpush
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '1.0'
144
+ type: :runtime
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: '1.0'
131
151
  - !ruby/object:Gem::Dependency
132
152
  name: rake
133
153
  requirement: !ruby/object:Gem::Requirement
@@ -401,9 +421,9 @@ files:
401
421
  - lib/rpush/client/active_model/adm/data_validator.rb
402
422
  - lib/rpush/client/active_model/adm/notification.rb
403
423
  - lib/rpush/client/active_model/apns/app.rb
404
- - lib/rpush/client/active_model/apns/binary_notification_validator.rb
405
424
  - lib/rpush/client/active_model/apns/device_token_format_validator.rb
406
425
  - lib/rpush/client/active_model/apns/notification.rb
426
+ - lib/rpush/client/active_model/apns/notification_payload_size_validator.rb
407
427
  - lib/rpush/client/active_model/apns2/app.rb
408
428
  - lib/rpush/client/active_model/apns2/notification.rb
409
429
  - lib/rpush/client/active_model/apnsp8/app.rb
@@ -417,6 +437,8 @@ files:
417
437
  - lib/rpush/client/active_model/pushy/notification.rb
418
438
  - lib/rpush/client/active_model/pushy/time_to_live_validator.rb
419
439
  - lib/rpush/client/active_model/registration_ids_count_validator.rb
440
+ - lib/rpush/client/active_model/webpush/app.rb
441
+ - lib/rpush/client/active_model/webpush/notification.rb
420
442
  - lib/rpush/client/active_model/wns/app.rb
421
443
  - lib/rpush/client/active_model/wns/notification.rb
422
444
  - lib/rpush/client/active_model/wpns/app.rb
@@ -424,6 +446,7 @@ files:
424
446
  - lib/rpush/client/active_record.rb
425
447
  - lib/rpush/client/active_record/adm/app.rb
426
448
  - lib/rpush/client/active_record/adm/notification.rb
449
+ - lib/rpush/client/active_record/apns/active_record_serializable_notification.rb
427
450
  - lib/rpush/client/active_record/apns/app.rb
428
451
  - lib/rpush/client/active_record/apns/feedback.rb
429
452
  - lib/rpush/client/active_record/apns/notification.rb
@@ -437,6 +460,8 @@ files:
437
460
  - lib/rpush/client/active_record/notification.rb
438
461
  - lib/rpush/client/active_record/pushy/app.rb
439
462
  - lib/rpush/client/active_record/pushy/notification.rb
463
+ - lib/rpush/client/active_record/webpush/app.rb
464
+ - lib/rpush/client/active_record/webpush/notification.rb
440
465
  - lib/rpush/client/active_record/wns/app.rb
441
466
  - lib/rpush/client/active_record/wns/badge_notification.rb
442
467
  - lib/rpush/client/active_record/wns/notification.rb
@@ -459,6 +484,8 @@ files:
459
484
  - lib/rpush/client/redis/notification.rb
460
485
  - lib/rpush/client/redis/pushy/app.rb
461
486
  - lib/rpush/client/redis/pushy/notification.rb
487
+ - lib/rpush/client/redis/webpush/app.rb
488
+ - lib/rpush/client/redis/webpush/notification.rb
462
489
  - lib/rpush/client/redis/wns/app.rb
463
490
  - lib/rpush/client/redis/wns/badge_notification.rb
464
491
  - lib/rpush/client/redis/wns/notification.rb
@@ -513,6 +540,8 @@ files:
513
540
  - lib/rpush/daemon/string_helpers.rb
514
541
  - lib/rpush/daemon/synchronizer.rb
515
542
  - lib/rpush/daemon/tcp_connection.rb
543
+ - lib/rpush/daemon/webpush.rb
544
+ - lib/rpush/daemon/webpush/delivery.rb
516
545
  - lib/rpush/daemon/wns.rb
517
546
  - lib/rpush/daemon/wns/badge_request.rb
518
547
  - lib/rpush/daemon/wns/delivery.rb
@@ -539,11 +568,13 @@ files:
539
568
  - spec/functional/apns_spec.rb
540
569
  - spec/functional/cli_spec.rb
541
570
  - spec/functional/embed_spec.rb
571
+ - spec/functional/gcm_priority_spec.rb
542
572
  - spec/functional/gcm_spec.rb
543
573
  - spec/functional/new_app_spec.rb
544
574
  - spec/functional/pushy_spec.rb
545
575
  - spec/functional/retry_spec.rb
546
576
  - spec/functional/synchronization_spec.rb
577
+ - spec/functional/webpush_spec.rb
547
578
  - spec/functional/wpns_spec.rb
548
579
  - spec/functional_spec_helper.rb
549
580
  - spec/spec_helper.rb
@@ -560,16 +591,60 @@ files:
560
591
  - spec/unit/client/active_record/apns/app_spec.rb
561
592
  - spec/unit/client/active_record/apns/feedback_spec.rb
562
593
  - spec/unit/client/active_record/apns/notification_spec.rb
594
+ - spec/unit/client/active_record/apns2/app_spec.rb
595
+ - spec/unit/client/active_record/apns2/notification_spec.rb
596
+ - spec/unit/client/active_record/apnsp8/notification_spec.rb
563
597
  - spec/unit/client/active_record/app_spec.rb
564
598
  - spec/unit/client/active_record/gcm/app_spec.rb
565
599
  - spec/unit/client/active_record/gcm/notification_spec.rb
566
600
  - spec/unit/client/active_record/notification_spec.rb
567
601
  - spec/unit/client/active_record/pushy/app_spec.rb
568
602
  - spec/unit/client/active_record/pushy/notification_spec.rb
603
+ - spec/unit/client/active_record/shared/app.rb
604
+ - spec/unit/client/active_record/shared/notification.rb
605
+ - spec/unit/client/active_record/webpush/app_spec.rb
606
+ - spec/unit/client/active_record/webpush/notification_spec.rb
569
607
  - spec/unit/client/active_record/wns/badge_notification_spec.rb
570
608
  - spec/unit/client/active_record/wns/raw_notification_spec.rb
571
609
  - spec/unit/client/active_record/wpns/app_spec.rb
572
610
  - spec/unit/client/active_record/wpns/notification_spec.rb
611
+ - spec/unit/client/redis/adm/app_spec.rb
612
+ - spec/unit/client/redis/adm/notification_spec.rb
613
+ - spec/unit/client/redis/apns/app_spec.rb
614
+ - spec/unit/client/redis/apns/feedback_spec.rb
615
+ - spec/unit/client/redis/apns/notification_spec.rb
616
+ - spec/unit/client/redis/apns2/app_spec.rb
617
+ - spec/unit/client/redis/apns2/notification_spec.rb
618
+ - spec/unit/client/redis/apnsp8/notification_spec.rb
619
+ - spec/unit/client/redis/app_spec.rb
620
+ - spec/unit/client/redis/gcm/app_spec.rb
621
+ - spec/unit/client/redis/gcm/notification_spec.rb
622
+ - spec/unit/client/redis/notification_spec.rb
623
+ - spec/unit/client/redis/pushy/app_spec.rb
624
+ - spec/unit/client/redis/pushy/notification_spec.rb
625
+ - spec/unit/client/redis/webpush/app_spec.rb
626
+ - spec/unit/client/redis/webpush/notification_spec.rb
627
+ - spec/unit/client/redis/wns/badge_notification_spec.rb
628
+ - spec/unit/client/redis/wns/raw_notification_spec.rb
629
+ - spec/unit/client/redis/wpns/app_spec.rb
630
+ - spec/unit/client/redis/wpns/notification_spec.rb
631
+ - spec/unit/client/shared/adm/app.rb
632
+ - spec/unit/client/shared/adm/notification.rb
633
+ - spec/unit/client/shared/apns/app.rb
634
+ - spec/unit/client/shared/apns/feedback.rb
635
+ - spec/unit/client/shared/apns/notification.rb
636
+ - spec/unit/client/shared/app.rb
637
+ - spec/unit/client/shared/gcm/app.rb
638
+ - spec/unit/client/shared/gcm/notification.rb
639
+ - spec/unit/client/shared/notification.rb
640
+ - spec/unit/client/shared/pushy/app.rb
641
+ - spec/unit/client/shared/pushy/notification.rb
642
+ - spec/unit/client/shared/webpush/app.rb
643
+ - spec/unit/client/shared/webpush/notification.rb
644
+ - spec/unit/client/shared/wns/badge_notification.rb
645
+ - spec/unit/client/shared/wns/raw_notification.rb
646
+ - spec/unit/client/shared/wpns/app.rb
647
+ - spec/unit/client/shared/wpns/notification.rb
573
648
  - spec/unit/configuration_spec.rb
574
649
  - spec/unit/daemon/adm/delivery_spec.rb
575
650
  - spec/unit/daemon/apns/certificate_expired_error_spec.rb
@@ -588,11 +663,13 @@ files:
588
663
  - spec/unit/daemon/pushy/delivery_spec.rb
589
664
  - spec/unit/daemon/retryable_error_spec.rb
590
665
  - spec/unit/daemon/service_config_methods_spec.rb
666
+ - spec/unit/daemon/shared/store.rb
591
667
  - spec/unit/daemon/signal_handler_spec.rb
592
668
  - spec/unit/daemon/store/active_record/reconnectable_spec.rb
593
669
  - spec/unit/daemon/store/active_record_spec.rb
594
670
  - spec/unit/daemon/store/redis_spec.rb
595
671
  - spec/unit/daemon/tcp_connection_spec.rb
672
+ - spec/unit/daemon/webpush/delivery_spec.rb
596
673
  - spec/unit/daemon/wns/delivery_spec.rb
597
674
  - spec/unit/daemon/wns/post_request_spec.rb
598
675
  - spec/unit/daemon/wpns/delivery_spec.rb
@@ -601,7 +678,6 @@ files:
601
678
  - spec/unit/deprecation_spec.rb
602
679
  - spec/unit/embed_spec.rb
603
680
  - spec/unit/logger_spec.rb
604
- - spec/unit/notification_shared.rb
605
681
  - spec/unit/plugin_spec.rb
606
682
  - spec/unit/push_spec.rb
607
683
  - spec/unit/reflectable_spec.rb
@@ -634,8 +710,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
634
710
  - !ruby/object:Gem::Version
635
711
  version: '0'
636
712
  requirements: []
637
- rubygems_version: 3.0.4
638
- signing_key:
713
+ rubygems_version: 3.1.4
714
+ signing_key:
639
715
  specification_version: 4
640
716
  summary: The push notification service for Ruby.
641
717
  test_files:
@@ -645,11 +721,13 @@ test_files:
645
721
  - spec/functional/apns_spec.rb
646
722
  - spec/functional/cli_spec.rb
647
723
  - spec/functional/embed_spec.rb
724
+ - spec/functional/gcm_priority_spec.rb
648
725
  - spec/functional/gcm_spec.rb
649
726
  - spec/functional/new_app_spec.rb
650
727
  - spec/functional/pushy_spec.rb
651
728
  - spec/functional/retry_spec.rb
652
729
  - spec/functional/synchronization_spec.rb
730
+ - spec/functional/webpush_spec.rb
653
731
  - spec/functional/wpns_spec.rb
654
732
  - spec/functional_spec_helper.rb
655
733
  - spec/spec_helper.rb
@@ -666,16 +744,60 @@ test_files:
666
744
  - spec/unit/client/active_record/apns/app_spec.rb
667
745
  - spec/unit/client/active_record/apns/feedback_spec.rb
668
746
  - spec/unit/client/active_record/apns/notification_spec.rb
747
+ - spec/unit/client/active_record/apns2/app_spec.rb
748
+ - spec/unit/client/active_record/apns2/notification_spec.rb
749
+ - spec/unit/client/active_record/apnsp8/notification_spec.rb
669
750
  - spec/unit/client/active_record/app_spec.rb
670
751
  - spec/unit/client/active_record/gcm/app_spec.rb
671
752
  - spec/unit/client/active_record/gcm/notification_spec.rb
672
753
  - spec/unit/client/active_record/notification_spec.rb
673
754
  - spec/unit/client/active_record/pushy/app_spec.rb
674
755
  - spec/unit/client/active_record/pushy/notification_spec.rb
756
+ - spec/unit/client/active_record/shared/app.rb
757
+ - spec/unit/client/active_record/shared/notification.rb
758
+ - spec/unit/client/active_record/webpush/app_spec.rb
759
+ - spec/unit/client/active_record/webpush/notification_spec.rb
675
760
  - spec/unit/client/active_record/wns/badge_notification_spec.rb
676
761
  - spec/unit/client/active_record/wns/raw_notification_spec.rb
677
762
  - spec/unit/client/active_record/wpns/app_spec.rb
678
763
  - spec/unit/client/active_record/wpns/notification_spec.rb
764
+ - spec/unit/client/redis/adm/app_spec.rb
765
+ - spec/unit/client/redis/adm/notification_spec.rb
766
+ - spec/unit/client/redis/apns/app_spec.rb
767
+ - spec/unit/client/redis/apns/feedback_spec.rb
768
+ - spec/unit/client/redis/apns/notification_spec.rb
769
+ - spec/unit/client/redis/apns2/app_spec.rb
770
+ - spec/unit/client/redis/apns2/notification_spec.rb
771
+ - spec/unit/client/redis/apnsp8/notification_spec.rb
772
+ - spec/unit/client/redis/app_spec.rb
773
+ - spec/unit/client/redis/gcm/app_spec.rb
774
+ - spec/unit/client/redis/gcm/notification_spec.rb
775
+ - spec/unit/client/redis/notification_spec.rb
776
+ - spec/unit/client/redis/pushy/app_spec.rb
777
+ - spec/unit/client/redis/pushy/notification_spec.rb
778
+ - spec/unit/client/redis/webpush/app_spec.rb
779
+ - spec/unit/client/redis/webpush/notification_spec.rb
780
+ - spec/unit/client/redis/wns/badge_notification_spec.rb
781
+ - spec/unit/client/redis/wns/raw_notification_spec.rb
782
+ - spec/unit/client/redis/wpns/app_spec.rb
783
+ - spec/unit/client/redis/wpns/notification_spec.rb
784
+ - spec/unit/client/shared/adm/app.rb
785
+ - spec/unit/client/shared/adm/notification.rb
786
+ - spec/unit/client/shared/apns/app.rb
787
+ - spec/unit/client/shared/apns/feedback.rb
788
+ - spec/unit/client/shared/apns/notification.rb
789
+ - spec/unit/client/shared/app.rb
790
+ - spec/unit/client/shared/gcm/app.rb
791
+ - spec/unit/client/shared/gcm/notification.rb
792
+ - spec/unit/client/shared/notification.rb
793
+ - spec/unit/client/shared/pushy/app.rb
794
+ - spec/unit/client/shared/pushy/notification.rb
795
+ - spec/unit/client/shared/webpush/app.rb
796
+ - spec/unit/client/shared/webpush/notification.rb
797
+ - spec/unit/client/shared/wns/badge_notification.rb
798
+ - spec/unit/client/shared/wns/raw_notification.rb
799
+ - spec/unit/client/shared/wpns/app.rb
800
+ - spec/unit/client/shared/wpns/notification.rb
679
801
  - spec/unit/configuration_spec.rb
680
802
  - spec/unit/daemon/adm/delivery_spec.rb
681
803
  - spec/unit/daemon/apns/certificate_expired_error_spec.rb
@@ -694,11 +816,13 @@ test_files:
694
816
  - spec/unit/daemon/pushy/delivery_spec.rb
695
817
  - spec/unit/daemon/retryable_error_spec.rb
696
818
  - spec/unit/daemon/service_config_methods_spec.rb
819
+ - spec/unit/daemon/shared/store.rb
697
820
  - spec/unit/daemon/signal_handler_spec.rb
698
821
  - spec/unit/daemon/store/active_record/reconnectable_spec.rb
699
822
  - spec/unit/daemon/store/active_record_spec.rb
700
823
  - spec/unit/daemon/store/redis_spec.rb
701
824
  - spec/unit/daemon/tcp_connection_spec.rb
825
+ - spec/unit/daemon/webpush/delivery_spec.rb
702
826
  - spec/unit/daemon/wns/delivery_spec.rb
703
827
  - spec/unit/daemon/wns/post_request_spec.rb
704
828
  - spec/unit/daemon/wpns/delivery_spec.rb
@@ -707,7 +831,6 @@ test_files:
707
831
  - spec/unit/deprecation_spec.rb
708
832
  - spec/unit/embed_spec.rb
709
833
  - spec/unit/logger_spec.rb
710
- - spec/unit/notification_shared.rb
711
834
  - spec/unit/plugin_spec.rb
712
835
  - spec/unit/push_spec.rb
713
836
  - spec/unit/reflectable_spec.rb