rpush 4.0.1 → 5.1.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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +252 -162
  3. data/README.md +1 -1
  4. data/lib/generators/rpush_migration_generator.rb +3 -0
  5. data/lib/generators/templates/rpush_4_1_0_updates.rb +9 -0
  6. data/lib/generators/templates/rpush_4_1_1_updates.rb +9 -0
  7. data/lib/generators/templates/rpush_4_2_0_updates.rb +10 -0
  8. data/lib/rpush/apns_feedback.rb +1 -0
  9. data/lib/rpush/cli.rb +9 -22
  10. data/lib/rpush/client/active_model.rb +1 -1
  11. data/lib/rpush/client/active_model/apns/notification.rb +9 -1
  12. data/lib/rpush/client/active_model/apns/notification_payload_size_validator.rb +15 -0
  13. data/lib/rpush/client/active_model/apns2/notification.rb +14 -0
  14. data/lib/rpush/client/active_model/gcm/notification.rb +6 -3
  15. data/lib/rpush/client/active_model/wns/notification.rb +8 -0
  16. data/lib/rpush/client/active_record.rb +1 -0
  17. data/lib/rpush/client/active_record/apns/active_record_serializable_notification.rb +65 -0
  18. data/lib/rpush/client/active_record/apns/notification.rb +1 -29
  19. data/lib/rpush/client/active_record/apns2/notification.rb +4 -1
  20. data/lib/rpush/client/active_record/app.rb +1 -1
  21. data/lib/rpush/client/active_record/notification.rb +1 -1
  22. data/lib/rpush/client/redis/apns2/notification.rb +1 -0
  23. data/lib/rpush/client/redis/app.rb +2 -1
  24. data/lib/rpush/client/redis/notification.rb +3 -1
  25. data/lib/rpush/client/redis/pushy/notification.rb +0 -1
  26. data/lib/rpush/daemon.rb +2 -2
  27. data/lib/rpush/daemon/apns/feedback_receiver.rb +2 -1
  28. data/lib/rpush/daemon/apns2/delivery.rb +6 -1
  29. data/lib/rpush/daemon/apnsp8/delivery.rb +7 -2
  30. data/lib/rpush/daemon/app_runner.rb +1 -1
  31. data/lib/rpush/daemon/dispatcher/apns_http2.rb +4 -2
  32. data/lib/rpush/daemon/dispatcher/apnsp8_http2.rb +2 -1
  33. data/lib/rpush/daemon/signal_handler.rb +1 -1
  34. data/lib/rpush/daemon/store/active_record.rb +1 -1
  35. data/lib/rpush/daemon/store/active_record/reconnectable.rb +1 -1
  36. data/lib/rpush/daemon/store/redis.rb +1 -1
  37. data/lib/rpush/daemon/wns/badge_request.rb +8 -3
  38. data/lib/rpush/daemon/wns/raw_request.rb +9 -2
  39. data/lib/rpush/daemon/wns/toast_request.rb +6 -2
  40. data/lib/rpush/version.rb +3 -3
  41. data/spec/.rubocop.yml +1 -1
  42. data/spec/functional/apns2_spec.rb +36 -0
  43. data/spec/functional/gcm_priority_spec.rb +40 -0
  44. data/spec/support/active_record_setup.rb +7 -1
  45. data/spec/support/simplecov_helper.rb +1 -1
  46. data/spec/unit/apns_feedback_spec.rb +17 -6
  47. data/spec/unit/client/active_record/adm/app_spec.rb +2 -54
  48. data/spec/unit/client/active_record/adm/notification_spec.rb +2 -39
  49. data/spec/unit/client/active_record/apns/app_spec.rb +3 -26
  50. data/spec/unit/client/active_record/apns/feedback_spec.rb +1 -5
  51. data/spec/unit/client/active_record/apns/notification_spec.rb +29 -288
  52. data/spec/unit/client/active_record/apns2/app_spec.rb +4 -0
  53. data/spec/unit/client/active_record/apns2/notification_spec.rb +65 -0
  54. data/spec/unit/client/active_record/app_spec.rb +1 -26
  55. data/spec/unit/client/active_record/gcm/app_spec.rb +3 -1
  56. data/spec/unit/client/active_record/gcm/notification_spec.rb +7 -60
  57. data/spec/unit/client/active_record/notification_spec.rb +10 -11
  58. data/spec/unit/client/active_record/pushy/app_spec.rb +2 -13
  59. data/spec/unit/client/active_record/pushy/notification_spec.rb +2 -55
  60. data/spec/unit/client/active_record/shared/app.rb +14 -0
  61. data/spec/unit/{notification_shared.rb → client/active_record/shared/notification.rb} +12 -7
  62. data/spec/unit/client/active_record/wns/badge_notification_spec.rb +1 -11
  63. data/spec/unit/client/active_record/wns/raw_notification_spec.rb +3 -12
  64. data/spec/unit/client/active_record/wpns/app_spec.rb +3 -1
  65. data/spec/unit/client/active_record/wpns/notification_spec.rb +2 -17
  66. data/spec/unit/client/redis/adm/app_spec.rb +5 -0
  67. data/spec/unit/client/redis/adm/notification_spec.rb +5 -0
  68. data/spec/unit/client/redis/apns/app_spec.rb +5 -0
  69. data/spec/unit/client/redis/apns/feedback_spec.rb +5 -0
  70. data/spec/unit/client/redis/apns/notification_spec.rb +50 -0
  71. data/spec/unit/client/redis/apns2/app_spec.rb +4 -0
  72. data/spec/unit/client/redis/apns2/notification_spec.rb +50 -0
  73. data/spec/unit/client/redis/app_spec.rb +5 -0
  74. data/spec/unit/client/redis/gcm/app_spec.rb +5 -0
  75. data/spec/unit/client/redis/gcm/notification_spec.rb +5 -0
  76. data/spec/unit/client/redis/notification_spec.rb +5 -0
  77. data/spec/unit/client/redis/pushy/app_spec.rb +5 -0
  78. data/spec/unit/client/redis/pushy/notification_spec.rb +5 -0
  79. data/spec/unit/client/redis/wns/badge_notification_spec.rb +5 -0
  80. data/spec/unit/client/redis/wns/raw_notification_spec.rb +22 -0
  81. data/spec/unit/client/redis/wpns/app_spec.rb +5 -0
  82. data/spec/unit/client/redis/wpns/notification_spec.rb +5 -0
  83. data/spec/unit/client/shared/adm/app.rb +51 -0
  84. data/spec/unit/client/shared/adm/notification.rb +39 -0
  85. data/spec/unit/client/shared/apns/app.rb +29 -0
  86. data/spec/unit/client/shared/apns/feedback.rb +9 -0
  87. data/spec/unit/client/shared/apns/notification.rb +262 -0
  88. data/spec/unit/client/shared/app.rb +17 -0
  89. data/spec/unit/client/shared/gcm/app.rb +4 -0
  90. data/spec/unit/client/shared/gcm/notification.rb +77 -0
  91. data/spec/unit/client/shared/notification.rb +10 -0
  92. data/spec/unit/client/shared/pushy/app.rb +17 -0
  93. data/spec/unit/client/shared/pushy/notification.rb +55 -0
  94. data/spec/unit/client/shared/wns/badge_notification.rb +15 -0
  95. data/spec/unit/client/shared/wns/raw_notification.rb +21 -0
  96. data/spec/unit/client/shared/wpns/app.rb +4 -0
  97. data/spec/unit/client/shared/wpns/notification.rb +18 -0
  98. data/spec/unit/daemon/apns/feedback_receiver_spec.rb +19 -1
  99. data/spec/unit/daemon/gcm/delivery_spec.rb +1 -1
  100. data/spec/unit/daemon/shared/store.rb +312 -0
  101. data/spec/unit/daemon/store/active_record/reconnectable_spec.rb +7 -7
  102. data/spec/unit/daemon/store/active_record_spec.rb +7 -295
  103. data/spec/unit/daemon/store/redis_spec.rb +4 -293
  104. data/spec/unit/daemon/wns/post_request_spec.rb +64 -0
  105. data/spec/unit_spec_helper.rb +3 -0
  106. metadata +120 -15
  107. 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
