Skip to content

Commit

Permalink
Use relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorge committed Sep 11, 2023
1 parent 2ce68b6 commit 869a6ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/xcodeproj/project/object/swift_package_local_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#--------------------------------------#
Expand Down
4 changes: 2 additions & 2 deletions spec/project/object/swift_package_local_reference_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 869a6ac

Please sign in to comment.