syncify 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a23e94b5f7ffe7b8015aeb19a88a96835a4bfe06
4
- data.tar.gz: 8134d393be46563dc8d601be98a66160451720b1
3
+ metadata.gz: 918d5747cc4a3d0201d61abf97f9df7958ee8df4
4
+ data.tar.gz: 7622eec95427ad3ef9ea72c121e80eb24e4cd372
5
5
  SHA512:
6
- metadata.gz: 034efd30cd004dc2aa74d00aa7dbbba5906286435acc5a40d85517174bdf3a440831fe0bf5db3d32c7fb049dfc06834aaeec8eab9e3fbeb467842d35f5ffca86
7
- data.tar.gz: 600c4a061920e6b95e14ea8bcbe9c59cb7435e2714825c3ed9cba22ac6420419b46f147251ce2c118979fc19dc3c2456f55c5dfd6ef3c700a5e9d378985ac771
6
+ metadata.gz: 6c70d65b27921b1fc1a832ccfa73bd2f3608e054f465c090a2563b47bea27b552c71aef7caf60bd8aa7323146e2ba606a2977480d990093e39fa746d6f25a37f
7
+ data.tar.gz: c4b95f203fbf555decd87f64629235036c44bd3ce39e4c334e29cb7a0084886acb7f19b290907212f4ac66c6226a35b5a58be17c5c77661ad200c96656ce7f26
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- syncify (0.1.9)
4
+ syncify (0.1.10)
5
5
  active_interaction (~> 3.0)
6
6
  activerecord (~> 5.0)
7
7
  activerecord-import (~> 0.17)
data/README.md CHANGED
@@ -282,12 +282,12 @@ All hints have two methods:
282
282
 
283
283
  You are most likely to use the `BasicHint` class. This class has a constructor that accepts the following arguments:
284
284
 
285
- | Argument | Type | Default | Description |
286
- | ------------- | -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
287
- | `from_class` | Class or array of classes | nil | If provided, the `from_class` argument declares that the hint applies to associations from the specified class or classes. |
288
- | `association` | Symbol or array of symbols | nil | If provided, the `association` argument declares that the hint applies to associations with the specified name or names. |
289
- | `to_class` | Class or array of classes | nil | If provided, the `to_class` argument declares that the hint applies to associations to the specified class or classes. |
290
- | `allowed` | Boolean (required) | | This argument indicates that if the hint is applicable to a particular association that it is or is not allowed, meaning that the `IdentifyAssociations` class will or will not ignore it. |
285
+ | Argument | Type | Default | Description |
286
+ | ------------- | ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
287
+ | `from_class` | Class or array of classes | nil | If provided, the `from_class` argument declares that the hint applies to associations from the specified class or classes. |
288
+ | `association` | Symbol or array of symbols or regex | nil | If provided, the `association` argument declares that the hint applies to associations with the specified name or names or names matching the specified regular expression. |
289
+ | `to_class` | Class or array of classes | nil | If provided, the `to_class` argument declares that the hint applies to associations to the specified class or classes. |
290
+ | `allowed` | Boolean (required) | | This argument indicates that if the hint is applicable to a particular association that it is or is not allowed, meaning that the `IdentifyAssociations` class will or will not ignore it. |
291
291
 
292
292
  Hints can be specified for use by `IdentifyAssociations` like so:
293
293
 
@@ -67,12 +67,12 @@ module Syncify
67
67
  polymorphic_associations = associations.select(&method(:includes_polymorphic_association))
68
68
 
69
69
  standard_associations.each do |association|
70
- begin
71
- traverse_associations(root.class.eager_load(association).find(root.id), association)
72
- rescue StandardError => e
73
- binding.pry
74
- x = 1231231231
75
- end
70
+ # begin
71
+ traverse_associations(root.class.eager_load(association).find(root.id), association)
72
+ # rescue StandardError => e
73
+ # binding.pry
74
+ # x = 1231231231
75
+ # end
76
76
  end
77
77
 
78
78
  identify_polymorphic_associated_records(root, polymorphic_associations)
@@ -159,17 +159,17 @@ module Syncify
159
159
 
160
160
  has_and_belongs_to_many_associations.each do |record, associations|
161
161
  associations.each do |association, associated_records|
162
- begin
163
- local_record = record.class.find(record.id)
164
- local_associated_records = associated_records.map do |associated_record|
165
- associated_record.class.find(associated_record.id)
166
- end
167
- local_record.__send__(association) << local_associated_records
168
- local_record.save
169
- rescue StandardError => e
170
- binding.pry
171
- x = 123
162
+ # begin
163
+ local_record = record.class.find(record.id)
164
+ local_associated_records = associated_records.map do |associated_record|
165
+ associated_record.class.find(associated_record.id)
172
166
  end
167
+ local_record.__send__(association) << local_associated_records
168
+ local_record.save
169
+ # rescue StandardError => e
170
+ # binding.pry
171
+ # x = 123
172
+ # end
173
173
  end
174
174
  end
175
175
  end
@@ -1,3 +1,3 @@
1
1
  module Syncify
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syncify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Hughes
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-24 00:00:00.000000000 Z
11
+ date: 2019-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler