Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #23 from yury/xcversiongroup

Set path attribute on XCVersionGroup when creating with #new_xcdatamodel_group
  • Loading branch information...
commit 492af1120ca9d4e739dd4413b6c59a5338e3f975 2 parents d7806ab + 94edf02
@alloy alloy authored
View
3  lib/xcodeproj/project/object/group.rb
@@ -105,9 +105,10 @@ class XCVersionGroup < PBXGroup
attribute :version_group_type
attribute :current_version
+ attribute :path
def self.new_xcdatamodel_group(project, xcdatamodel_path)
- group = new(project, nil, 'versionGroupType' => 'wrapper.xcdatamodel')
+ group = new(project, nil, 'path' => xcdatamodel_path, 'versionGroupType' => 'wrapper.xcdatamodel')
file = group.files.new(
'path' => xcdatamodel_path.sub(/xcdatamodeld$/, 'xcdatamodel'),
'lastKnownFileType' => 'wrapper.xcdatamodel'
View
1  spec/project/object/group_spec.rb
@@ -121,6 +121,7 @@ module ProjectSpecs
file = @project.files[version_group.current_version]
version_group.files.should == [file]
file.path.should == 'some/Model.xcdatamodel'
+ version_group.path.should == 'some/Model.xcdatamodeld'
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.