activity_notification 2.3.2 → 2.4.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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +9 -36
  3. data/CHANGELOG.md +26 -1
  4. data/Gemfile +1 -1
  5. data/README.md +9 -1
  6. data/activity_notification.gemspec +5 -5
  7. data/ai-curated-specs/issues/172/design.md +220 -0
  8. data/ai-curated-specs/issues/172/tasks.md +326 -0
  9. data/ai-curated-specs/issues/188/design.md +227 -0
  10. data/ai-curated-specs/issues/188/requirements.md +78 -0
  11. data/ai-curated-specs/issues/188/tasks.md +203 -0
  12. data/ai-curated-specs/issues/188/upstream-contributions.md +592 -0
  13. data/ai-curated-specs/issues/50/design.md +235 -0
  14. data/ai-curated-specs/issues/50/requirements.md +49 -0
  15. data/ai-curated-specs/issues/50/tasks.md +232 -0
  16. data/app/controllers/activity_notification/notifications_api_controller.rb +22 -0
  17. data/app/controllers/activity_notification/notifications_controller.rb +27 -1
  18. data/app/mailers/activity_notification/mailer.rb +2 -2
  19. data/app/views/activity_notification/notifications/default/_index.html.erb +6 -1
  20. data/app/views/activity_notification/notifications/default/destroy_all.js.erb +6 -0
  21. data/docs/Setup.md +43 -6
  22. data/gemfiles/Gemfile.rails-7.0 +2 -0
  23. data/gemfiles/Gemfile.rails-7.2 +0 -2
  24. data/gemfiles/Gemfile.rails-8.0 +24 -0
  25. data/lib/activity_notification/apis/notification_api.rb +51 -2
  26. data/lib/activity_notification/controllers/concerns/swagger/notifications_api.rb +59 -0
  27. data/lib/activity_notification/helpers/view_helpers.rb +28 -0
  28. data/lib/activity_notification/mailers/helpers.rb +14 -7
  29. data/lib/activity_notification/models/concerns/target.rb +16 -0
  30. data/lib/activity_notification/models.rb +1 -1
  31. data/lib/activity_notification/notification_resilience.rb +115 -0
  32. data/lib/activity_notification/orm/dynamoid/extension.rb +4 -87
  33. data/lib/activity_notification/orm/dynamoid/notification.rb +19 -2
  34. data/lib/activity_notification/orm/dynamoid.rb +42 -6
  35. data/lib/activity_notification/rails/routes.rb +3 -2
  36. data/lib/activity_notification/version.rb +1 -1
  37. data/lib/activity_notification.rb +1 -0
  38. data/lib/generators/templates/controllers/notifications_api_controller.rb +5 -0
  39. data/lib/generators/templates/controllers/notifications_api_with_devise_controller.rb +5 -0
  40. data/lib/generators/templates/controllers/notifications_controller.rb +5 -0
  41. data/lib/generators/templates/controllers/notifications_with_devise_controller.rb +5 -0
  42. data/spec/concerns/apis/notification_api_spec.rb +161 -5
  43. data/spec/concerns/models/target_spec.rb +7 -0
  44. data/spec/controllers/controller_spec_utility.rb +1 -1
  45. data/spec/controllers/notifications_api_controller_shared_examples.rb +113 -0
  46. data/spec/controllers/notifications_controller_shared_examples.rb +150 -0
  47. data/spec/helpers/view_helpers_spec.rb +14 -0
  48. data/spec/jobs/notification_resilience_job_spec.rb +167 -0
  49. data/spec/mailers/notification_resilience_spec.rb +263 -0
  50. data/spec/models/notification_spec.rb +1 -1
  51. data/spec/models/subscription_spec.rb +1 -1
  52. data/spec/rails_app/app/helpers/devise_helper.rb +2 -0
  53. data/spec/rails_app/config/application.rb +1 -0
  54. data/spec/rails_app/config/initializers/zeitwerk.rb +10 -0
  55. metadata +67 -53
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activity_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Yamazaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-23 00:00:00.000000000 Z
11
+ date: 2025-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,20 +16,60 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0
19
+ version: 7.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.3'
22
+ version: '8.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.0.0
29
+ version: 7.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.3'
32
+ version: '8.1'
33
+ - !ruby/object:Gem::Dependency
34
+ name: mongoid
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 4.0.0
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '10.0'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 4.0.0
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '10.0'
53
+ - !ruby/object:Gem::Dependency
54
+ name: dynamoid
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 3.11.0
60
+ - - "<"
61
+ - !ruby/object:Gem::Version
62
+ version: '4.0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 3.11.0
70
+ - - "<"
71
+ - !ruby/object:Gem::Version
72
+ version: '4.0'
33
73
  - !ruby/object:Gem::Dependency
