Skip to content

Commit d63ddee

Browse files
authored
Add lazy load hooks for delivery methods (#538)
1 parent 010aa38 commit d63ddee

File tree

16 files changed

+32
-0
lines changed

16 files changed

+32
-0
lines changed

lib/noticed/bulk_delivery_methods/bluesky.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ def identifier
4747
end
4848
end
4949
end
50+
51+
ActiveSupport.run_load_hooks :noticed_bulk_delivery_methods_bluesky, Noticed::BulkDeliveryMethods::Bluesky

lib/noticed/bulk_delivery_methods/discord.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ def deliver
99
end
1010
end
1111
end
12+
13+
ActiveSupport.run_load_hooks :noticed_bulk_delivery_methods_discord, Noticed::BulkDeliveryMethods::Discord

lib/noticed/bulk_delivery_methods/slack.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ def success?(response)
3737
end
3838
end
3939
end
40+
41+
ActiveSupport.run_load_hooks :noticed_bulk_delivery_methods_slack, Noticed::BulkDeliveryMethods::Slack

lib/noticed/bulk_delivery_methods/test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ def deliver
99
end
1010
end
1111
end
12+
13+
ActiveSupport.run_load_hooks :noticed_bulk_delivery_methods_test, Noticed::BulkDeliveryMethods::Test

lib/noticed/bulk_delivery_methods/webhook.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ def deliver
1616
end
1717
end
1818
end
19+
20+
ActiveSupport.run_load_hooks :noticed_bulk_delivery_methods_webhook, Noticed::BulkDeliveryMethods::Webhook

lib/noticed/delivery_methods/action_cable.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ def stream
1717
end
1818
end
1919
end
20+
21+
ActiveSupport.run_load_hooks :noticed_delivery_methods_action_cable, Noticed::DeliveryMethods::ActionCable

lib/noticed/delivery_methods/discord.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ def deliver
99
end
1010
end
1111
end
12+
13+
ActiveSupport.run_load_hooks :noticed_delivery_methods_discord, Noticed::DeliveryMethods::Discord

lib/noticed/delivery_methods/email.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ def params
2121
end
2222
end
2323
end
24+
25+
ActiveSupport.run_load_hooks :noticed_delivery_methods_email, Noticed::DeliveryMethods::Email

lib/noticed/delivery_methods/fcm.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ def access_token
6666
end
6767
end
6868
end
69+
70+
ActiveSupport.run_load_hooks :noticed_delivery_methods_fcm, Noticed::DeliveryMethods::Fcm

lib/noticed/delivery_methods/ios.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,5 @@ def pool_options
9191
end
9292
end
9393
end
94+
95+
ActiveSupport.run_load_hooks :noticed_delivery_methods_ios, Noticed::DeliveryMethods::Ios

0 commit comments

Comments
 (0)