kennel 1.50.1 → 1.51.0
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 +4 -4
- data/lib/kennel/syncer.rb +14 -3
- data/lib/kennel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf65db42c0f1dbd43a7f2a6d0910a018565db65e431cea3c39b88d796b1ccce0
|
4
|
+
data.tar.gz: 1d0db8fca3e1f1b9d4085ae1e783b2b6f28a0ae3682ba9b2b743612b1b71b5dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a774657cac63f4080d9767453ccf5e9c301aaaf2cae15486e26f87e54c851dc9246421cb6aa16f585a7311748dc6031ed6a65124c1cf01d19669ca1604ff78ab
|
7
|
+
data.tar.gz: a922269b47847376d1287e42a06aed1fe4fdbab3c0a8f550f9983fe1d2823314c186e3f809dbb2ea607446d67fd6f168d28e113dd8f0d33428ead5979deae804
|
data/lib/kennel/syncer.rb
CHANGED
@@ -72,11 +72,22 @@ module Kennel
|
|
72
72
|
filter_by_project! actual
|
73
73
|
|
74
74
|
details_cache do |cache|
|
75
|
-
actual.
|
76
|
-
id = a.fetch(:id)
|
75
|
+
items = actual.map do |a|
|
77
76
|
e = matching_expected(a)
|
78
77
|
if e && @expected.delete(e)
|
79
|
-
|
78
|
+
[e, a]
|
79
|
+
else
|
80
|
+
[nil, a]
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# fill details of things we need to compare (only do this part in parallel for safety & balancing)
|
85
|
+
Utils.parallel(items.select { |e, _| e && e.class::API_LIST_INCOMPLETE }) { |_, a| fill_details(a, cache) }
|
86
|
+
|
87
|
+
# pick out things to update or delete
|
88
|
+
items.each do |e, a|
|
89
|
+
id = a.fetch(:id)
|
90
|
+
if e
|
80
91
|
diff = e.diff(a)
|
81
92
|
@update << [id, e, a, diff] if diff.any?
|
82
93
|
elsif tracking_id(a) # was previously managed
|
data/lib/kennel/version.rb
CHANGED