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
6ce4af80
Commit
6ce4af80
authored
Feb 21, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for Core changes to Podfile
parent
2bcde0f0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
24 deletions
+24
-24
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+17
-17
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+3
-3
library_spec.rb
spec/unit/library_spec.rb
+2
-2
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
6ce4af80
...
...
@@ -451,8 +451,8 @@ module Pod
end
end
target_definition
.
set_platform
(
name
,
deployment_target
)
platform
=
Platform
.
new
(
name
,
deployment_target
)
target_definition
.
platform
=
platform
platform
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
6ce4af80
...
...
@@ -176,7 +176,7 @@ module Pod
describe
"#compute_user_project_targets"
do
it
"uses the path specified in the target definition while computing the path of the user project"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
user_project_path
=
'SampleProject/SampleProject'
path
=
@analyzer
.
send
(
:compute_user_project_path
,
target_definition
)
...
...
@@ -184,7 +184,7 @@ module Pod
end
it
"raises if the user project of the target definition does not exists while computing the path of the user project"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
user_project_path
=
'Test'
e
=
lambda
{
@analyzer
.
send
(
:compute_user_project_path
,
target_definition
)
}.
should
.
raise
Informative
...
...
@@ -192,7 +192,7 @@ module Pod
end
it
"if not specified in the target definition if looks if there is only one project"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
config
.
installation_root
=
config
.
installation_root
+
'SampleProject'
path
=
@analyzer
.
send
(
:compute_user_project_path
,
target_definition
)
...
...
@@ -200,7 +200,7 @@ module Pod
end
it
"if not specified in the target definition if looks if there is only one project"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
e
=
lambda
{
@analyzer
.
send
(
:compute_user_project_path
,
target_definition
)
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/Could not.*select.*project/
...
...
@@ -222,7 +222,7 @@ module Pod
describe
"#compute_user_project_targets"
do
it
"returns the targets specified in the target definition"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
link_with
=
[
'UserTarget'
]
user_project
=
Xcodeproj
::
Project
.
new
user_project
.
new_target
(
:application
,
'FirstTarget'
,
:ios
)
...
...
@@ -233,7 +233,7 @@ module Pod
end
it
"raises if it is unable to find the targets specified by the target definition"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
link_with
=
[
'UserTarget'
]
user_project
=
Xcodeproj
::
Project
.
new
...
...
@@ -242,7 +242,7 @@ module Pod
end
it
"returns the target with the same name of the target definition"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'UserTarget'
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'UserTarget'
,
nil
)
user_project
=
Xcodeproj
::
Project
.
new
user_project
.
new_target
(
:application
,
'FirstTarget'
,
:ios
)
user_project
.
new_target
(
:application
,
'UserTarget'
,
:ios
)
...
...
@@ -252,7 +252,7 @@ module Pod
end
it
"raises if the name of the target definition does not match any file"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'UserTarget'
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'UserTarget'
,
nil
)
user_project
=
Xcodeproj
::
Project
.
new
e
=
lambda
{
@analyzer
.
send
(
:compute_user_project_targets
,
target_definition
,
user_project
)
}.
should
.
raise
Informative
...
...
@@ -260,7 +260,7 @@ module Pod
end
it
"returns the first target of the project if the target definition is named default"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
user_project
=
Xcodeproj
::
Project
.
new
user_project
.
new_target
(
:application
,
'FirstTarget'
,
:ios
)
user_project
.
new_target
(
:application
,
'UserTarget'
,
:ios
)
...
...
@@ -270,7 +270,7 @@ module Pod
end
it
"raises if the default target definition cannot be linked because there are no user targets"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
user_project
=
Xcodeproj
::
Project
.
new
e
=
lambda
{
@analyzer
.
send
(
:compute_user_project_targets
,
target_definition
,
user_project
)
}.
should
.
raise
Informative
...
...
@@ -290,7 +290,7 @@ module Pod
configuration
.
name
=
'AppStore'
target
.
build_configuration_list
.
build_configurations
<<
configuration
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
user_targets
=
[
target
]
configurations
=
@analyzer
.
send
(
:compute_user_build_configurations
,
target_definition
,
user_targets
)
...
...
@@ -299,7 +299,7 @@ module Pod
it
"returns the user build configurations specified in the target definition"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
build_configurations
=
{
'AppStore'
=>
:release
}
user_targets
=
[]
...
...
@@ -314,8 +314,8 @@ module Pod
describe
"#compute_platform_for_target_definition"
do
it
"returns the platform specified in the target definition"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
.
platform
=
Platform
.
new
(
:ios
,
'4.0'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
set_platform
(
:ios
,
'4.0'
)
user_targets
=
[]
configurations
=
@analyzer
.
send
(
:compute_platform_for_target_definition
,
target_definition
,
user_targets
)
...
...
@@ -331,7 +331,7 @@ module Pod
'IPHONEOS_DEPLOYMENT_TARGET'
=>
'4.0'
}
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
user_targets
=
[
target
]
configurations
=
@analyzer
.
send
(
:compute_platform_for_target_definition
,
target_definition
,
user_targets
)
...
...
@@ -353,7 +353,7 @@ module Pod
'IPHONEOS_DEPLOYMENT_TARGET'
=>
'6.0'
}
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
user_targets
=
[
target1
,
target2
]
configurations
=
@analyzer
.
send
(
:compute_platform_for_target_definition
,
target_definition
,
user_targets
)
...
...
@@ -375,7 +375,7 @@ module Pod
'IPHONEOS_DEPLOYMENT_TARGET'
=>
'10.6'
}
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
user_targets
=
[
target1
,
target2
]
e
=
lambda
{
@analyzer
.
send
(
:compute_platform_for_target_definition
,
target_definition
,
user_targets
)
}.
should
.
raise
Informative
e
.
message
.
should
.
match
/Targets with different platforms/
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
6ce4af80
...
...
@@ -9,7 +9,7 @@ module Pod
sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
@sample_project
=
Xcodeproj
::
Project
.
new
sample_project_path
@target
=
@sample_project
.
targets
.
first
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
@lib
=
Library
.
new
(
target_definition
)
@lib
.
user_project_path
=
sample_project_path
pods_project
=
Project
.
new
()
...
...
spec/unit/installer_spec.rb
View file @
6ce4af80
...
...
@@ -289,8 +289,8 @@ module Pod
it
"install the targets of the Pod project"
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
.
target_dependencies
<<
Dependency
.
new
(
'BananaLib'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
store_pod
(
'BananaLib'
)
library
=
Library
.
new
(
target_definition
)
library
.
specs
=
[
spec
]
@installer
.
stubs
(
:libraries
).
returns
([
library
])
...
...
@@ -300,7 +300,7 @@ module Pod
it
"skips empty libraries"
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
library
=
Library
.
new
(
target_definition
)
library
.
specs
=
[
spec
]
@installer
.
stubs
(
:libraries
).
returns
([
library
])
...
...
spec/unit/library_spec.rb
View file @
6ce4af80
...
...
@@ -5,7 +5,7 @@ module Pod
describe
"In general"
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
@lib
=
Library
.
new
(
@target_definition
)
end
...
...
@@ -28,7 +28,7 @@ module Pod
describe
"Support files"
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
@lib
=
Library
.
new
(
@target_definition
)
@lib
.
support_files_root
=
config
.
sandbox
.
root
@lib
.
user_project_path
=
config
.
sandbox
.
root
+
'../user_project.xcodeproj'
...
...
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