34
74
  name: i18n
35
75
  requirement: !ruby/object:Gem::Requirement
@@ -93,9 +133,6 @@ dependencies:
93
133
  - - ">="
94
134
  - !ruby/object:Gem::Version
95
135
  version: 1.3.13
96
- - - "<"
97
- - !ruby/object:Gem::Version
98
- version: '2.0'
99
136
  type: :development
100
137
  prerelease: false
101
138
  version_requirements: !ruby/object:Gem::Requirement
@@ -103,9 +140,6 @@ dependencies:
103
140
  - - ">="
104
141
  - !ruby/object:Gem::Version
105
142
  version: 1.3.13
106
- - - "<"
107
- - !ruby/object:Gem::Version
108
- version: '2.0'
109
143
  - !ruby/object:Gem::Dependency
110
144
  name: mysql2
111
145
  requirement: !ruby/object:Gem::Requirement
@@ -134,40 +168,6 @@ dependencies:
134
168
  - - ">="
135
169
  - !ruby/object:Gem::Version
136
170
  version: 1.0.0
137
- - !ruby/object:Gem::Dependency
138
- name: mongoid
139
- requirement: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- version: 4.0.0
144
- - - "<"
145
- - !ruby/object:Gem::Version
146
- version: '9.0'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- version: 4.0.0
154
- - - "<"
155
- - !ruby/object:Gem::Version
156
- version: '9.0'
157
- - !ruby/object:Gem::Dependency
158
- name: dynamoid
159
- requirement: !ruby/object:Gem::Requirement
160
- requirements:
161
- - - '='
162
- - !ruby/object:Gem::Version
163
- version: 3.1.0
164
- type: :development
165
- prerelease: false
166
- version_requirements: !ruby/object:Gem::Requirement
167
- requirements:
168
- - - '='
169
- - !ruby/object:Gem::Version
170
- version: 3.1.0
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: rspec-rails
173
173
  requirement: !ruby/object:Gem::Requirement
@@ -189,9 +189,6 @@ dependencies:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
191
  version: 4.11.0
192
- - - "<"
193
- - !ruby/object:Gem::Version
194
- version: 5.0.0
195
192
  type: :development
196
193
  prerelease: false
197
194
  version_requirements: !ruby/object:Gem::Requirement
@@ -199,9 +196,6 @@ dependencies:
199
196
  - - ">="
200
197
  - !ruby/object:Gem::Version
201
198
  version: 4.11.0
202
- - - "<"
203
- - !ruby/object:Gem::Version
204
- version: 5.0.0
205
199
  - !ruby/object:Gem::Dependency
206
200
  name: simplecov
207
201
  requirement: !ruby/object:Gem::Requirement
@@ -340,6 +334,15 @@ files:
340
334
  - README.md
341
335
  - Rakefile
342
336
  - activity_notification.gemspec
337
+ - ai-curated-specs/issues/172/design.md
338
+ - ai-curated-specs/issues/172/tasks.md
339
+ - ai-curated-specs/issues/188/design.md
340
+ - ai-curated-specs/issues/188/requirements.md
341
+ - ai-curated-specs/issues/188/tasks.md
342
+ - ai-curated-specs/issues/188/upstream-contributions.md
343
+ - ai-curated-specs/issues/50/design.md
344
+ - ai-curated-specs/issues/50/requirements.md
345
+ - ai-curated-specs/issues/50/tasks.md
343
346
  - app/channels/activity_notification/notification_api_channel.rb
344
347
  - app/channels/activity_notification/notification_api_with_devise_channel.rb
345
348
  - app/channels/activity_notification/notification_channel.rb
@@ -365,6 +368,7 @@ files:
365
368
  - app/views/activity_notification/notifications/default/_default_without_grouping.html.erb
366
369
  - app/views/activity_notification/notifications/default/_index.html.erb
367
370
  - app/views/activity_notification/notifications/default/destroy.js.erb
371
+ - app/views/activity_notification/notifications/default/destroy_all.js.erb
368
372
  - app/views/activity_notification/notifications/default/index.html.erb
369
373
  - app/views/activity_notification/notifications/default/open.js.erb
370
374
  - app/views/activity_notification/notifications/default/open_all.js.erb
@@ -405,6 +409,7 @@ files:
405
409
  - gemfiles/Gemfile.rails-7.0
406
410
  - gemfiles/Gemfile.rails-7.1
407
411
  - gemfiles/Gemfile.rails-7.2
412
+ - gemfiles/Gemfile.rails-8.0
408
413
  - lib/activity_notification.rb
409
414
  - lib/activity_notification/apis/notification_api.rb
410
415
  - lib/activity_notification/apis/subscription_api.rb
@@ -436,6 +441,7 @@ files:
436
441
  - lib/activity_notification/models/concerns/target.rb
