nuntius 1.6.0 → 1.6.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/app/models/nuntius/concerns/events_transaction.rb +6 -4
- data/lib/nuntius/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cdf58ba665e61a725d24a5b44548910f26dff54debf0dc58a0af46632f7e1af4
|
|
4
|
+
data.tar.gz: 309523efbd93975d09f6b5f956235026f22d666bc0dbcd17f104f7b06a267671
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6c1dbdaf3164b449072282fd8c4260b8b7fb3d9a42f8e41d075bff1d0d46b1cbfa0a3f5b10cc2ad4464d2dad29d6de968907eaf4b99f63b6229d6e3511567ab
|
|
7
|
+
data.tar.gz: 11d7233149ff42be1a57e0a6adc2e535893075f068e607fc01d78d3fdbf42864850e63547188fd3154ba69263058c76266f8686d10c117f10a3ec211b7fe04b6
|
|
@@ -34,12 +34,14 @@ module Nuntius
|
|
|
34
34
|
.where(transitionable_type: self.class.name, transitionable_id: id)
|
|
35
35
|
.includes(:transitionable)
|
|
36
36
|
.select(:transition_event, :transition_attribute, :transitionable_type, :transitionable_id).distinct.each do |event|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Nuntius::Event.where(transitionable_type: self.class.name, transitionable_id: id,
|
|
37
|
+
# Claim the events before dispatching: another commit of this object, in this process or
|
|
38
|
+
# another, may be dispatching them as well, and only the one that deletes them sends
|
|
39
|
+
claimed = Nuntius::Event.where(transitionable_type: self.class.name, transitionable_id: id,
|
|
41
40
|
transition_event: event.transition_event.to_s,
|
|
42
41
|
transition_attribute: event.transition_attribute).delete_all
|
|
42
|
+
next if claimed.zero?
|
|
43
|
+
|
|
44
|
+
Nuntius.event(event.transition_event.to_sym, event.transitionable)
|
|
43
45
|
end
|
|
44
46
|
end
|
|
45
47
|
end
|
data/lib/nuntius/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nuntius
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom de Grunt
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: apnotic
|
|
@@ -603,7 +602,6 @@ homepage: https://github.com/entdec/nuntius
|
|
|
603
602
|
licenses:
|
|
604
603
|
- MIT
|
|
605
604
|
metadata: {}
|
|
606
|
-
post_install_message:
|
|
607
605
|
rdoc_options: []
|
|
608
606
|
require_paths:
|
|
609
607
|
- lib
|
|
@@ -618,8 +616,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
618
616
|
- !ruby/object:Gem::Version
|
|
619
617
|
version: '0'
|
|
620
618
|
requirements: []
|
|
621
|
-
rubygems_version: 3.
|
|
622
|
-
signing_key:
|
|
619
|
+
rubygems_version: 3.6.9
|
|
623
620
|
specification_version: 4
|
|
624
621
|
summary: Easily send emails, sms messages, teams & slack messages, and push notifications
|
|
625
622
|
from your Rails app.
|