rpush 4.1.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +254 -162
- data/README.md +57 -16
- data/lib/generators/rpush_migration_generator.rb +2 -0
- data/lib/generators/templates/rpush.rb +4 -0
- data/lib/generators/templates/rpush_4_1_1_updates.rb +9 -0
- data/lib/generators/templates/rpush_4_2_0_updates.rb +10 -0
- data/lib/rpush/apns_feedback.rb +1 -0
- data/lib/rpush/cli.rb +9 -22
- data/lib/rpush/client/active_model.rb +1 -1
- data/lib/rpush/client/active_model/apns/notification.rb +9 -1
- data/lib/rpush/client/active_model/apns/notification_payload_size_validator.rb +15 -0
- data/lib/rpush/client/active_model/apns2/notification.rb +14 -0
- data/lib/rpush/client/active_model/gcm/notification.rb +4 -3
- data/lib/rpush/client/active_model/wns/notification.rb +8 -0
- data/lib/rpush/client/active_record.rb +1 -0
- data/lib/rpush/client/active_record/apns/active_record_serializable_notification.rb +65 -0
- data/lib/rpush/client/active_record/apns/notification.rb +1 -29
- data/lib/rpush/client/active_record/apns2/notification.rb +4 -1
- data/lib/rpush/client/active_record/app.rb +1 -1
- data/lib/rpush/client/active_record/notification.rb +1 -1
- data/lib/rpush/client/redis/apns2/notification.rb +1 -0
- data/lib/rpush/client/redis/app.rb +2 -1
- data/lib/rpush/client/redis/notification.rb +2 -1
- data/lib/rpush/client/redis/pushy/notification.rb +0 -1
- data/lib/rpush/configuration.rb +2 -1
- data/lib/rpush/daemon.rb +2 -2
- data/lib/rpush/daemon/apns/feedback_receiver.rb +2 -1
- data/lib/rpush/daemon/apns2/delivery.rb +6 -1
- data/lib/rpush/daemon/apnsp8/delivery.rb +7 -2
- data/lib/rpush/daemon/app_runner.rb +1 -1
- data/lib/rpush/daemon/batch.rb +12 -5
- data/lib/rpush/daemon/delivery.rb +1 -2
- data/lib/rpush/daemon/dispatcher/apns_http2.rb +4 -2
- data/lib/rpush/daemon/dispatcher/apnsp8_http2.rb +2 -1
- data/lib/rpush/daemon/signal_handler.rb +1 -1
- data/lib/rpush/daemon/store/active_record.rb +1 -1
- data/lib/rpush/daemon/store/active_record/reconnectable.rb +1 -1
- data/lib/rpush/daemon/store/redis.rb +1 -1
- data/lib/rpush/daemon/wns/badge_request.rb +8 -3
- data/lib/rpush/daemon/wns/raw_request.rb +9 -2
- data/lib/rpush/daemon/wns/toast_request.rb +6 -2
- data/lib/rpush/logger.rb +1 -0
- data/lib/rpush/version.rb +2 -2
- data/spec/.rubocop.yml +1 -1
- data/spec/functional/apns2_spec.rb +85 -0
- data/spec/functional/gcm_priority_spec.rb +40 -0
- data/spec/support/active_record_setup.rb +5 -1
- data/spec/support/simplecov_helper.rb +1 -1
- data/spec/unit/apns_feedback_spec.rb +17 -6
- data/spec/unit/client/active_record/adm/app_spec.rb +2 -54
- data/spec/unit/client/active_record/adm/notification_spec.rb +2 -39
- data/spec/unit/client/active_record/apns/app_spec.rb +3 -26
- data/spec/unit/client/active_record/apns/feedback_spec.rb +1 -5
- data/spec/unit/client/active_record/apns/notification_spec.rb +29 -288
- data/spec/unit/client/active_record/apns2/app_spec.rb +4 -0
- data/spec/unit/client/active_record/apns2/notification_spec.rb +65 -0
- data/spec/unit/client/active_record/app_spec.rb +1 -26
- data/spec/unit/client/active_record/gcm/app_spec.rb +3 -1
- data/spec/unit/client/active_record/gcm/notification_spec.rb +6 -83
- data/spec/unit/client/active_record/notification_spec.rb +10 -11
- data/spec/unit/client/active_record/pushy/app_spec.rb +2 -13
- data/spec/unit/client/active_record/pushy/notification_spec.rb +2 -55
- data/spec/unit/client/active_record/shared/app.rb +14 -0
- data/spec/unit/{notification_shared.rb → client/active_record/shared/notification.rb} +12 -7
- data/spec/unit/client/active_record/wns/badge_notification_spec.rb +1 -11
- data/spec/unit/client/active_record/wns/raw_notification_spec.rb +3 -12
- data/spec/unit/client/active_record/wpns/app_spec.rb +3 -1
- data/spec/unit/client/active_record/wpns/notification_spec.rb +2 -17
- data/spec/unit/client/redis/adm/app_spec.rb +5 -0
- data/spec/unit/client/redis/adm/notification_spec.rb +5 -0
- data/spec/unit/client/redis/apns/app_spec.rb +5 -0
- data/spec/unit/client/redis/apns/feedback_spec.rb +5 -0
- data/spec/unit/client/redis/apns/notification_spec.rb +50 -0
- data/spec/unit/client/redis/apns2/app_spec.rb +4 -0
- data/spec/unit/client/redis/apns2/notification_spec.rb +50 -0
- data/spec/unit/client/redis/app_spec.rb +5 -0
- data/spec/unit/client/redis/gcm/app_spec.rb +5 -0
- data/spec/unit/client/redis/gcm/notification_spec.rb +5 -0
- data/spec/unit/client/redis/notification_spec.rb +5 -0
- data/spec/unit/client/redis/pushy/app_spec.rb +5 -0
- data/spec/unit/client/redis/pushy/notification_spec.rb +5 -0
- data/spec/unit/client/redis/wns/badge_notification_spec.rb +5 -0
- data/spec/unit/client/redis/wns/raw_notification_spec.rb +22 -0
- data/spec/unit/client/redis/wpns/app_spec.rb +5 -0
- data/spec/unit/client/redis/wpns/notification_spec.rb +5 -0
- data/spec/unit/client/shared/adm/app.rb +51 -0
- data/spec/unit/client/shared/adm/notification.rb +39 -0
- data/spec/unit/client/shared/apns/app.rb +29 -0
- data/spec/unit/client/shared/apns/feedback.rb +9 -0
- data/spec/unit/client/shared/apns/notification.rb +262 -0
- data/spec/unit/client/shared/app.rb +17 -0
- data/spec/unit/client/shared/gcm/app.rb +4 -0
- data/spec/unit/client/shared/gcm/notification.rb +77 -0
- data/spec/unit/client/shared/notification.rb +10 -0
- data/spec/unit/client/shared/pushy/app.rb +17 -0
- data/spec/unit/client/shared/pushy/notification.rb +55 -0
- data/spec/unit/client/shared/wns/badge_notification.rb +15 -0
- data/spec/unit/client/shared/wns/raw_notification.rb +21 -0
- data/spec/unit/client/shared/wpns/app.rb +4 -0
- data/spec/unit/client/shared/wpns/notification.rb +18 -0
- data/spec/unit/daemon/apns/feedback_receiver_spec.rb +19 -1
- data/spec/unit/daemon/batch_spec.rb +50 -2
- data/spec/unit/daemon/delivery_spec.rb +10 -0
- data/spec/unit/daemon/gcm/delivery_spec.rb +1 -1
- data/spec/unit/daemon/shared/store.rb +312 -0
- data/spec/unit/daemon/store/active_record/reconnectable_spec.rb +7 -7
- data/spec/unit/daemon/store/active_record_spec.rb +7 -295
- data/spec/unit/daemon/store/redis_spec.rb +4 -293
- data/spec/unit/daemon/wns/post_request_spec.rb +64 -0
- data/spec/unit_spec_helper.rb +3 -0
- metadata +114 -14
- data/lib/rpush/client/active_model/apns/binary_notification_validator.rb +0 -16
@@ -30,6 +30,8 @@ describe Rpush::Daemon::Wns::PostRequest do
|
|
30
30
|
expect(request.body).to include('<toast>')
|
31
31
|
expect(request.body).to include('MyApp')
|
32
32
|
expect(request.body).to include('Example notification')
|
33
|
+
# no priority header
|
34
|
+
expect { request.fetch('X-WNS-PRIORITY') }.to raise_error(KeyError)
|
33
35
|
end
|
34
36
|
|
35
37
|
context 'with launch' do
|
@@ -55,6 +57,29 @@ describe Rpush::Daemon::Wns::PostRequest do
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
60
|
+
context 'with priority' do
|
61
|
+
let(:notification) do
|
62
|
+
Rpush::Wns::Notification.create!(
|
63
|
+
app: app,
|
64
|
+
data: {
|
65
|
+
title: "MyApp",
|
66
|
+
body: "Example notification"
|
67
|
+
},
|
68
|
+
uri: "http://some.example/",
|
69
|
+
priority: 1
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'creates a request characteristic for toast notification with priority' do
|
74
|
+
request = Rpush::Daemon::Wns::PostRequest.create(notification, 'token')
|
75
|
+
expect(request['X-WNS-Type']).to eq('wns/toast')
|
76
|
+
expect(request['Content-Type']).to eq('text/xml')
|
77
|
+
expect(request['X-WNS-PRIORITY']).to eq('1')
|
78
|
+
expect(request.body).to include('MyApp')
|
79
|
+
expect(request.body).to include('Example notification')
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
58
83
|
context 'with sound' do
|
59
84
|
let(:notification) do
|
60
85
|
Rpush::Wns::Notification.create!(
|
@@ -95,6 +120,25 @@ describe Rpush::Daemon::Wns::PostRequest do
|
|
95
120
|
expect(request['Content-Type']).to eq('application/octet-stream')
|
96
121
|
expect(request.body).to eq("{\"foo\":\"foo\",\"bar\":\"bar\"}")
|
97
122
|
end
|
123
|
+
|
124
|
+
context 'with priority' do
|
125
|
+
let(:notification) do
|
126
|
+
Rpush::Wns::RawNotification.create!(
|
127
|
+
app: app,
|
128
|
+
data: { foo: 'foo', bar: 'bar' },
|
129
|
+
uri: "http://some.example/",
|
130
|
+
priority: 3
|
131
|
+
)
|
132
|
+
end
|
133
|
+
|
134
|
+
it 'creates a request characteristic for raw notification with priority' do
|
135
|
+
request = Rpush::Daemon::Wns::PostRequest.create(notification, 'token')
|
136
|
+
expect(request['X-WNS-Type']).to eq('wns/raw')
|
137
|
+
expect(request['X-WNS-PRIORITY']).to eq('3')
|
138
|
+
expect(request['Content-Type']).to eq('application/octet-stream')
|
139
|
+
expect(request.body).to eq("{\"foo\":\"foo\",\"bar\":\"bar\"}")
|
140
|
+
end
|
141
|
+
end
|
98
142
|
end
|
99
143
|
|
100
144
|
context 'BadgeNotification' do
|
@@ -113,5 +157,25 @@ describe Rpush::Daemon::Wns::PostRequest do
|
|
113
157
|
expect(request.body).to include('<badge')
|
114
158
|
expect(request.body).to include('42')
|
115
159
|
end
|
160
|
+
|
161
|
+
context 'with priority' do
|
162
|
+
let(:notification) do
|
163
|
+
Rpush::Wns::BadgeNotification.create!(
|
164
|
+
app: app,
|
165
|
+
uri: "http://some.example/",
|
166
|
+
badge: 42,
|
167
|
+
priority: 4
|
168
|
+
)
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'creates a request characteristic for badge notification with priority' do
|
172
|
+
request = Rpush::Daemon::Wns::PostRequest.create(notification, 'token')
|
173
|
+
expect(request['X-WNS-Type']).to eq('wns/badge')
|
174
|
+
expect(request['X-WNS-PRIORITY']).to eq('4')
|
175
|
+
expect(request['Content-Type']).to eq('text/xml')
|
176
|
+
expect(request.body).to include('<badge')
|
177
|
+
expect(request.body).to include('42')
|
178
|
+
end
|
179
|
+
end
|
116
180
|
end
|
117
181
|
end
|
data/spec/unit_spec_helper.rb
CHANGED
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.2.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:
|
11
|
+
date: 2020-10-08 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.
|
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.
|
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
|
@@ -115,7 +121,7 @@ dependencies:
|
|
115
121
|
- !ruby/object:Gem::Version
|
116
122
|
version: '0'
|
117
123
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
124
|
+
name: rainbow
|
119
125
|
requirement: !ruby/object:Gem::Requirement
|
120
126
|
requirements:
|
121
127
|
- - ">="
|
@@ -282,6 +288,20 @@ dependencies:
|
|
282
288
|
- - ">="
|
283
289
|
- !ruby/object:Gem::Version
|
284
290
|
version: '0'
|
291
|
+
- !ruby/object:Gem::Dependency
|
292
|
+
name: rubocop-performance
|
293
|
+
requirement: !ruby/object:Gem::Requirement
|
294
|
+
requirements:
|
295
|
+
- - ">="
|
296
|
+
- !ruby/object:Gem::Version
|
297
|
+
version: '0'
|
298
|
+
type: :development
|
299
|
+
prerelease: false
|
300
|
+
version_requirements: !ruby/object:Gem::Requirement
|
301
|
+
requirements:
|
302
|
+
- - ">="
|
303
|
+
- !ruby/object:Gem::Version
|
304
|
+
version: '0'
|
285
305
|
- !ruby/object:Gem::Dependency
|
286
306
|
name: byebug
|
287
307
|
requirement: !ruby/object:Gem::Requirement
|
@@ -377,6 +397,8 @@ files:
|
|
377
397
|
- lib/generators/templates/rpush_3_3_0_updates.rb
|
378
398
|
- lib/generators/templates/rpush_3_3_1_updates.rb
|
379
399
|
- lib/generators/templates/rpush_4_1_0_updates.rb
|
400
|
+
- lib/generators/templates/rpush_4_1_1_updates.rb
|
401
|
+
- lib/generators/templates/rpush_4_2_0_updates.rb
|
380
402
|
- lib/rpush.rb
|
381
403
|
- lib/rpush/apns_feedback.rb
|
382
404
|
- lib/rpush/cli.rb
|
@@ -385,9 +407,9 @@ files:
|
|
385
407
|
- lib/rpush/client/active_model/adm/data_validator.rb
|
386
408
|
- lib/rpush/client/active_model/adm/notification.rb
|
387
409
|
- lib/rpush/client/active_model/apns/app.rb
|
388
|
-
- lib/rpush/client/active_model/apns/binary_notification_validator.rb
|
389
410
|
- lib/rpush/client/active_model/apns/device_token_format_validator.rb
|
390
411
|
- lib/rpush/client/active_model/apns/notification.rb
|
412
|
+
- lib/rpush/client/active_model/apns/notification_payload_size_validator.rb
|
391
413
|
- lib/rpush/client/active_model/apns2/app.rb
|
392
414
|
- lib/rpush/client/active_model/apns2/notification.rb
|
393
415
|
- lib/rpush/client/active_model/apnsp8/app.rb
|
@@ -408,6 +430,7 @@ files:
|
|
408
430
|
- lib/rpush/client/active_record.rb
|
409
431
|
- lib/rpush/client/active_record/adm/app.rb
|
410
432
|
- lib/rpush/client/active_record/adm/notification.rb
|
433
|
+
- lib/rpush/client/active_record/apns/active_record_serializable_notification.rb
|
411
434
|
- lib/rpush/client/active_record/apns/app.rb
|
412
435
|
- lib/rpush/client/active_record/apns/feedback.rb
|
413
436
|
- lib/rpush/client/active_record/apns/notification.rb
|
@@ -523,6 +546,7 @@ files:
|
|
523
546
|
- spec/functional/apns_spec.rb
|
524
547
|
- spec/functional/cli_spec.rb
|
525
548
|
- spec/functional/embed_spec.rb
|
549
|
+
- spec/functional/gcm_priority_spec.rb
|
526
550
|
- spec/functional/gcm_spec.rb
|
527
551
|
- spec/functional/new_app_spec.rb
|
528
552
|
- spec/functional/pushy_spec.rb
|
@@ -544,16 +568,52 @@ files:
|
|
544
568
|
- spec/unit/client/active_record/apns/app_spec.rb
|
545
569
|
- spec/unit/client/active_record/apns/feedback_spec.rb
|
546
570
|
- spec/unit/client/active_record/apns/notification_spec.rb
|
571
|
+
- spec/unit/client/active_record/apns2/app_spec.rb
|
572
|
+
- spec/unit/client/active_record/apns2/notification_spec.rb
|
547
573
|
- spec/unit/client/active_record/app_spec.rb
|
548
574
|
- spec/unit/client/active_record/gcm/app_spec.rb
|
549
575
|
- spec/unit/client/active_record/gcm/notification_spec.rb
|
550
576
|
- spec/unit/client/active_record/notification_spec.rb
|
551
577
|
- spec/unit/client/active_record/pushy/app_spec.rb
|
552
578
|
- spec/unit/client/active_record/pushy/notification_spec.rb
|
579
|
+
- spec/unit/client/active_record/shared/app.rb
|
580
|
+
- spec/unit/client/active_record/shared/notification.rb
|
553
581
|
- spec/unit/client/active_record/wns/badge_notification_spec.rb
|
554
582
|
- spec/unit/client/active_record/wns/raw_notification_spec.rb
|
555
583
|
- spec/unit/client/active_record/wpns/app_spec.rb
|
556
584
|
- spec/unit/client/active_record/wpns/notification_spec.rb
|
585
|
+
- spec/unit/client/redis/adm/app_spec.rb
|
586
|
+
- spec/unit/client/redis/adm/notification_spec.rb
|
587
|
+
- spec/unit/client/redis/apns/app_spec.rb
|
588
|
+
- spec/unit/client/redis/apns/feedback_spec.rb
|
589
|
+
- spec/unit/client/redis/apns/notification_spec.rb
|
590
|
+
- spec/unit/client/redis/apns2/app_spec.rb
|
591
|
+
- spec/unit/client/redis/apns2/notification_spec.rb
|
592
|
+
- spec/unit/client/redis/app_spec.rb
|
593
|
+
- spec/unit/client/redis/gcm/app_spec.rb
|
594
|
+
- spec/unit/client/redis/gcm/notification_spec.rb
|
595
|
+
- spec/unit/client/redis/notification_spec.rb
|
596
|
+
- spec/unit/client/redis/pushy/app_spec.rb
|
597
|
+
- spec/unit/client/redis/pushy/notification_spec.rb
|
598
|
+
- spec/unit/client/redis/wns/badge_notification_spec.rb
|
599
|
+
- spec/unit/client/redis/wns/raw_notification_spec.rb
|
600
|
+
- spec/unit/client/redis/wpns/app_spec.rb
|
601
|
+
- spec/unit/client/redis/wpns/notification_spec.rb
|
602
|
+
- spec/unit/client/shared/adm/app.rb
|
603
|
+
- spec/unit/client/shared/adm/notification.rb
|
604
|
+
- spec/unit/client/shared/apns/app.rb
|
605
|
+
- spec/unit/client/shared/apns/feedback.rb
|
606
|
+
- spec/unit/client/shared/apns/notification.rb
|
607
|
+
- spec/unit/client/shared/app.rb
|
608
|
+
- spec/unit/client/shared/gcm/app.rb
|
609
|
+
- spec/unit/client/shared/gcm/notification.rb
|
610
|
+
- spec/unit/client/shared/notification.rb
|
611
|
+
- spec/unit/client/shared/pushy/app.rb
|
612
|
+
- spec/unit/client/shared/pushy/notification.rb
|
613
|
+
- spec/unit/client/shared/wns/badge_notification.rb
|
614
|
+
- spec/unit/client/shared/wns/raw_notification.rb
|
615
|
+
- spec/unit/client/shared/wpns/app.rb
|
616
|
+
- spec/unit/client/shared/wpns/notification.rb
|
557
617
|
- spec/unit/configuration_spec.rb
|
558
618
|
- spec/unit/daemon/adm/delivery_spec.rb
|
559
619
|
- spec/unit/daemon/apns/certificate_expired_error_spec.rb
|
@@ -572,6 +632,7 @@ files:
|
|
572
632
|
- spec/unit/daemon/pushy/delivery_spec.rb
|
573
633
|
- spec/unit/daemon/retryable_error_spec.rb
|
574
634
|
- spec/unit/daemon/service_config_methods_spec.rb
|
635
|
+
- spec/unit/daemon/shared/store.rb
|
575
636
|
- spec/unit/daemon/signal_handler_spec.rb
|
576
637
|
- spec/unit/daemon/store/active_record/reconnectable_spec.rb
|
577
638
|
- spec/unit/daemon/store/active_record_spec.rb
|
@@ -585,7 +646,6 @@ files:
|
|
585
646
|
- spec/unit/deprecation_spec.rb
|
586
647
|
- spec/unit/embed_spec.rb
|
587
648
|
- spec/unit/logger_spec.rb
|
588
|
-
- spec/unit/notification_shared.rb
|
589
649
|
- spec/unit/plugin_spec.rb
|
590
650
|
- spec/unit/push_spec.rb
|
591
651
|
- spec/unit/reflectable_spec.rb
|
@@ -595,7 +655,10 @@ files:
|
|
595
655
|
homepage: https://github.com/rpush/rpush
|
596
656
|
licenses:
|
597
657
|
- MIT
|
598
|
-
metadata:
|
658
|
+
metadata:
|
659
|
+
bug_tracker_uri: https://github.com/rpush/rpush/issues
|
660
|
+
changelog_uri: https://github.com/rpush/rpush/blob/master/CHANGELOG.md
|
661
|
+
source_code_uri: https://github.com/rpush/rpush
|
599
662
|
post_install_message: |
|
600
663
|
When upgrading, don't forget to run `bundle exec rpush init` to get all the latest migrations.
|
601
664
|
|
@@ -615,8 +678,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
615
678
|
- !ruby/object:Gem::Version
|
616
679
|
version: '0'
|
617
680
|
requirements: []
|
618
|
-
rubygems_version: 3.
|
619
|
-
signing_key:
|
681
|
+
rubygems_version: 3.1.4
|
682
|
+
signing_key:
|
620
683
|
specification_version: 4
|
621
684
|
summary: The push notification service for Ruby.
|
622
685
|
test_files:
|
@@ -626,6 +689,7 @@ test_files:
|
|
626
689
|
- spec/functional/apns_spec.rb
|
627
690
|
- spec/functional/cli_spec.rb
|
628
691
|
- spec/functional/embed_spec.rb
|
692
|
+
- spec/functional/gcm_priority_spec.rb
|
629
693
|
- spec/functional/gcm_spec.rb
|
630
694
|
- spec/functional/new_app_spec.rb
|
631
695
|
- spec/functional/pushy_spec.rb
|
@@ -647,16 +711,52 @@ test_files:
|
|
647
711
|
- spec/unit/client/active_record/apns/app_spec.rb
|
648
712
|
- spec/unit/client/active_record/apns/feedback_spec.rb
|
649
713
|
- spec/unit/client/active_record/apns/notification_spec.rb
|
714
|
+
- spec/unit/client/active_record/apns2/app_spec.rb
|
715
|
+
- spec/unit/client/active_record/apns2/notification_spec.rb
|
650
716
|
- spec/unit/client/active_record/app_spec.rb
|
651
717
|
- spec/unit/client/active_record/gcm/app_spec.rb
|
652
718
|
- spec/unit/client/active_record/gcm/notification_spec.rb
|
653
719
|
- spec/unit/client/active_record/notification_spec.rb
|
654
720
|
- spec/unit/client/active_record/pushy/app_spec.rb
|
655
721
|
- spec/unit/client/active_record/pushy/notification_spec.rb
|
722
|
+
- spec/unit/client/active_record/shared/app.rb
|
723
|
+
- spec/unit/client/active_record/shared/notification.rb
|
656
724
|
- spec/unit/client/active_record/wns/badge_notification_spec.rb
|
657
725
|
- spec/unit/client/active_record/wns/raw_notification_spec.rb
|
658
726
|
- spec/unit/client/active_record/wpns/app_spec.rb
|
659
727
|
- spec/unit/client/active_record/wpns/notification_spec.rb
|
728
|
+
- spec/unit/client/redis/adm/app_spec.rb
|
729
|
+
- spec/unit/client/redis/adm/notification_spec.rb
|
730
|
+
- spec/unit/client/redis/apns/app_spec.rb
|
731
|
+
- spec/unit/client/redis/apns/feedback_spec.rb
|
732
|
+
- spec/unit/client/redis/apns/notification_spec.rb
|
733
|
+
- spec/unit/client/redis/apns2/app_spec.rb
|
734
|
+
- spec/unit/client/redis/apns2/notification_spec.rb
|
735
|
+
- spec/unit/client/redis/app_spec.rb
|
736
|
+
- spec/unit/client/redis/gcm/app_spec.rb
|
737
|
+
- spec/unit/client/redis/gcm/notification_spec.rb
|
738
|
+
- spec/unit/client/redis/notification_spec.rb
|
739
|
+
- spec/unit/client/redis/pushy/app_spec.rb
|
740
|
+
- spec/unit/client/redis/pushy/notification_spec.rb
|
741
|
+
- spec/unit/client/redis/wns/badge_notification_spec.rb
|
742
|
+
- spec/unit/client/redis/wns/raw_notification_spec.rb
|
743
|
+
- spec/unit/client/redis/wpns/app_spec.rb
|
744
|
+
- spec/unit/client/redis/wpns/notification_spec.rb
|
745
|
+
- spec/unit/client/shared/adm/app.rb
|
746
|
+
- spec/unit/client/shared/adm/notification.rb
|
747
|
+
- spec/unit/client/shared/apns/app.rb
|
748
|
+
- spec/unit/client/shared/apns/feedback.rb
|
749
|
+
- spec/unit/client/shared/apns/notification.rb
|
750
|
+
- spec/unit/client/shared/app.rb
|
751
|
+
- spec/unit/client/shared/gcm/app.rb
|
752
|
+
- spec/unit/client/shared/gcm/notification.rb
|
753
|
+
- spec/unit/client/shared/notification.rb
|
754
|
+
- spec/unit/client/shared/pushy/app.rb
|
755
|
+
- spec/unit/client/shared/pushy/notification.rb
|
756
|
+
- spec/unit/client/shared/wns/badge_notification.rb
|
757
|
+
- spec/unit/client/shared/wns/raw_notification.rb
|
758
|
+
- spec/unit/client/shared/wpns/app.rb
|
759
|
+
- spec/unit/client/shared/wpns/notification.rb
|
660
760
|
- spec/unit/configuration_spec.rb
|
661
761
|
- spec/unit/daemon/adm/delivery_spec.rb
|
662
762
|
- spec/unit/daemon/apns/certificate_expired_error_spec.rb
|
@@ -675,6 +775,7 @@ test_files:
|
|
675
775
|
- spec/unit/daemon/pushy/delivery_spec.rb
|
676
776
|
- spec/unit/daemon/retryable_error_spec.rb
|
677
777
|
- spec/unit/daemon/service_config_methods_spec.rb
|
778
|
+
- spec/unit/daemon/shared/store.rb
|
678
779
|
- spec/unit/daemon/signal_handler_spec.rb
|
679
780
|
- spec/unit/daemon/store/active_record/reconnectable_spec.rb
|
680
781
|
- spec/unit/daemon/store/active_record_spec.rb
|
@@ -688,7 +789,6 @@ test_files:
|
|
688
789
|
- spec/unit/deprecation_spec.rb
|
689
790
|
- spec/unit/embed_spec.rb
|
690
791
|
- spec/unit/logger_spec.rb
|
691
|
-
- spec/unit/notification_shared.rb
|
692
792
|
- spec/unit/plugin_spec.rb
|
693
793
|
- spec/unit/push_spec.rb
|
694
794
|
- spec/unit/reflectable_spec.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Rpush
|
2
|
-
module Client
|
3
|
-
module ActiveModel
|
4
|
-
module Apns
|
5
|
-
class BinaryNotificationValidator < ::ActiveModel::Validator
|
6
|
-
MAX_BYTES = 2048
|
7
|
-
|
8
|
-
def validate(record)
|
9
|
-
return unless record.payload.bytesize > MAX_BYTES
|
10
|
-
record.errors[:base] << "APN notification cannot be larger than #{MAX_BYTES} bytes. Try condensing your alert and device attributes."
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|