437
442
  - lib/activity_notification/models/notification.rb
438
443
  - lib/activity_notification/models/subscription.rb
444
+ - lib/activity_notification/notification_resilience.rb
439
445
  - lib/activity_notification/optional_targets/action_cable_api_channel.rb
440
446
  - lib/activity_notification/optional_targets/action_cable_channel.rb
441
447
  - lib/activity_notification/optional_targets/amazon_sns.rb
@@ -532,10 +538,12 @@ files:
532
538
  - spec/generators/views_generator_spec.rb
533
539
  - spec/helpers/polymorphic_helpers_spec.rb
534
540
  - spec/helpers/view_helpers_spec.rb
541
+ - spec/jobs/notification_resilience_job_spec.rb
535
542
  - spec/jobs/notify_all_job_spec.rb
536
543
  - spec/jobs/notify_job_spec.rb
537
544
  - spec/jobs/notify_to_job_spec.rb
538
545
  - spec/mailers/mailer_spec.rb
546
+ - spec/mailers/notification_resilience_spec.rb
539
547
  - spec/models/dummy/dummy_group_spec.rb
540
548
  - spec/models/dummy/dummy_notifiable_spec.rb
541
549
  - spec/models/dummy/dummy_notifier_spec.rb
@@ -569,6 +577,7 @@ files:
569
577
  - spec/rails_app/app/controllers/users/subscriptions_with_devise_controller.rb
570
578
  - spec/rails_app/app/controllers/users_controller.rb
571
579
  - spec/rails_app/app/helpers/application_helper.rb
580
+ - spec/rails_app/app/helpers/devise_helper.rb
572
581
  - spec/rails_app/app/javascript/App.vue
573
582
  - spec/rails_app/app/javascript/components/DeviseTokenAuth.vue
574
583
  - spec/rails_app/app/javascript/components/Top.vue
@@ -646,6 +655,7 @@ files:
646
655
  - spec/rails_app/config/initializers/mysql.rb
647
656
  - spec/rails_app/config/initializers/session_store.rb
648
657
  - spec/rails_app/config/initializers/wrap_parameters.rb
658
+ - spec/rails_app/config/initializers/zeitwerk.rb
649
659
  - spec/rails_app/config/locales/activity_notification.en.yml
650
660
  - spec/rails_app/config/locales/devise.en.yml
651
661
  - spec/rails_app/config/mongoid.yml
@@ -697,7 +707,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
697
707
  - !ruby/object:Gem::Version
698
708
  version: '0'
699
709
  requirements: []
700
- rubygems_version: 3.4.6
710
+ rubygems_version: 3.5.22
701
711
  signing_key:
702
712
  specification_version: 4
703
713
  summary: Integrated user activity notifications for Ruby on Rails
@@ -751,10 +761,12 @@ test_files:
751
761
  - spec/generators/views_generator_spec.rb
752
762
  - spec/helpers/polymorphic_helpers_spec.rb
753
763
  - spec/helpers/view_helpers_spec.rb
764
+ - spec/jobs/notification_resilience_job_spec.rb
754
765
  - spec/jobs/notify_all_job_spec.rb
755
766
  - spec/jobs/notify_job_spec.rb
756
767
  - spec/jobs/notify_to_job_spec.rb
757
768
  - spec/mailers/mailer_spec.rb
769
+ - spec/mailers/notification_resilience_spec.rb
758
770
  - spec/models/dummy/dummy_group_spec.rb
759
771
  - spec/models/dummy/dummy_notifiable_spec.rb
760
772
  - spec/models/dummy/dummy_notifier_spec.rb
@@ -788,6 +800,7 @@ test_files:
788
800
  - spec/rails_app/app/controllers/users/subscriptions_with_devise_controller.rb
789
801
  - spec/rails_app/app/controllers/users_controller.rb
790
802
  - spec/rails_app/app/helpers/application_helper.rb
803
+ - spec/rails_app/app/helpers/devise_helper.rb
791
804
  - spec/rails_app/app/javascript/App.vue
792
805
  - spec/rails_app/app/javascript/components/DeviseTokenAuth.vue
793
806
  - spec/rails_app/app/javascript/components/Top.vue
@@ -865,6 +878,7 @@ test_files:
865
878
  - spec/rails_app/config/initializers/mysql.rb
866
879
  - spec/rails_app/config/initializers/session_store.rb
867
880
  - spec/rails_app/config/initializers/wrap_parameters.rb
881
+ - spec/rails_app/config/initializers/zeitwerk.rb
868
882
  - spec/rails_app/config/locales/activity_notification.en.yml
869
883
  - spec/rails_app/config/locales/devise.en.yml
870
884
  - spec/rails_app/config/mongoid.yml