activity_notification 2.3.3 → 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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +7 -39
  3. data/CHANGELOG.md +18 -0
  4. data/Gemfile +1 -3
  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-8.0 +0 -2
  24. data/lib/activity_notification/apis/notification_api.rb +51 -2
  25. data/lib/activity_notification/controllers/concerns/swagger/notifications_api.rb +59 -0
  26. data/lib/activity_notification/helpers/view_helpers.rb +28 -0
  27. data/lib/activity_notification/mailers/helpers.rb +14 -7
  28. data/lib/activity_notification/models/concerns/target.rb +16 -0
  29. data/lib/activity_notification/models.rb +1 -1
  30. data/lib/activity_notification/notification_resilience.rb +115 -0
  31. data/lib/activity_notification/orm/dynamoid/extension.rb +4 -87
  32. data/lib/activity_notification/orm/dynamoid/notification.rb +19 -2
  33. data/lib/activity_notification/orm/dynamoid.rb +42 -6
  34. data/lib/activity_notification/rails/routes.rb +1 -0
  35. data/lib/activity_notification/version.rb +1 -1
  36. data/lib/activity_notification.rb +1 -0
  37. data/lib/generators/templates/controllers/notifications_api_controller.rb +5 -0
  38. data/lib/generators/templates/controllers/notifications_api_with_devise_controller.rb +5 -0
  39. data/lib/generators/templates/controllers/notifications_controller.rb +5 -0
  40. data/lib/generators/templates/controllers/notifications_with_devise_controller.rb +5 -0
  41. data/spec/concerns/apis/notification_api_spec.rb +161 -5
  42. data/spec/concerns/models/target_spec.rb +7 -0
  43. data/spec/controllers/controller_spec_utility.rb +1 -1
  44. data/spec/controllers/notifications_api_controller_shared_examples.rb +113 -0
  45. data/spec/controllers/notifications_controller_shared_examples.rb +150 -0
  46. data/spec/helpers/view_helpers_spec.rb +14 -0
  47. data/spec/jobs/notification_resilience_job_spec.rb +167 -0
  48. data/spec/mailers/notification_resilience_spec.rb +263 -0
  49. data/spec/models/notification_spec.rb +1 -1
  50. data/spec/models/subscription_spec.rb +1 -1
  51. data/spec/rails_app/app/helpers/devise_helper.rb +2 -0
  52. data/spec/rails_app/config/application.rb +1 -0
  53. data/spec/rails_app/config/initializers/zeitwerk.rb +10 -0
  54. metadata +63 -50
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.3
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: 2025-01-13 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,7 +16,7 @@ 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
22
  version: '8.1'
@@ -26,10 +26,50 @@ dependencies:
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
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
@@ -437,6 +441,7 @@ files:
437
441
  - lib/activity_notification/models/concerns/target.rb
438
442
  - lib/activity_notification/models/notification.rb
439
443
  - lib/activity_notification/models/subscription.rb
444
+ - lib/activity_notification/notification_resilience.rb
440
445
  - lib/activity_notification/optional_targets/action_cable_api_channel.rb
441
446
  - lib/activity_notification/optional_targets/action_cable_channel.rb
442
447
  - lib/activity_notification/optional_targets/amazon_sns.rb
@@ -533,10 +538,12 @@ files:
533
538
  - spec/generators/views_generator_spec.rb
534
539
  - spec/helpers/polymorphic_helpers_spec.rb
535
540
  - spec/helpers/view_helpers_spec.rb
541
+ - spec/jobs/notification_resilience_job_spec.rb
536
542
  - spec/jobs/notify_all_job_spec.rb
537
543
  - spec/jobs/notify_job_spec.rb
538
544
  - spec/jobs/notify_to_job_spec.rb
539
545
  - spec/mailers/mailer_spec.rb
546
+ - spec/mailers/notification_resilience_spec.rb
540
547
  - spec/models/dummy/dummy_group_spec.rb
541
548
  - spec/models/dummy/dummy_notifiable_spec.rb
542
549
  - spec/models/dummy/dummy_notifier_spec.rb
@@ -570,6 +577,7 @@ files:
570
577
  - spec/rails_app/app/controllers/users/subscriptions_with_devise_controller.rb
571
578
  - spec/rails_app/app/controllers/users_controller.rb
572
579
  - spec/rails_app/app/helpers/application_helper.rb
580
+ - spec/rails_app/app/helpers/devise_helper.rb
573
581
  - spec/rails_app/app/javascript/App.vue
574
582
  - spec/rails_app/app/javascript/components/DeviseTokenAuth.vue
575
583
  - spec/rails_app/app/javascript/components/Top.vue
@@ -647,6 +655,7 @@ files:
647
655
  - spec/rails_app/config/initializers/mysql.rb
648
656
  - spec/rails_app/config/initializers/session_store.rb
649
657
  - spec/rails_app/config/initializers/wrap_parameters.rb
658
+ - spec/rails_app/config/initializers/zeitwerk.rb
650
659
  - spec/rails_app/config/locales/activity_notification.en.yml
651
660
  - spec/rails_app/config/locales/devise.en.yml
652
661
  - spec/rails_app/config/mongoid.yml
@@ -752,10 +761,12 @@ test_files:
752
761
  - spec/generators/views_generator_spec.rb
753
762
  - spec/helpers/polymorphic_helpers_spec.rb
754
763
  - spec/helpers/view_helpers_spec.rb
764
+ - spec/jobs/notification_resilience_job_spec.rb
755
765
  - spec/jobs/notify_all_job_spec.rb
756
766
  - spec/jobs/notify_job_spec.rb
757
767
  - spec/jobs/notify_to_job_spec.rb
758
768
  - spec/mailers/mailer_spec.rb
769
+ - spec/mailers/notification_resilience_spec.rb
759
770
  - spec/models/dummy/dummy_group_spec.rb
760
771
  - spec/models/dummy/dummy_notifiable_spec.rb
761
772
  - spec/models/dummy/dummy_notifier_spec.rb
@@ -789,6 +800,7 @@ test_files:
789
800
  - spec/rails_app/app/controllers/users/subscriptions_with_devise_controller.rb
790
801
  - spec/rails_app/app/controllers/users_controller.rb
791
802
  - spec/rails_app/app/helpers/application_helper.rb
803
+ - spec/rails_app/app/helpers/devise_helper.rb
792
804
  - spec/rails_app/app/javascript/App.vue
793
805
  - spec/rails_app/app/javascript/components/DeviseTokenAuth.vue
794
806
  - spec/rails_app/app/javascript/components/Top.vue
@@ -866,6 +878,7 @@ test_files:
866
878
  - spec/rails_app/config/initializers/mysql.rb
867
879
  - spec/rails_app/config/initializers/session_store.rb
868
880
  - spec/rails_app/config/initializers/wrap_parameters.rb
881
+ - spec/rails_app/config/initializers/zeitwerk.rb
869
882
  - spec/rails_app/config/locales/activity_notification.en.yml
870
883
  - spec/rails_app/config/locales/devise.en.yml
871
884
  - spec/rails_app/config/mongoid.yml