noticed 1.2.18 → 1.2.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: deee1f4f64ac8d04fafc5b9a6fb0c25811361fa650a4a337e4e134159ff82a23
4
- data.tar.gz: dae9d38da48b00c508460b7ccf3a797df8a69cea372f2738a374321bb9d6a033
3
+ metadata.gz: 0e9bdeaab06d2b6aa2022dad0ed115e8a64e829d25276be05ffaec64d17116f3
4
+ data.tar.gz: ea1376e7faf08a81f2d691b0fec82f4a81647d3423f48260ac3d29b486f91a50
5
5
  SHA512:
6
- metadata.gz: 9a690b58c36dbf4651734192b59242f4c18cc9bbafeaed95c5570ed4991b48f49610b351f636fb2ca3d64120263b0780c8a15fd7ee9c4f8a7cc7099ab8e959c2
7
- data.tar.gz: f6f765115f53b1e9ec03ecef10da432ce0794a11a6cc8cac444fe724db1ecdb6c4ce967edff8aa86d5f5edfef424f0b9e605939e0de8cf68b4b89bfb6ad2b207
6
+ metadata.gz: 83514df616ee5334f50635cdf0be44a75919529dc2b35133175e49fc17f61fdf55f0a6d8401476262dbd9da4ae6f723361757df1cacea8f8091d10240459477f
7
+ data.tar.gz: 887876dd5b12f140829cb518ed9ccbff733bdd2d54486e16d7f088bb6fc1b3d6467d0efdd20336bd49fd044c7622b28b728ad7280e1c29e3ef508c23feff6124
data/README.md CHANGED
@@ -187,7 +187,7 @@ Writes notification to the database.
187
187
 
188
188
  `deliver_by :database`
189
189
 
190
- **Note:** Database notifications are special in that they will run before the other delivery methods. We do this so you can reference the database record ID in other delivery methods.
190
+ **Note:** Database notifications are special in that they will run before the other delivery methods. We do this so you can reference the database record ID in other delivery methods. For that same reason, the delivery can't be delayed (via the `delay` option) or an error will be raised.
191
191
 
192
192
  ##### Options
193
193
 
@@ -6,6 +6,13 @@ module Noticed
6
6
  recipient.send(association_name).create!(attributes)
7
7
  end
8
8
 
9
+ def self.validate!(options)
10
+ super
11
+
12
+ # Must be executed right away so the other deliveries can access the db record
13
+ raise ArgumentError, "database delivery cannot be delayed" if options.key?(:delay)
14
+ end
15
+
9
16
  private
10
17
 
11
18
  def association_name
@@ -1,3 +1,3 @@
1
1
  module Noticed
2
- VERSION = "1.2.18"
2
+ VERSION = "1.2.19"
3
3
  end
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: 1.2.18
4
+ version: 1.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-10 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails