rpush 5.0.0 → 6.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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +74 -2
  3. data/README.md +104 -18
  4. data/lib/generators/templates/add_adm.rb +1 -1
  5. data/lib/generators/templates/add_alert_is_json_to_rapns_notifications.rb +2 -2
  6. data/lib/generators/templates/add_app_to_rapns.rb +2 -2
  7. data/lib/generators/templates/add_fail_after_to_rpush_notifications.rb +1 -1
  8. data/lib/generators/templates/add_gcm.rb +11 -25
  9. data/lib/generators/templates/add_rpush.rb +33 -83
  10. data/lib/generators/templates/add_wpns.rb +1 -1
  11. data/lib/generators/templates/create_rapns_apps.rb +1 -1
  12. data/lib/generators/templates/create_rapns_feedback.rb +3 -9
  13. data/lib/generators/templates/create_rapns_notifications.rb +3 -9
  14. data/lib/generators/templates/rename_rapns_to_rpush.rb +9 -33
  15. data/lib/generators/templates/rpush.rb +4 -0
  16. data/lib/generators/templates/rpush_2_0_0_updates.rb +5 -17
  17. data/lib/generators/templates/rpush_2_1_0_updates.rb +1 -1
  18. data/lib/generators/templates/rpush_2_6_0_updates.rb +1 -1
  19. data/lib/generators/templates/rpush_2_7_0_updates.rb +1 -1
  20. data/lib/generators/templates/rpush_3_0_0_updates.rb +1 -1
  21. data/lib/generators/templates/rpush_3_0_1_updates.rb +1 -1
  22. data/lib/generators/templates/rpush_3_1_0_add_pushy.rb +1 -1
  23. data/lib/generators/templates/rpush_3_1_1_updates.rb +1 -1
  24. data/lib/generators/templates/rpush_3_2_0_add_apns_p8.rb +1 -1
  25. data/lib/generators/templates/rpush_3_2_4_updates.rb +1 -1
  26. data/lib/generators/templates/rpush_3_3_0_updates.rb +1 -1
  27. data/lib/generators/templates/rpush_3_3_1_updates.rb +3 -3
  28. data/lib/generators/templates/rpush_4_1_0_updates.rb +1 -1
  29. data/lib/generators/templates/rpush_4_1_1_updates.rb +1 -1
  30. data/lib/generators/templates/rpush_4_2_0_updates.rb +1 -1
  31. data/lib/rpush/cli.rb +1 -1
  32. data/lib/rpush/client/active_model.rb +5 -1
  33. data/lib/rpush/client/active_model/adm/data_validator.rb +1 -1
  34. data/lib/rpush/client/active_model/apns/app.rb +1 -17
  35. data/lib/rpush/client/active_model/apns/device_token_format_validator.rb +2 -2
  36. data/lib/rpush/client/active_model/apns/notification.rb +13 -1
  37. data/lib/rpush/client/active_model/apns/notification_payload_size_validator.rb +15 -0
  38. data/lib/rpush/client/active_model/apns2/app.rb +7 -1
  39. data/lib/rpush/client/active_model/apns2/notification.rb +14 -0
  40. data/lib/rpush/client/active_model/certificate_private_key_validator.rb +19 -0
  41. data/lib/rpush/client/active_model/gcm/expiry_collapse_key_mutual_inclusion_validator.rb +1 -1
  42. data/lib/rpush/client/active_model/payload_data_size_validator.rb +1 -1
  43. data/lib/rpush/client/active_model/registration_ids_count_validator.rb +1 -1
  44. data/lib/rpush/client/active_model/webpush/app.rb +41 -0
  45. data/lib/rpush/client/active_model/webpush/notification.rb +66 -0
  46. data/lib/rpush/client/active_record.rb +4 -0
  47. data/lib/rpush/client/active_record/apns/active_record_serializable_notification.rb +65 -0
  48. data/lib/rpush/client/active_record/apns/notification.rb +1 -57
  49. data/lib/rpush/client/active_record/apns2/notification.rb +4 -1
  50. data/lib/rpush/client/active_record/apnsp8/notification.rb +1 -0
  51. data/lib/rpush/client/active_record/webpush/app.rb +11 -0
  52. data/lib/rpush/client/active_record/webpush/notification.rb +12 -0
  53. data/lib/rpush/client/redis.rb +3 -0
  54. data/lib/rpush/client/redis/apns2/notification.rb +1 -0
  55. data/lib/rpush/client/redis/apnsp8/notification.rb +2 -0
  56. data/lib/rpush/client/redis/pushy/notification.rb +0 -1
  57. data/lib/rpush/client/redis/webpush/app.rb +15 -0
  58. data/lib/rpush/client/redis/webpush/notification.rb +15 -0
  59. data/lib/rpush/configuration.rb +3 -2
  60. data/lib/rpush/daemon.rb +4 -1
  61. data/lib/rpush/daemon/apns/feedback_receiver.rb +1 -1
  62. data/lib/rpush/daemon/apns2/delivery.rb +14 -2
  63. data/lib/rpush/daemon/apnsp8/delivery.rb +14 -3
  64. data/lib/rpush/daemon/app_runner.rb +1 -1
  65. data/lib/rpush/daemon/batch.rb +12 -5
  66. data/lib/rpush/daemon/delivery.rb +1 -2
  67. data/lib/rpush/daemon/store/active_record/reconnectable.rb +1 -1
  68. data/lib/rpush/daemon/string_helpers.rb +1 -1
  69. data/lib/rpush/daemon/webpush.rb +10 -0
  70. data/lib/rpush/daemon/webpush/delivery.rb +114 -0
  71. data/lib/rpush/logger.rb +1 -0
  72. data/lib/rpush/version.rb +1 -1
  73. data/spec/functional/apns2_spec.rb +99 -2
  74. data/spec/functional/retry_spec.rb +1 -1
  75. data/spec/functional/webpush_spec.rb +30 -0
  76. data/spec/spec_helper.rb +3 -1
  77. data/spec/support/active_record_setup.rb +4 -3
  78. data/spec/support/config/database.yml +4 -4
  79. data/spec/support/simplecov_helper.rb +2 -2
  80. data/spec/unit/client/active_record/adm/app_spec.rb +2 -54
  81. data/spec/unit/client/active_record/adm/notification_spec.rb +2 -39
  82. data/spec/unit/client/active_record/apns/app_spec.rb +3 -26
  83. data/spec/unit/client/active_record/apns/feedback_spec.rb +1 -5
  84. data/spec/unit/client/active_record/apns/notification_spec.rb +29 -293
  85. data/spec/unit/client/active_record/apns2/app_spec.rb +5 -0
  86. data/spec/unit/client/active_record/apns2/notification_spec.rb +65 -0
  87. data/spec/unit/client/active_record/apnsp8/notification_spec.rb +28 -0
  88. data/spec/unit/client/active_record/app_spec.rb +1 -26
  89. data/spec/unit/client/active_record/gcm/app_spec.rb +3 -1
  90. data/spec/unit/client/active_record/gcm/notification_spec.rb +6 -88
  91. data/spec/unit/client/active_record/notification_spec.rb +3 -11
  92. data/spec/unit/client/active_record/pushy/app_spec.rb +2 -13
  93. data/spec/unit/client/active_record/pushy/notification_spec.rb +2 -55
  94. data/spec/unit/client/active_record/shared/app.rb +14 -0
  95. data/spec/unit/{notification_shared.rb → client/active_record/shared/notification.rb} +12 -7
  96. data/spec/unit/client/active_record/webpush/app_spec.rb +6 -0
  97. data/spec/unit/client/active_record/webpush/notification_spec.rb +6 -0
  98. data/spec/unit/client/active_record/wns/badge_notification_spec.rb +1 -11
  99. data/spec/unit/client/active_record/wns/raw_notification_spec.rb +3 -12
  100. data/spec/unit/client/active_record/wpns/app_spec.rb +3 -1
  101. data/spec/unit/client/active_record/wpns/notification_spec.rb +2 -17
  102. data/spec/unit/client/redis/adm/app_spec.rb +5 -0
  103. data/spec/unit/client/redis/adm/notification_spec.rb +5 -0
  104. data/spec/unit/client/redis/apns/app_spec.rb +5 -0
  105. data/spec/unit/client/redis/apns/feedback_spec.rb +5 -0
  106. data/spec/unit/client/redis/apns/notification_spec.rb +50 -0
  107. data/spec/unit/client/redis/apns2/app_spec.rb +4 -0
  108. data/spec/unit/client/redis/apns2/notification_spec.rb +50 -0
  109. data/spec/unit/client/redis/apnsp8/notification_spec.rb +29 -0
  110. data/spec/unit/client/redis/app_spec.rb +5 -0
  111. data/spec/unit/client/redis/gcm/app_spec.rb +5 -0
  112. data/spec/unit/client/redis/gcm/notification_spec.rb +5 -0
  113. data/spec/unit/client/redis/notification_spec.rb +5 -0
  114. data/spec/unit/client/redis/pushy/app_spec.rb +5 -0
  115. data/spec/unit/client/redis/pushy/notification_spec.rb +5 -0
  116. data/spec/unit/client/redis/webpush/app_spec.rb +5 -0
  117. data/spec/unit/client/redis/webpush/notification_spec.rb +5 -0
  118. data/spec/unit/client/redis/wns/badge_notification_spec.rb +5 -0
  119. data/spec/unit/client/redis/wns/raw_notification_spec.rb +22 -0
  120. data/spec/unit/client/redis/wpns/app_spec.rb +5 -0
  121. data/spec/unit/client/redis/wpns/notification_spec.rb +5 -0
  122. data/spec/unit/client/shared/adm/app.rb +51 -0
  123. data/spec/unit/client/shared/adm/notification.rb +39 -0
  124. data/spec/unit/client/shared/apns/app.rb +29 -0
  125. data/spec/unit/client/shared/apns/feedback.rb +9 -0
  126. data/spec/unit/client/shared/apns/notification.rb +277 -0
  127. data/spec/unit/client/shared/app.rb +17 -0
  128. data/spec/unit/client/shared/gcm/app.rb +4 -0
  129. data/spec/unit/client/shared/gcm/notification.rb +77 -0
  130. data/spec/unit/client/shared/notification.rb +10 -0
  131. data/spec/unit/client/shared/pushy/app.rb +17 -0
  132. data/spec/unit/client/shared/pushy/notification.rb +55 -0
  133. data/spec/unit/client/shared/webpush/app.rb +33 -0
  134. data/spec/unit/client/shared/webpush/notification.rb +83 -0
  135. data/spec/unit/client/shared/wns/badge_notification.rb +15 -0
  136. data/spec/unit/client/shared/wns/raw_notification.rb +21 -0
  137. data/spec/unit/client/shared/wpns/app.rb +4 -0
  138. data/spec/unit/client/shared/wpns/notification.rb +18 -0
  139. data/spec/unit/daemon/apnsp8/delivery_spec.rb +53 -0
  140. data/spec/unit/daemon/batch_spec.rb +50 -2
  141. data/spec/unit/daemon/delivery_spec.rb +10 -0
  142. data/spec/unit/daemon/pushy/delivery_spec.rb +5 -3
  143. data/spec/unit/daemon/shared/store.rb +312 -0
  144. data/spec/unit/daemon/store/active_record/reconnectable_spec.rb +7 -7
  145. data/spec/unit/daemon/store/active_record_spec.rb +2 -290
  146. data/spec/unit/daemon/store/redis_spec.rb +2 -291
  147. data/spec/unit/daemon/webpush/delivery_spec.rb +144 -0
  148. data/spec/unit_spec_helper.rb +3 -0
  149. metadata +137 -13
  150. 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: 5.0.0
