Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support comments attribute in all build phases, groups and targets. #51

Merged
merged 2 commits into from
Feb 9, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/xcodeproj/project/object/build_phase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class AbstractBuildPhase < AbstractObject
#
attribute :run_only_for_deployment_postprocessing, String, '0'

# @return [String] Comments associated with this build phase.
#
# This is apparently no longer used by Xcode.
#
attribute :comments, String

end

#-----------------------------------------------------------------------#
Expand Down
6 changes: 6 additions & 0 deletions lib/xcodeproj/project/object/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ class PBXGroup < AbstractObject
#
attribute :wraps_lines, String

# @return [String] Comments associated with this group.
#
# This is apparently no longer used by Xcode.
#
attribute :comments, String

#-----------------------------------------------------------------------#

# @!group Helpers
Expand Down
6 changes: 6 additions & 0 deletions lib/xcodeproj/project/object/native_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class AbstractTarget < AbstractObject
#
attribute :product_name, String

# @return [String] Comments associated with this target.
#
# This is apparently no longer used by Xcode.
#
attribute :comments, String

# @return [XCConfigurationList] the list of the build configurations of
# the target. This list commonly include two configurations
# `Debug` and `Release`.
Expand Down
4 changes: 4 additions & 0 deletions spec/project/object/build_phase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module ProjectSpecs
@phase.run_only_for_deployment_postprocessing.should == "0"
end

it "is initialized with empty comments" do
@phase.comments.should.be.nil
end

it "can add a file reference to its build files" do
file = @project.new_file('some/file')
@phase.add_file_reference(file)
Expand Down