kintsugi 0.7.5 → 0.7.7

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
  SHA256:
3
- metadata.gz: 9210fcd7501da6106887f3ff32cd8951ecb6a81ddc156e49bb9b6e486ae37e49
4
- data.tar.gz: c571e02062f74ef3cca2830401a8a74a9d554bd93fb3e3f410cec3359200971b
3
+ metadata.gz: 9b0413f794996391109383356f249e747af5146d987ad541f01c1f2761c65544
4
+ data.tar.gz: e8c2c1d36c741ca461264c3bad5f1f763e9ff515573aa47119f1a8d4512a2c2b
5
5
  SHA512:
6
- metadata.gz: acd1dde008c1ddf553547285fe00b044fc4e3a25305d7c1830ab2a55b77f2ffb6a2f3b04740c8c28c1d95f2bdebe201fbe4cf2c3f1e4a5cae51b96965e1e2e51
7
- data.tar.gz: 45691f167ebb859989ce64cb4f171402e8372adbab38dc76f0d1ce279008546f960a011ef66b17f0bf54b72e9b2e840cce028b3a7c5b7381415ff39f3ece7fd2
6
+ metadata.gz: 2be49bcadbeaafd76258414480c35128bb1e82c8ed07c1758492c16d7f2dc4bc4c7632f5e812c9ec42157c90a262c3815597f8084156325e6c8a67df773aa90f
7
+ data.tar.gz: d74feac0094461014eebeb2477dd7f0fd5989738c995d626c0d0e053f8df63faab4e44258b44039455929d38c28269f9630bc349617bd6b967c9b389aa4626bb
@@ -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, change_path)
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
- parent_change_path)
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, component_change_path)
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, change_path)
1035
+ add_child_to_component(component, change_value, child_path)
1037
1036
  when Array
1038
1037
  change_value.each do |added_attribute_element|
1039
- add_child_to_component(component, added_attribute_element,
1040
- "#{change_path}/#{change_name}")
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}' " \
@@ -3,6 +3,6 @@
3
3
  module Kintsugi
4
4
  # This module holds the Kintsugi version information.
5
5
  module Version
6
- STRING = "0.7.5"
6
+ STRING = "0.7.7"
7
7
  end
8
8
  end
@@ -136,6 +136,16 @@ module Xcodeproj
136
136
  " #{display_name.delete_prefix("plugin:")} "
137
137
  end
138
138
  end
139
+
140
+ # The original implementation is `" #{isa} \"#{File.basename(display_name)}\"` so that means that if we have a
141
+ # relative path which is Path/To/Package, the item will be serialized as `XCLocalSwiftPackageReference "Package"`.
142
+ # And Xcode will automatically fix this to be `XCLocalSwiftPackageReference "Path/To/Package"`.
143
+ # So, we need to patch the implementation and make sure the whole path is used.
144
+ class XCLocalSwiftPackageReference
145
+ def ascii_plist_annotation
146
+ " #{isa} \"#{display_name}\" "
147
+ end
148
+ end
139
149
  end
140
150
  end
141
151