4
+ version: 6.0.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: 2020-02-21 00:00:00.000000000 Z
11
+ date: 2021-05-21 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: '5.0'
81
+ version: '5.2'
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: '5.0'
88
+ version: '5.2'
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,13 +421,14 @@ 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
410
430
  - lib/rpush/client/active_model/apnsp8/notification.rb
431
+ - lib/rpush/client/active_model/certificate_private_key_validator.rb
411
432
  - lib/rpush/client/active_model/gcm/app.rb
412
433
  - lib/rpush/client/active_model/gcm/expiry_collapse_key_mutual_inclusion_validator.rb
413
434
  - lib/rpush/client/active_model/gcm/notification.rb
@@ -417,6 +438,8 @@ files:
417
438
  - lib/rpush/client/active_model/pushy/notification.rb
418
439
  - lib/rpush/client/active_model/pushy/time_to_live_validator.rb
419
440
  - lib/rpush/client/active_model/registration_ids_count_validator.rb
441
+ - lib/rpush/client/active_model/webpush/app.rb
442
+ - lib/rpush/client/active_model/webpush/notification.rb
420
443
  - lib/rpush/client/active_model/wns/app.rb
421
444
  - lib/rpush/client/active_model/wns/notification.rb
422
445
  - lib/rpush/client/active_model/wpns/app.rb
