synchronized_models 1.0.1alpha → 1.1.0alpha

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: 97b86bc4d6a7eacd3e1c771c71d5042f4b887d112a09f88b6374bbacaae0273c
4
- data.tar.gz: bcf2eab8a352e02c939957646ec990f4a75d35224aaaea9effa5b127938d6d35
3
+ metadata.gz: 6e11e4c5c8a037606fd9947899033c251d68bdfcefa0b2c400803d7ca05bc373
4
+ data.tar.gz: ae9d983326ee88f1025d6fe286282702dfee52a8f518b336e845ec8abb62cf73
5
5
  SHA512:
6
- metadata.gz: 528b3348055586a4a74c50cb2d7cb21c4ad47be9c02c5b906682428e022c19794253c88aa597615e6a1a420d408bc521caaec0df0b33fdaa7d5792861e238e19
7
- data.tar.gz: c16685c9c9676ee883e6604bedaf96597ae487c052346c1c66d61a4182e2567a0cf44df9bab0a3998c5d6e480b57cfd34b8f5656f16743b83b00379064cd465b
6
+ metadata.gz: 7272e76c684e8b1ca1bf6dfedd07413d7213c046e4f58b9255e59df8a980d2508cc2e316ccde199b2e6210e24d510efd6b1bed9be468223becb712c4179a5605
7
+ data.tar.gz: '004008d1162c46ea3462da526c2574f37c035c429ac58655cf4283c1ca1f0f640e6c0f6b466cf2c762155ab8044c0eabbcc9d7b7bf93be47470d16ef9d208905'
@@ -39,7 +39,9 @@ module Kernel
39
39
  # Account::RemoteUser.create email: user@example.com, password: 123456
40
40
  #
41
41
  def sync_remote_model(*args)
42
- configure_sync_constant(*args)
42
+ configure_sync_constant(*args) do |const|
43
+ yield const if block_given?
44
+ end
43
45
  end
44
46
 
45
47
  private
@@ -55,6 +57,8 @@ module Kernel
55
57
  conts.send :table_name=, select_table_name(args).to_s.tableize
56
58
  conts.establish_connection database_adapter
57
59
  end
60
+
61
+ yield synchronized_constant args.fetch(:model_name)
58
62
  end
59
63
 
60
64
  # => *
@@ -1,3 +1,3 @@
1
1
  module SynchronizedModels
2
- VERSION = '1.0.1alpha'
2
+ VERSION = '1.1.0alpha'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synchronized_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1alpha
4
+ version: 1.1.0alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Armando Alejandre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-24 00:00:00.000000000 Z
11
+ date: 2019-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails