state-notifier 0.0.2 → 0.0.3
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/lib/state/notifier/version.rb +1 -1
- data/lib/state/notifier.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e4f283a3636c8326922d04e4691e30ce61f7805
|
|
4
|
+
data.tar.gz: 280b8230def23a57c33090c6c75b6f18e6f5f52d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cb0cc877ec19e4e7d3b65fbaa8ebfc9245aa271887c5482c171cf3be1d6c7b4461477b1ad177f7a2b3a43d349222e509b55dcf66022ceb0749734a08bc16aea
|
|
7
|
+
data.tar.gz: 922dd2356cde0cbe8e4af59eabe40aa66faefbc60863bd143ed2312f86b92facf4baf984dff78afa95a429dde9ce815f8295721897a1a98f4657e224651d29ee
|
data/README.md
CHANGED
|
@@ -22,8 +22,8 @@ Or install it yourself as:
|
|
|
22
22
|
belongs_to :provider, ...
|
|
23
23
|
has_many :participants, ...
|
|
24
24
|
|
|
25
|
-
include
|
|
26
|
-
notification_targets :provider, :participants
|
|
25
|
+
include State::Notifier
|
|
26
|
+
notification_targets :provider, :participants, EventMailer
|
|
27
27
|
|
|
28
28
|
state_machine do
|
|
29
29
|
...
|
data/lib/state/notifier.rb
CHANGED
|
@@ -8,7 +8,9 @@ module State
|
|
|
8
8
|
name = self.class.name.underscore
|
|
9
9
|
method = [name, event] * '_'
|
|
10
10
|
|
|
11
|
-
targets = self.class.notification_targets.map
|
|
11
|
+
targets = self.class.notification_targets.map do |m|
|
|
12
|
+
m.is_a?(Symbol) ? send(m) : m
|
|
13
|
+
end.flatten
|
|
12
14
|
Rails.logger.debug "StateNotifier: notifying #{method}, #{targets.size} targets"
|
|
13
15
|
|
|
14
16
|
targets.each do |t|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: state-notifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vitaly Kushner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|