From 869a6ac51e8ad290f3fef68281eeb420f29ae41e Mon Sep 17 00:00:00 2001 From: Jared Sorge Date: Sun, 10 Sep 2023 21:53:07 -0700 Subject: [PATCH] Use relative path --- .../project/object/swift_package_local_reference.rb | 5 +++-- spec/project/object/swift_package_local_reference_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/xcodeproj/project/object/swift_package_local_reference.rb b/lib/xcodeproj/project/object/swift_package_local_reference.rb index 4fbc8827..48e03765 100644 --- a/lib/xcodeproj/project/object/swift_package_local_reference.rb +++ b/lib/xcodeproj/project/object/swift_package_local_reference.rb @@ -6,9 +6,10 @@ module Object class XCLocalSwiftPackageReference < AbstractObject # @!group Attributes - # @return [String] the repository url this Swift package was installed from. + # @return [String] the repository path where the package is located relative + # to the Xcode project. # - attribute :path, String + attribute :relative_path, String # @!group AbstractObject Hooks #--------------------------------------# diff --git a/spec/project/object/swift_package_local_reference_spec.rb b/spec/project/object/swift_package_local_reference_spec.rb index adda1ffe..bbb2034a 100644 --- a/spec/project/object/swift_package_local_reference_spec.rb +++ b/spec/project/object/swift_package_local_reference_spec.rb @@ -11,12 +11,12 @@ module ProjectSpecs end it 'returns path for display_name if path is set' do - @proxy.path = '../path' + @proxy.relative_path = '../path' @proxy.display_name.should == '../path' end it 'returns the ascii plist annotation with the last component of path' do - @proxy.path = '../path' + @proxy.relative_path = '../path' @proxy.ascii_plist_annotation.should == ' XCLocalSwiftPackageReference "path" ' end end