xcodeproj 0.2.0 → 0.2.1

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.
data/lib/xcodeproj.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
 
4
4
  autoload :Config, 'xcodeproj/config'
5
5
  autoload :Project, 'xcodeproj/project'
@@ -167,12 +167,17 @@ module Xcodeproj
167
167
  # directory.
168
168
  # @return [PBXFileReference] The file reference object.
169
169
  def add_system_framework(name)
170
- group = groups.where('name' => 'Frameworks') || groups.new('name' => 'Frameworks')
171
- group.files.new({
172
- 'name' => "#{name}.framework",
173
- 'path' => "System/Library/Frameworks/#{name}.framework",
174
- 'sourceTree' => 'SDKROOT'
175
- })
170
+ path = "System/Library/Frameworks/#{name}.framework"
171
+ if file = files.where(:path => path)
172
+ file
173
+ else
174
+ group = groups.where('name' => 'Frameworks') || groups.new('name' => 'Frameworks')
175
+ group.files.new({
176
+ 'name' => "#{name}.framework",
177
+ 'path' => path,
178
+ 'sourceTree' => 'SDKROOT'
179
+ })
180
+ end
176
181
  end
177
182
 
178
183
  # @return [PBXObjectList<XCBuildConfiguration] A list of project wide
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodeproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-01 00:00:00.000000000 Z
12
+ date: 2012-07-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
15
15
  boring management tasks or build Xcode-friendly libraries. Also includes support