noticed 2.4.0 → 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/README.md +2 -2
- data/app/jobs/noticed/event_job.rb +1 -1
- data/app/models/noticed/deliverable/deliver_by.rb +1 -1
- data/lib/noticed/bulk_delivery_method.rb +1 -1
- data/lib/noticed/delivery_method.rb +1 -1
- data/lib/noticed/delivery_methods/fcm.rb +1 -1
- data/lib/noticed/delivery_methods/ios.rb +1 -1
- data/lib/noticed/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d2028c8acaa806c4ce94491efc21e4cef94756bed16fbcb6ac26d03844d8965
|
4
|
+
data.tar.gz: 7b8842063ae43ec9bc9ea1630c912c6529546c3ece674b5f61a55d066a331de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 335ae225976b95869a72ba274a37000279161045826afcce6f966e3ef7fd42bfaf94acc754667823ea3ec5f0ac526b2b67f9244ce79c6dd20a8e7e7b7c9193b6
|
7
|
+
data.tar.gz: 1aef782254a0421f905519871b5c553d0b3ae85c119347016a9b0805f8af6c349105991bf0ace186bb71349a6f767f22ff4a46a08765b46df17c7c5aa60fd942
|
data/README.md
CHANGED
@@ -85,7 +85,7 @@ rails generate noticed:notifier NewCommentNotifier
|
|
85
85
|
- [Tip: Capture User Preferences](#tip-capture-user-preferences)
|
86
86
|
- [Tip: Extracting Delivery Method Configurations](#tip-extracting-delivery-method-configurations)
|
87
87
|
- [Shared Delivery Method Options](#shared-delivery-method-options)
|
88
|
-
- [Sending Notifications](
|
88
|
+
- [Sending Notifications](#-sending-notifications)
|
89
89
|
- [Custom Noticed Model Methods](#custom-noticed-model-methods)
|
90
90
|
|
91
91
|
### Notifier Objects
|
@@ -525,7 +525,7 @@ If you want to build your own delivery method to deliver notifications to a spec
|
|
525
525
|
|
526
526
|
`rails generate noticed:delivery_method Discord`
|
527
527
|
|
528
|
-
This will generate a new `DeliveryMethods::Discord` class inside the `app/notifiers/delivery_methods` folder, which can be used to deliver notifications to Discord.
|
528
|
+
This will generate a new `ApplicationDeliveryMethod` and `DeliveryMethods::Discord` class inside the `app/notifiers/delivery_methods` folder, which can be used to deliver notifications to Discord.
|
529
529
|
|
530
530
|
```ruby
|
531
531
|
class DeliveryMethods::Discord < ApplicationDeliveryMethod
|
@@ -40,7 +40,7 @@ module Noticed
|
|
40
40
|
event.instance_exec(&option)
|
41
41
|
|
42
42
|
# Call method if symbol and matching method
|
43
|
-
elsif option.is_a?(Symbol) && event.respond_to?(option)
|
43
|
+
elsif option.is_a?(Symbol) && event.respond_to?(option, true)
|
44
44
|
event.send(option)
|
45
45
|
|
46
46
|
# Return the value
|
@@ -50,7 +50,7 @@ module Noticed
|
|
50
50
|
notification.instance_exec(&option)
|
51
51
|
|
52
52
|
# Call method if symbol and matching method on Notifier
|
53
|
-
elsif option.is_a?(Symbol) && event.respond_to?(option)
|
53
|
+
elsif option.is_a?(Symbol) && event.respond_to?(option, true)
|
54
54
|
event.send(option, notification)
|
55
55
|
|
56
56
|
# Return the value
|
@@ -25,7 +25,7 @@ module Noticed
|
|
25
25
|
|
26
26
|
def format_notification(device_token)
|
27
27
|
method = config[:json]
|
28
|
-
if method.is_a?(Symbol) && event.respond_to?(method)
|
28
|
+
if method.is_a?(Symbol) && event.respond_to?(method, true)
|
29
29
|
event.send(method, device_token)
|
30
30
|
else
|
31
31
|
notification.instance_exec(device_token, &method)
|
@@ -34,7 +34,7 @@ module Noticed
|
|
34
34
|
|
35
35
|
method = config[:format]
|
36
36
|
# Call method on Notifier if defined
|
37
|
-
if method&.is_a?(Symbol) && event.respond_to?(method)
|
37
|
+
if method&.is_a?(Symbol) && event.respond_to?(method, true)
|
38
38
|
event.send(method, notification, apn)
|
39
39
|
# If Proc, evaluate it on the Notification
|
40
40
|
elsif method&.respond_to?(:call)
|
data/lib/noticed/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noticed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.5.
|
103
|
+
rubygems_version: 3.5.15
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Notifications for Ruby on Rails applications
|