Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
4b20d585
Commit
4b20d585
authored
Oct 29, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stash work on product association of a target.
parent
1905f1b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
project.rb
lib/cocoapods/xcode/project.rb
+5
-4
project_spec.rb
spec/unit/xcode/project_spec.rb
+2
-1
No files found.
lib/cocoapods/xcode/project.rb
View file @
4b20d585
...
@@ -30,9 +30,9 @@ module Pod
...
@@ -30,9 +30,9 @@ module Pod
end
end
end
end
def
self
.
has_one
(
singular_attr_name
)
def
self
.
has_one
(
singular_attr_name
,
options
=
{}
)
uuid_name
=
"
#{
singular_attr_name
}
Reference"
uuid_name
=
options
[
:uuid
]
||
"
#{
singular_attr_name
}
Reference"
attribute
(
singular_attr_name
,
uuid_name
)
attribute
(
options
[
:uuid
]
||
singular_attr_name
,
uuid_name
)
define_method
(
singular_attr_name
)
do
define_method
(
singular_attr_name
)
do
uuid
=
send
(
uuid_name
)
uuid
=
send
(
uuid_name
)
@project
.
objects
[
uuid
]
@project
.
objects
[
uuid
]
...
@@ -189,10 +189,11 @@ module Pod
...
@@ -189,10 +189,11 @@ module Pod
end
end
class
PBXNativeTarget
<
PBXObject
class
PBXNativeTarget
<
PBXObject
attributes
:productName
,
:product
Reference
,
:product
Type
,
:buildRules
,
:dependencies
attributes
:productName
,
:productType
,
:buildRules
,
:dependencies
has_many
:buildPhases
,
:class
=>
PBXBuildPhase
has_many
:buildPhases
,
:class
=>
PBXBuildPhase
has_one
:buildConfigurationList
has_one
:buildConfigurationList
has_one
:product
,
:uuid
=>
:productReference
def
initialize
(
project
,
uuid
,
attributes
)
def
initialize
(
project
,
uuid
,
attributes
)
super
super
...
...
spec/unit/xcode/project_spec.rb
View file @
4b20d585
...
@@ -143,7 +143,8 @@ describe "Pod::Xcode::Project" do
...
@@ -143,7 +143,8 @@ describe "Pod::Xcode::Project" do
it
"returns the product"
do
it
"returns the product"
do
product
=
@target
.
product
product
=
@target
.
product
product
.
uuid
.
should
==
@target
.
productReference
p
product
.
attributes
# TODO continue from here!!
#product.uuid.should == @target.productReference
end
end
it
"returns that product type is a static library"
do
it
"returns that product type is a static library"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment