kintsugi 0.7.4 → 0.7.6
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/kintsugi.gemspec +1 -1
- data/lib/kintsugi/apply_change_to_project.rb +8 -9
- data/lib/kintsugi/version.rb +1 -1
- data/spec/kintsugi_apply_change_to_project_spec.rb +205 -291
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 753d014ed99df9c4fb39b551cc44fbb97031dc6b3ec3ec63412bfc4b6f049054
|
4
|
+
data.tar.gz: eb79aa5f506e711144a7c4774841431a3812fb938349b0d97009120c3c7edcb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84e3842505cdaadcd95abfeb4100d9c12f0621be1947f82f4eb7c9022588b29341c6f9241df0d4efa89333e233e2fb80b5fe9fbe6fbd4cb4c457b867154709a7
|
7
|
+
data.tar.gz: c5ab8281e2bbac6dde4c985416608fe6440bbee0379f5ad3c7d421bafae89730fe1411041b34180ec64fecb890d6a34515c141d3cb186d6aa44b14d08b21a8db
|
data/kintsugi.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "tty-prompt", "~> 0"
|
26
|
-
spec.add_dependency "xcodeproj", ">= 1.19.0", "<= 1.
|
26
|
+
spec.add_dependency "xcodeproj", ">= 1.19.0", "<= 1.24.0"
|
27
27
|
|
28
28
|
spec.add_development_dependency "git", "~> 1.11"
|
29
29
|
spec.add_development_dependency "rake", "~> 13.0"
|
@@ -306,7 +306,8 @@ module Kintsugi
|
|
306
306
|
component = child_component(parent_component, change_name)
|
307
307
|
elsif change[:added].is_a?(Array)
|
308
308
|
(change[:added]).each do |added_change|
|
309
|
-
add_child_to_component(parent_component, added_change,
|
309
|
+
add_child_to_component(parent_component, added_change,
|
310
|
+
join_path(change_path, added_change["displayName"]))
|
310
311
|
end
|
311
312
|
elsif !change[:added].nil?
|
312
313
|
raise MergeError, "Unsupported added change type for #{change[:added]}"
|
@@ -341,9 +342,8 @@ module Kintsugi
|
|
341
342
|
else
|
342
343
|
parent_component
|
343
344
|
end
|
344
|
-
parent_change_path = change_path.split("/")[0...-1].join("/")
|
345
345
|
add_child_to_component(non_object_list_parent, source_project_component.to_tree_hash,
|
346
|
-
|
346
|
+
change_path)
|
347
347
|
component_at_path(non_object_list_parent.project, change_path)
|
348
348
|
end
|
349
349
|
|
@@ -637,9 +637,7 @@ module Kintsugi
|
|
637
637
|
end
|
638
638
|
end
|
639
639
|
|
640
|
-
def add_child_to_component(component, change,
|
641
|
-
change_path = join_path(component_change_path, change["displayName"])
|
642
|
-
|
640
|
+
def add_child_to_component(component, change, change_path)
|
643
641
|
if change["ProjectRef"] && change["ProductGroup"]
|
644
642
|
add_subproject_reference(component, change, change_path)
|
645
643
|
return
|
@@ -1031,13 +1029,14 @@ module Kintsugi
|
|
1031
1029
|
next
|
1032
1030
|
end
|
1033
1031
|
|
1032
|
+
child_path = join_path(change_path, change_name)
|
1034
1033
|
case change_value
|
1035
1034
|
when Hash
|
1036
|
-
add_child_to_component(component, change_value,
|
1035
|
+
add_child_to_component(component, change_value, child_path)
|
1037
1036
|
when Array
|
1038
1037
|
change_value.each do |added_attribute_element|
|
1039
|
-
|
1040
|
-
|
1038
|
+
element_path = join_path(child_path, added_attribute_element["displayName"])
|
1039
|
+
add_child_to_component(component, added_attribute_element, element_path)
|
1041
1040
|
end
|
1042
1041
|
else
|
1043
1042
|
raise MergeError, "Trying to add attribute of unsupported type '#{change_value.class}' " \
|