@@ -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.0.1
4
+ version: 5.1.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-04-04 00:00:00.000000000 Z
11
+ date: 2020-09-25 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
@@ -115,7 +121,7 @@ dependencies:
115
121
  - !ruby/object:Gem::Version
116
122
  version: '0'
117
123
  - !ruby/object:Gem::Dependency
118
- name: ansi
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
@@ -376,6 +396,9 @@ files:
376
396
  - lib/generators/templates/rpush_3_2_4_updates.rb
377
397
  - lib/generators/templates/rpush_3_3_0_updates.rb
378
398
  - lib/generators/templates/rpush_3_3_1_updates.rb
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
379
402
  - lib/rpush.rb
380
403
  - lib/rpush/apns_feedback.rb
381
404
  - lib/rpush/cli.rb
@@ -384,9 +407,9 @@ files:
384
407
  - lib/rpush/client/active_model/adm/data_validator.rb
385
408
  - lib/rpush/client/active_model/adm/notification.rb
386
409
  - lib/rpush/client/active_model/apns/app.rb
387
- - lib/rpush/client/active_model/apns/binary_notification_validator.rb
388
410
  - lib/rpush/client/active_model/apns/device_token_format_validator.rb
389
411
  - lib/rpush/client/active_model/apns/notification.rb