@@ -424,6 +447,7 @@ files:
424
447
  - lib/rpush/client/active_record.rb
425
448
  - lib/rpush/client/active_record/adm/app.rb
426
449
  - lib/rpush/client/active_record/adm/notification.rb
450
+ - lib/rpush/client/active_record/apns/active_record_serializable_notification.rb
427
451
  - lib/rpush/client/active_record/apns/app.rb
428
452
  - lib/rpush/client/active_record/apns/feedback.rb
429
453
  - lib/rpush/client/active_record/apns/notification.rb
@@ -437,6 +461,8 @@ files:
437
461
  - lib/rpush/client/active_record/notification.rb
438
462
  - lib/rpush/client/active_record/pushy/app.rb
439
463
  - lib/rpush/client/active_record/pushy/notification.rb
464
+ - lib/rpush/client/active_record/webpush/app.rb
465
+ - lib/rpush/client/active_record/webpush/notification.rb
440
466
  - lib/rpush/client/active_record/wns/app.rb
441
467
  - lib/rpush/client/active_record/wns/badge_notification.rb
442
468
  - lib/rpush/client/active_record/wns/notification.rb
@@ -459,6 +485,8 @@ files:
459
485
  - lib/rpush/client/redis/notification.rb
460
486
  - lib/rpush/client/redis/pushy/app.rb
