state-notifier 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 5a486acbfdf6f0523762786f7883f6dbe4daf2e8
4
- data.tar.gz: 129146b1d147f4b21977629bf00d78eb83a5e56e
3
+ metadata.gz: 4e4f283a3636c8326922d04e4691e30ce61f7805
4
+ data.tar.gz: 280b8230def23a57c33090c6c75b6f18e6f5f52d
5
5
  SHA512:
6
- metadata.gz: 600c88655af39a66129dc332e0eb27c44448bfba8af3811e660df0eb0ffad3584374a46c1d5c85fdd3f36514dc7b95b65b11f27ba280b74f11450b81ef660cf6
7
- data.tar.gz: a5118a3efe600f89e52e464501df31c8856a21315d9cd773e5bb95c21cc98b01b28634426797b0a64bc0b3093457b4b758c3d8132963baf439cae8cbf4b8e7bf
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 StateNotifier
26
- notification_targets :provider, :participants
25
+ include State::Notifier
26
+ notification_targets :provider, :participants, EventMailer
27
27
 
28
28
  state_machine do
29
29
  ...
@@ -1,5 +1,5 @@
1
1
  module State
2
2
  module Notifier
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -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 {|m| send(m)}.flatten
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.2
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-05 00:00:00.000000000 Z
11
+ date: 2014-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler