triggerable 0.1.15 → 0.1.16
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/rules/automation.rb +1 -1
- data/lib/triggerable/version.rb +1 -1
- data/spec/scopes_spec.rb +3 -3
- 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: 028658b0ddf347d856dbeda24c96e39579f4b6c2
|
4
|
+
data.tar.gz: c7818e0a0a5d22679f6132dba443d7eded262bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32583ca8a038bb161c9fe4226563b62e2460016fe3645c5340d48a6fe4d05629d1eb197c6b3e58dac994aa1ec20f4f9c28e089335876b2e85c200283e00d4053
|
7
|
+
data.tar.gz: b2c484e8f0c4c87888c361fdecd2a2decc7d6c77289e56f5cb65f5b71a432a35831cab042e3f397685268afecaaf55a2fff873a3eca096babe5f3183a7332721
|
data/lib/triggerable.rb
CHANGED
data/lib/triggerable/version.rb
CHANGED
data/spec/scopes_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe 'Scopes' do
|
|
11
11
|
|
12
12
|
context 'field conditions' do
|
13
13
|
def model_ids_for condition_class, arg
|
14
|
-
table =
|
14
|
+
table = ParentModel.arel_table
|
15
15
|
scope = condition_class.new(:integer_field, arg).scope(table)
|
16
16
|
query = table.where(scope).project(Arel.sql('id')).to_sql
|
17
17
|
|
@@ -59,7 +59,7 @@ describe 'Scopes' do
|
|
59
59
|
and_condition = condition_class.new([])
|
60
60
|
and_condition.conditions = [Triggerable::Conditions::Is.new(:integer_field, 1), Triggerable::Conditions::Is.new(:string_field, 'c')]
|
61
61
|
|
62
|
-
table =
|
62
|
+
table = ParentModel.arel_table
|
63
63
|
query = table.where(and_condition.scope(table)).project(Arel.sql('id')).to_sql
|
64
64
|
|
65
65
|
ParentModel.connection.execute(query).map { |r| r['id'] }
|
@@ -75,4 +75,4 @@ describe 'Scopes' do
|
|
75
75
|
expect(ids).to eq([@m1.id, @m3.id])
|
76
76
|
end
|
77
77
|
end
|
78
|
-
end
|
78
|
+
end
|
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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.6.6
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Triggerable is a powerful engine for adding a conditional behaviour for ActiveRecord
|