461
487
  - lib/rpush/client/redis/pushy/notification.rb
488
+ - lib/rpush/client/redis/webpush/app.rb
489
+ - lib/rpush/client/redis/webpush/notification.rb
462
490
  - lib/rpush/client/redis/wns/app.rb
463
491
  - lib/rpush/client/redis/wns/badge_notification.rb
464
492
  - lib/rpush/client/redis/wns/notification.rb
@@ -513,6 +541,8 @@ files:
513
541
  - lib/rpush/daemon/string_helpers.rb
514
542
  - lib/rpush/daemon/synchronizer.rb
515
543
  - lib/rpush/daemon/tcp_connection.rb
544
+ - lib/rpush/daemon/webpush.rb
545
+ - lib/rpush/daemon/webpush/delivery.rb
516
546
  - lib/rpush/daemon/wns.rb
517
547
  - lib/rpush/daemon/wns/badge_request.rb
518
548
  - lib/rpush/daemon/wns/delivery.rb
@@ -545,6 +575,7 @@ files:
545
575
  - spec/functional/pushy_spec.rb
546
576
  - spec/functional/retry_spec.rb
547
577
  - spec/functional/synchronization_spec.rb
578
+ - spec/functional/webpush_spec.rb
548
579
  - spec/functional/wpns_spec.rb
549
580
  - spec/functional_spec_helper.rb
550
581
  - spec/spec_helper.rb
@@ -561,21 +592,66 @@ files:
561
592
  - spec/unit/client/active_record/apns/app_spec.rb
562
593
  - spec/unit/client/active_record/apns/feedback_spec.rb
563
594
  - spec/unit/client/active_record/apns/notification_spec.rb
595
+ - spec/unit/client/active_record/apns2/app_spec.rb
596
+ - spec/unit/client/active_record/apns2/notification_spec.rb
597
+ - spec/unit/client/active_record/apnsp8/notification_spec.rb
564
598
  - spec/unit/client/active_record/app_spec.rb
565
599
  - spec/unit/client/active_record/gcm/app_spec.rb
566
600
  - spec/unit/client/active_record/gcm/notification_spec.rb
567
601
  - spec/unit/client/active_record/notification_spec.rb
568
602
  - spec/unit/client/active_record/pushy/app_spec.rb
569
603
  - spec/unit/client/active_record/pushy/notification_spec.rb
604
+ - spec/unit/client/active_record/shared/app.rb
605
+ - spec/unit/client/active_record/shared/notification.rb
606
+ - spec/unit/client/active_record/webpush/app_spec.rb
607
+ - spec/unit/client/active_record/webpush/notification_spec.rb
570
608
  - spec/unit/client/active_record/wns/badge_notification_spec.rb
571
609
  - spec/unit/client/active_record/wns/raw_notification_spec.rb
572
610
  - spec/unit/client/active_record/wpns/app_spec.rb
573
611
  - spec/unit/client/active_record/wpns/notification_spec.rb
612
+ - spec/unit/client/redis/adm/app_spec.rb
613
+ - spec/unit/client/redis/adm/notification_spec.rb
614
+ - spec/unit/client/redis/apns/app_spec.rb
615
+ - spec/unit/client/redis/apns/feedback_spec.rb
616
+ - spec/unit/client/redis/apns/notification_spec.rb
617
+ - spec/unit/client/redis/apns2/app_spec.rb
618
+ - spec/unit/client/redis/apns2/notification_spec.rb
619
+ - spec/unit/client/redis/apnsp8/notification_spec.rb
620
+ - spec/unit/client/redis/app_spec.rb
621
+ - spec/unit/client/redis/gcm/app_spec.rb
622
+ - spec/unit/client/redis/gcm/notification_spec.rb
623
+ - spec/unit/client/redis/notification_spec.rb
624
+ - spec/unit/client/redis/pushy/app_spec.rb
625
+ - spec/unit/client/redis/pushy/notification_spec.rb
626
+ - spec/unit/client/redis/webpush/app_spec.rb
627
+ - spec/unit/client/redis/webpush/notification_spec.rb
628
+ - spec/unit/client/redis/wns/badge_notification_spec.rb
629
+ - spec/unit/client/redis/wns/raw_notification_spec.rb
630
+ - spec/unit/client/redis/wpns/app_spec.rb
631
+ - spec/unit/client/redis/wpns/notification_spec.rb
632
+ - spec/unit/client/shared/adm/app.rb
633
+ - spec/unit/client/shared/adm/notification.rb
634
+ - spec/unit/client/shared/apns/app.rb
635
+ - spec/unit/client/shared/apns/feedback.rb
636
+ - spec/unit/client/shared/apns/notification.rb
637
+ - spec/unit/client/shared/app.rb
638
+ - spec/unit/client/shared/gcm/app.rb
639
+ - spec/unit/client/shared/gcm/notification.rb
640
+ - spec/unit/client/shared/notification.rb
641
+ - spec/unit/client/shared/pushy/app.rb
642
+ - spec/unit/client/shared/pushy/notification.rb
643
+ - spec/unit/client/shared/webpush/app.rb
644
+ - spec/unit/client/shared/webpush/notification.rb
645
+ - spec/unit/client/shared/wns/badge_notification.rb
646
+ - spec/unit/client/shared/wns/raw_notification.rb
647
+ - spec/unit/client/shared/wpns/app.rb
648
+ - spec/unit/client/shared/wpns/notification.rb
574
649
  - spec/unit/configuration_spec.rb
575
650
  - spec/unit/daemon/adm/delivery_spec.rb
576
651
  - spec/unit/daemon/apns/certificate_expired_error_spec.rb
577
652
  - spec/unit/daemon/apns/delivery_spec.rb
578
653
  - spec/unit/daemon/apns/feedback_receiver_spec.rb
654
+ - spec/unit/daemon/apnsp8/delivery_spec.rb
579
655
  - spec/unit/daemon/app_runner_spec.rb
580
656
  - spec/unit/daemon/batch_spec.rb
581
657
  - spec/unit/daemon/delivery_error_spec.rb
@@ -589,11 +665,13 @@ files:
589
665
  - spec/unit/daemon/pushy/delivery_spec.rb
590
666
  - spec/unit/daemon/retryable_error_spec.rb
591
667
  - spec/unit/daemon/service_config_methods_spec.rb
668
+ - spec/unit/daemon/shared/store.rb
592
669
  - spec/unit/daemon/signal_handler_spec.rb
593
670
  - spec/unit/daemon/store/active_record/reconnectable_spec.rb