412
+ - lib/rpush/client/active_model/apns/notification_payload_size_validator.rb
390
413
  - lib/rpush/client/active_model/apns2/app.rb
391
414
  - lib/rpush/client/active_model/apns2/notification.rb
392
415
  - lib/rpush/client/active_model/apnsp8/app.rb
@@ -407,6 +430,7 @@ files:
407
430
  - lib/rpush/client/active_record.rb
408
431
  - lib/rpush/client/active_record/adm/app.rb
409
432
  - lib/rpush/client/active_record/adm/notification.rb
433
+ - lib/rpush/client/active_record/apns/active_record_serializable_notification.rb
410
434
  - lib/rpush/client/active_record/apns/app.rb
411
435
  - lib/rpush/client/active_record/apns/feedback.rb
412
436
  - lib/rpush/client/active_record/apns/notification.rb
@@ -522,6 +546,7 @@ files:
522
546
  - spec/functional/apns_spec.rb
523
547
  - spec/functional/cli_spec.rb
524
548
  - spec/functional/embed_spec.rb
549
+ - spec/functional/gcm_priority_spec.rb
525
550
  - spec/functional/gcm_spec.rb
526
551
  - spec/functional/new_app_spec.rb
527
552
  - spec/functional/pushy_spec.rb
@@ -543,16 +568,52 @@ files:
543
568
  - spec/unit/client/active_record/apns/app_spec.rb
544
569
  - spec/unit/client/active_record/apns/feedback_spec.rb
545
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
546
573
  - spec/unit/client/active_record/app_spec.rb
547
574
  - spec/unit/client/active_record/gcm/app_spec.rb
548
575
  - spec/unit/client/active_record/gcm/notification_spec.rb
549
576
  - spec/unit/client/active_record/notification_spec.rb
550
577
  - spec/unit/client/active_record/pushy/app_spec.rb
551
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
552
581
  - spec/unit/client/active_record/wns/badge_notification_spec.rb
553
582
  - spec/unit/client/active_record/wns/raw_notification_spec.rb
554
583
  - spec/unit/client/active_record/wpns/app_spec.rb
555
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
556
617
  - spec/unit/configuration_spec.rb
557
618
  - spec/unit/daemon/adm/delivery_spec.rb
558
619
  - spec/unit/daemon/apns/certificate_expired_error_spec.rb
@@ -571,6 +632,7 @@ files:
571
632
  - spec/unit/daemon/pushy/delivery_spec.rb
572
633
  - spec/unit/daemon/retryable_error_spec.rb
573
634
  - spec/unit/daemon/service_config_methods_spec.rb
635
+ - spec/unit/daemon/shared/store.rb
574
636
  - spec/unit/daemon/signal_handler_spec.rb
575
637
  - spec/unit/daemon/store/active_record/reconnectable_spec.rb
576
638
  - spec/unit/daemon/store/active_record_spec.rb
@@ -584,7 +646,6 @@ files:
584
646
  - spec/unit/deprecation_spec.rb
585
647
  - spec/unit/embed_spec.rb
586
648
  - spec/unit/logger_spec.rb
587
- - spec/unit/notification_shared.rb
588
649
  - spec/unit/plugin_spec.rb
589
650
  - spec/unit/push_spec.rb
590
651
  - spec/unit/reflectable_spec.rb
@@ -594,8 +655,15 @@ files:
594
655
  homepage: https://github.com/rpush/rpush
595
656
  licenses:
596
657
  - MIT
597
- metadata: {}
598
- post_install_message:
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
662
+ post_install_message: |
663
+ When upgrading, don't forget to run `bundle exec rpush init` to get all the latest migrations.
664
+
665
+ For details on this specific release, refer to the CHANGELOG.md file.
666
+ https://github.com/rpush/rpush/blob/master/CHANGELOG.md
599
667
  rdoc_options: []
600
668
  require_paths:
601
669
  - lib
@@ -610,8 +678,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
610
678
  - !ruby/object:Gem::Version
611
679
  version: '0'
612
680
  requirements: []
613
- rubygems_version: 3.0.3
614
- signing_key:
681
+ rubygems_version: 3.1.4
682
+ signing_key:
615
683
  specification_version: 4
616
684
  summary: The push notification service for Ruby.
617
685
  test_files:
@@ -621,6 +689,7 @@ test_files:
621
689
  - spec/functional/apns_spec.rb
622
690
  - spec/functional/cli_spec.rb
623
691
  - spec/functional/embed_spec.rb
692
+ - spec/functional/gcm_priority_spec.rb
624
693
  - spec/functional/gcm_spec.rb
625
694
  - spec/functional/new_app_spec.rb
626
695
  - spec/functional/pushy_spec.rb
@@ -642,16 +711,52 @@ test_files:
642
711
  - spec/unit/client/active_record/apns/app_spec.rb
643
712
  - spec/unit/client/active_record/apns/feedback_spec.rb
644
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
645
716
  - spec/unit/client/active_record/app_spec.rb
646
717
  - spec/unit/client/active_record/gcm/app_spec.rb
647
718
  - spec/unit/client/active_record/gcm/notification_spec.rb
648
719
  - spec/unit/client/active_record/notification_spec.rb
649
720
  - spec/unit/client/active_record/pushy/app_spec.rb
650
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
651
724
  - spec/unit/client/active_record/wns/badge_notification_spec.rb
652
725
  - spec/unit/client/active_record/wns/raw_notification_spec.rb
653
726
  - spec/unit/client/active_record/wpns/app_spec.rb
654
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
655
760
  - spec/unit/configuration_spec.rb
656
761
  - spec/unit/daemon/adm/delivery_spec.rb
657
762
  - spec/unit/daemon/apns/certificate_expired_error_spec.rb
@@ -670,6 +775,7 @@ test_files:
670
775
  - spec/unit/daemon/pushy/delivery_spec.rb
671
776
  - spec/unit/daemon/retryable_error_spec.rb
672
777
  - spec/unit/daemon/service_config_methods_spec.rb
778
+ - spec/unit/daemon/shared/store.rb
673
779
  - spec/unit/daemon/signal_handler_spec.rb
674
780
  - spec/unit/daemon/store/active_record/reconnectable_spec.rb
675
781
  - spec/unit/daemon/store/active_record_spec.rb
@@ -683,7 +789,6 @@ test_files:
683
789
  - spec/unit/deprecation_spec.rb
684
790
  - spec/unit/embed_spec.rb
685
791
  - spec/unit/logger_spec.rb
686
- - spec/unit/notification_shared.rb
687
792
  - spec/unit/plugin_spec.rb
688
793
  - spec/unit/push_spec.rb
689
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