triggerable 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/triggerable.rb +1 -1
- data/lib/triggerable/engine.rb +2 -2
- data/lib/triggerable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49133136262b0acdb06a687a60c018db263d8a04
|
4
|
+
data.tar.gz: 4385cdecc97b3520259cd1c59f60228e00a8fd87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b8e5ab08307ff8886086dab858e95b9a3df770fa59ea8296a331d16b6397cf18643231a2351b987787aedc61961a7a44db3628811d4f40968150fad7fd5a8ab
|
7
|
+
data.tar.gz: bd7b0953dba3f5e765b13a4d3460e4612c33075748417bfe89ab602b9fa3a639b0e2d579992fe7190ad6f2e06c16c3e61fba92454feca21ba3702e6289def0c3
|
data/lib/triggerable.rb
CHANGED
data/lib/triggerable/engine.rb
CHANGED
@@ -12,8 +12,8 @@ class Engine
|
|
12
12
|
self.automations << Rules::Automation.new(model, options, block)
|
13
13
|
end
|
14
14
|
|
15
|
-
def self.triggers_for
|
16
|
-
triggers.select{|t| t.model
|
15
|
+
def self.triggers_for obj, callback
|
16
|
+
triggers.select{|t| obj.is_a?(t.model) && t.callback == callback }
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.run_automations interval
|
data/lib/triggerable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: triggerable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.
|
177
|
+
rubygems_version: 2.4.2
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: Triggerable is a powerful engine for adding a conditional behaviour for ActiveRecord
|