594
671
  - spec/unit/daemon/store/active_record_spec.rb
595
672
  - spec/unit/daemon/store/redis_spec.rb
596
673
  - spec/unit/daemon/tcp_connection_spec.rb
674
+ - spec/unit/daemon/webpush/delivery_spec.rb
597
675
  - spec/unit/daemon/wns/delivery_spec.rb
598
676
  - spec/unit/daemon/wns/post_request_spec.rb
599
677
  - spec/unit/daemon/wpns/delivery_spec.rb
@@ -602,7 +680,6 @@ files:
602
680
  - spec/unit/deprecation_spec.rb
603
681
  - spec/unit/embed_spec.rb
604
682
  - spec/unit/logger_spec.rb
605
- - spec/unit/notification_shared.rb
606
683
  - spec/unit/plugin_spec.rb
607
684
  - spec/unit/push_spec.rb
608
685
  - spec/unit/reflectable_spec.rb
@@ -617,7 +694,7 @@ metadata:
617
694
  changelog_uri: https://github.com/rpush/rpush/blob/master/CHANGELOG.md
618
695
  source_code_uri: https://github.com/rpush/rpush
619
696
  post_install_message: |
620
- When upgrading, don't forget to run `bundle exec rpush init` to get all the latest migrations.
697
+ When upgrading Rpush, don't forget to run `bundle exec rpush init` to get all the latest migrations.
621
698
 
622
699
  For details on this specific release, refer to the CHANGELOG.md file.
623
700
  https://github.com/rpush/rpush/blob/master/CHANGELOG.md
@@ -635,8 +712,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
635
712
  - !ruby/object:Gem::Version
636
713
  version: '0'
637
714
  requirements: []
638
- rubygems_version: 3.1.2
639
- signing_key:
715
+ rubygems_version: 3.1.4
716
+ signing_key:
640
717
  specification_version: 4
641
718
  summary: The push notification service for Ruby.
642
719
  test_files:
@@ -652,6 +729,7 @@ test_files:
652
729
  - spec/functional/pushy_spec.rb
653
730
  - spec/functional/retry_spec.rb
654
731
  - spec/functional/synchronization_spec.rb
732
+ - spec/functional/webpush_spec.rb
655
733
  - spec/functional/wpns_spec.rb
656
734
  - spec/functional_spec_helper.rb
657
735
  - spec/spec_helper.rb
@@ -668,21 +746,66 @@ test_files:
668
746
  - spec/unit/client/active_record/apns/app_spec.rb
669
747
  - spec/unit/client/active_record/apns/feedback_spec.rb
670
748
  - spec/unit/client/active_record/apns/notification_spec.rb
749
+ - spec/unit/client/active_record/apns2/app_spec.rb
750
+ - spec/unit/client/active_record/apns2/notification_spec.rb
751
+ - spec/unit/client/active_record/apnsp8/notification_spec.rb
671
752
  - spec/unit/client/active_record/app_spec.rb
672
753
  - spec/unit/client/active_record/gcm/app_spec.rb
673
754
  - spec/unit/client/active_record/gcm/notification_spec.rb
674
755
  - spec/unit/client/active_record/notification_spec.rb
675
756
  - spec/unit/client/active_record/pushy/app_spec.rb
676
757
  - spec/unit/client/active_record/pushy/notification_spec.rb
758
+ - spec/unit/client/active_record/shared/app.rb
759
+ - spec/unit/client/active_record/shared/notification.rb
760
+ - spec/unit/client/active_record/webpush/app_spec.rb
761
+ - spec/unit/client/active_record/webpush/notification_spec.rb
677
762
  - spec/unit/client/active_record/wns/badge_notification_spec.rb
678
763
  - spec/unit/client/active_record/wns/raw_notification_spec.rb
679
764
  - spec/unit/client/active_record/wpns/app_spec.rb
680
765
  - spec/unit/client/active_record/wpns/notification_spec.rb
