sync_machine 0.7.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: 9ca21c3aabdb630357d8ac6cd7327c77f6f584e5b5da12fd2f9ede90b6c63f8f
4
- data.tar.gz: 3d95e1f87cff56dd1f60e05c81ca1d5fff6ba0b7aec6fbdba82561e460ebb8de
3
+ metadata.gz: 5ff0993b78b5917c0558c23728cb9ba979dd7bbc401882dfb9a0eb30e81235c5
4
+ data.tar.gz: 5925e563d2a00a97fdfe71c4a44277ce9debeed601cb3253703c11d65f19d956
5
5
  SHA512:
6
- metadata.gz: 228727b827e081785e5e0f3dbef4edd18741b7e2e930518356004d88560dddfe3b8dd631b0dfd40909cd6818bc878f131afb946648875a967145474451cfa8e1
7
- data.tar.gz: 15996c327310fec7441d492e4b70bcf84d658d827754b0b7d289c00e537ab8ca96170bfafee192c35242554deadc1898005eca79ba04a5f54456895811183626
6
+ metadata.gz: 71e46f8ea02796d4df3f0f834695636c819968d4c4e5e4feccb598884febaf8b85862bda68f64f950c22aad2cbab6c5a62363ae5743d2d6cf1e6f5bcb6436123
7
+ data.tar.gz: 39ec534919d564e87cb075e8f6eabc14bb976fd9edbaa76e6e98b31ae26c6ad802eb83a18ffd00a3ad0a24bb393741246d2b80a2d08ab0e6354c8ae0afb0830b
@@ -14,7 +14,10 @@ module SyncMachine
14
14
  end
15
15
 
16
16
  def self.method_missing(meth, *args, &block)
17
- if meth.to_s =~ /^subject_ids_from_.*/
17
+ if meth.to_s == "subject_ids_from_#{parent.subject_sym}"
18
+ block ||= ->(subject) { [subject.id.to_s] }
19
+ hooks[meth] = Hook.new(block)
20
+ elsif meth.to_s =~ /^subject_ids_from_.*/
18
21
  hooks[meth] = Hook.new(block)
19
22
  else
20
23
  super
@@ -1,3 +1,3 @@
1
1
  module SyncMachine
2
- VERSION = "0.7.0".freeze
2
+ VERSION = "0.8.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sync_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Hwang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-31 00:00:00.000000000 Z
11
+ date: 2019-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport