trogdir_models 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trogdir/sync_log.rb +7 -0
- data/lib/trogdir_models/version.rb +1 -1
- data/spec/factories/change_sync_factory.rb +6 -0
- data/spec/factories/sync_log_factory.rb +10 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f383c224c4d3b60da1abb28b5c1c616663b652c
|
4
|
+
data.tar.gz: 67cafb2056fc38d88b3a1b31f671312dca76c581
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49bdfbb9f4a51109239f1fea13245300c1ece7e93f591195233df650a902535430c95aff2817530a85756d1da89bd5019f80d22ac3f83a8a3b26ad62ed4480ec
|
7
|
+
data.tar.gz: 3e463e11faa193bfe1df9af7b14c17ab5c787344ebe22a55c1c599098c748fcd020a5aa0a6ea156eac37a5165ec420df6c0e983f8cd2d7f2f9a49033e91ecb94
|
data/lib/trogdir/sync_log.rb
CHANGED
@@ -12,4 +12,11 @@ class SyncLog
|
|
12
12
|
validates :started_at, presence: true
|
13
13
|
|
14
14
|
delegate :changeset, to: :change_sync
|
15
|
+
|
16
|
+
def self.find_through_parents(id)
|
17
|
+
id = Moped::BSON::ObjectId(id)
|
18
|
+
changeset = Changeset.find_by('change_syncs.sync_logs._id' => id)
|
19
|
+
change_sync = changeset.change_syncs.find_by('sync_logs._id' => id)
|
20
|
+
change_sync.sync_logs.find(id)
|
21
|
+
end
|
15
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trogdir_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
@@ -161,11 +161,13 @@ files:
|
|
161
161
|
- lib/trogdir_models.rb
|
162
162
|
- lib/trogdir_models/version.rb
|
163
163
|
- spec/factories/address_factory.rb
|
164
|
+
- spec/factories/change_sync_factory.rb
|
164
165
|
- spec/factories/email_factory.rb
|
165
166
|
- spec/factories/id_factory.rb
|
166
167
|
- spec/factories/person_factory.rb
|
167
168
|
- spec/factories/phone_factory.rb
|
168
169
|
- spec/factories/photo_factory.rb
|
170
|
+
- spec/factories/sync_log_factory.rb
|
169
171
|
- spec/factories/syncinator_factory.rb
|
170
172
|
homepage: https://github.com/biola/trogdir-models
|
171
173
|
licenses:
|