activity_notification 2.3.3 → 2.4.1
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.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +8 -41
- data/CHANGELOG.md +31 -0
- data/Gemfile +1 -3
- data/README.md +30 -28
- data/activity_notification.gemspec +5 -5
- data/ai-curated-specs/issues/172/design.md +220 -0
- data/ai-curated-specs/issues/172/tasks.md +326 -0
- data/ai-curated-specs/issues/188/design.md +227 -0
- data/ai-curated-specs/issues/188/requirements.md +78 -0
- data/ai-curated-specs/issues/188/tasks.md +203 -0
- data/ai-curated-specs/issues/188/upstream-contributions.md +592 -0
- data/ai-curated-specs/issues/50/design.md +235 -0
- data/ai-curated-specs/issues/50/requirements.md +49 -0
- data/ai-curated-specs/issues/50/tasks.md +232 -0
- data/app/controllers/activity_notification/notifications_api_controller.rb +22 -0
- data/app/controllers/activity_notification/notifications_controller.rb +27 -1
- data/app/mailers/activity_notification/mailer.rb +2 -2
- data/app/views/activity_notification/notifications/default/_index.html.erb +6 -1
- data/app/views/activity_notification/notifications/default/destroy_all.js.erb +6 -0
- data/docs/Functions.md +5 -11
- data/docs/Setup.md +73 -4
- data/docs/Testing.md +12 -1
- data/gemfiles/Gemfile.rails-7.0 +2 -0
- data/gemfiles/Gemfile.rails-8.0 +0 -2
- data/lib/activity_notification/apis/notification_api.rb +51 -2
- data/lib/activity_notification/controllers/concerns/swagger/notifications_api.rb +59 -0
- data/lib/activity_notification/helpers/view_helpers.rb +28 -0
- data/lib/activity_notification/mailers/helpers.rb +14 -7
- data/lib/activity_notification/models/concerns/swagger/subscription_schema.rb +1 -1
- data/lib/activity_notification/models/concerns/target.rb +16 -0
- data/lib/activity_notification/models.rb +1 -1
- data/lib/activity_notification/notification_resilience.rb +115 -0
- data/lib/activity_notification/orm/dynamoid/extension.rb +4 -87
- data/lib/activity_notification/orm/dynamoid/notification.rb +19 -2
- data/lib/activity_notification/orm/dynamoid.rb +42 -6
- data/lib/activity_notification/rails/routes.rb +1 -0
- data/lib/activity_notification/version.rb +1 -1
- data/lib/activity_notification.rb +1 -0
- data/lib/generators/templates/controllers/notifications_api_controller.rb +5 -0
- data/lib/generators/templates/controllers/notifications_api_with_devise_controller.rb +5 -0
- data/lib/generators/templates/controllers/notifications_controller.rb +5 -0
- data/lib/generators/templates/controllers/notifications_with_devise_controller.rb +5 -0
- data/spec/concerns/apis/notification_api_spec.rb +161 -5
- data/spec/concerns/models/target_spec.rb +7 -0
- data/spec/controllers/controller_spec_utility.rb +2 -2
- data/spec/controllers/notifications_api_controller_shared_examples.rb +113 -0
- data/spec/controllers/notifications_controller_shared_examples.rb +150 -0
- data/spec/generators/migration/migration_generator_spec.rb +18 -4
- data/spec/helpers/view_helpers_spec.rb +14 -0
- data/spec/jobs/notification_resilience_job_spec.rb +167 -0
- data/spec/mailers/notification_resilience_spec.rb +263 -0
- data/spec/models/notification_spec.rb +1 -1
- data/spec/models/subscription_spec.rb +1 -1
- data/spec/rails_app/app/helpers/devise_helper.rb +2 -0
- data/spec/rails_app/config/application.rb +1 -0
- data/spec/rails_app/config/initializers/zeitwerk.rb +10 -0
- metadata +35 -22
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Mongoid 9.0+ compatibility
|
|
2
|
+
if ENV['AN_ORM'] == 'mongoid'
|
|
3
|
+
# Preload helper modules before Rails initialization
|
|
4
|
+
Rails.application.config.before_initialize do
|
|
5
|
+
# Load all helper files manually to avoid Zeitwerk issues
|
|
6
|
+
Dir[Rails.root.join('app', 'helpers', '*.rb')].each do |helper_file|
|
|
7
|
+
require_dependency helper_file
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
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.
|
|
4
|
+
version: 2.4.1
|
|
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-
|
|
11
|
+
date: 2025-12-30 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:
|
|
19
|
+
version: 7.0.0
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: '8.1'
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version:
|
|
29
|
+
version: 7.0.0
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '8.1'
|
|
@@ -93,9 +93,6 @@ dependencies:
|
|
|
93
93
|
- - ">="
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: 1.3.13
|
|
96
|
-
- - "<"
|
|
97
|
-
- !ruby/object:Gem::Version
|
|
98
|
-
version: '2.0'
|
|
99
96
|
type: :development
|
|
100
97
|
prerelease: false
|
|
101
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -103,9 +100,6 @@ dependencies:
|
|
|
103
100
|
- - ">="
|
|
104
101
|
- !ruby/object:Gem::Version
|
|
105
102
|
version: 1.3.13
|
|
106
|
-
- - "<"
|
|
107
|
-
- !ruby/object:Gem::Version
|
|
108
|
-
version: '2.0'
|
|
109
103
|
- !ruby/object:Gem::Dependency
|
|
110
104
|
name: mysql2
|
|
111
105
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -143,7 +137,7 @@ dependencies:
|
|
|
143
137
|
version: 4.0.0
|
|
144
138
|
- - "<"
|
|
145
139
|
- !ruby/object:Gem::Version
|
|
146
|
-
version: '
|
|
140
|
+
version: '10.0'
|
|
147
141
|
type: :development
|
|
148
142
|
prerelease: false
|
|
149
143
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -153,21 +147,27 @@ dependencies:
|
|
|
153
147
|
version: 4.0.0
|
|
154
148
|
- - "<"
|
|
155
149
|
- !ruby/object:Gem::Version
|
|
156
|
-
version: '
|
|
150
|
+
version: '10.0'
|
|
157
151
|
- !ruby/object:Gem::Dependency
|
|
158
152
|
name: dynamoid
|
|
159
153
|
requirement: !ruby/object:Gem::Requirement
|
|
160
154
|
requirements:
|
|
161
|
-
- -
|
|
155
|
+
- - ">="
|
|
156
|
+
- !ruby/object:Gem::Version
|
|
157
|
+
version: 3.11.0
|
|
158
|
+
- - "<"
|
|
162
159
|
- !ruby/object:Gem::Version
|
|
163
|
-
version:
|
|
160
|
+
version: '4.0'
|
|
164
161
|
type: :development
|
|
165
162
|
prerelease: false
|
|
166
163
|
version_requirements: !ruby/object:Gem::Requirement
|
|
167
164
|
requirements:
|
|
168
|
-
- -
|
|
165
|
+
- - ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: 3.11.0
|
|
168
|
+
- - "<"
|
|
169
169
|
- !ruby/object:Gem::Version
|
|
170
|
-
version:
|
|
170
|
+
version: '4.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
|