766
+ - spec/unit/client/redis/adm/app_spec.rb
767
+ - spec/unit/client/redis/adm/notification_spec.rb
768
+ - spec/unit/client/redis/apns/app_spec.rb
769
+ - spec/unit/client/redis/apns/feedback_spec.rb
770
+ - spec/unit/client/redis/apns/notification_spec.rb
771
+ - spec/unit/client/redis/apns2/app_spec.rb
772
+ - spec/unit/client/redis/apns2/notification_spec.rb
773
+ - spec/unit/client/redis/apnsp8/notification_spec.rb
774
+ - spec/unit/client/redis/app_spec.rb
775
+ - spec/unit/client/redis/gcm/app_spec.rb
776
+ - spec/unit/client/redis/gcm/notification_spec.rb
777
+ - spec/unit/client/redis/notification_spec.rb
778
+ - spec/unit/client/redis/pushy/app_spec.rb
779
+ - spec/unit/client/redis/pushy/notification_spec.rb
780
+ - spec/unit/client/redis/webpush/app_spec.rb
781
+ - spec/unit/client/redis/webpush/notification_spec.rb
782
+ - spec/unit/client/redis/wns/badge_notification_spec.rb
783
+ - spec/unit/client/redis/wns/raw_notification_spec.rb
784
+ - spec/unit/client/redis/wpns/app_spec.rb
785
+ - spec/unit/client/redis/wpns/notification_spec.rb
786
+ - spec/unit/client/shared/adm/app.rb
787
+ - spec/unit/client/shared/adm/notification.rb
788
+ - spec/unit/client/shared/apns/app.rb
789
+ - spec/unit/client/shared/apns/feedback.rb
790
+ - spec/unit/client/shared/apns/notification.rb
791
+ - spec/unit/client/shared/app.rb
792
+ - spec/unit/client/shared/gcm/app.rb
793
+ - spec/unit/client/shared/gcm/notification.rb
794
+ - spec/unit/client/shared/notification.rb
795
+ - spec/unit/client/shared/pushy/app.rb
796
+ - spec/unit/client/shared/pushy/notification.rb
797
+ - spec/unit/client/shared/webpush/app.rb
798
+ - spec/unit/client/shared/webpush/notification.rb
799
+ - spec/unit/client/shared/wns/badge_notification.rb
800
+ - spec/unit/client/shared/wns/raw_notification.rb
801
+ - spec/unit/client/shared/wpns/app.rb
802
+ - spec/unit/client/shared/wpns/notification.rb
681
803
  - spec/unit/configuration_spec.rb
682
804
  - spec/unit/daemon/adm/delivery_spec.rb
683
805
  - spec/unit/daemon/apns/certificate_expired_error_spec.rb
684
806
  - spec/unit/daemon/apns/delivery_spec.rb
685
807
  - spec/unit/daemon/apns/feedback_receiver_spec.rb
808
+ - spec/unit/daemon/apnsp8/delivery_spec.rb
686
809
  - spec/unit/daemon/app_runner_spec.rb
687
810
  - spec/unit/daemon/batch_spec.rb
688
811
  - spec/unit/daemon/delivery_error_spec.rb
@@ -696,11 +819,13 @@ test_files:
696
819
  - spec/unit/daemon/pushy/delivery_spec.rb
697
820
  - spec/unit/daemon/retryable_error_spec.rb
698
821
  - spec/unit/daemon/service_config_methods_spec.rb
822
+ - spec/unit/daemon/shared/store.rb
699
823
  - spec/unit/daemon/signal_handler_spec.rb
700
824
  - spec/unit/daemon/store/active_record/reconnectable_spec.rb
701
825
  - spec/unit/daemon/store/active_record_spec.rb
702
826
  - spec/unit/daemon/store/redis_spec.rb
703
827
  - spec/unit/daemon/tcp_connection_spec.rb
828
+ - spec/unit/daemon/webpush/delivery_spec.rb
704
829
  - spec/unit/daemon/wns/delivery_spec.rb
705
830
  - spec/unit/daemon/wns/post_request_spec.rb
706
831
  - spec/unit/daemon/wpns/delivery_spec.rb
@@ -709,7 +834,6 @@ test_files:
709
834
  - spec/unit/deprecation_spec.rb
710
835
  - spec/unit/embed_spec.rb
711
836
  - spec/unit/logger_spec.rb
712
- - spec/unit/notification_shared.rb
713
837
  - spec/unit/plugin_spec.rb
714
838
  - spec/unit/push_spec.rb
715
839
  - spec/unit/reflectable_spec.rb