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
d791a305
Commit
d791a305
authored
Aug 16, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Analyzer] Resolve all user build configurations.
parent
5c07f17f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+10
-0
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+7
-2
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
d791a305
...
@@ -488,6 +488,16 @@ module Pod
...
@@ -488,6 +488,16 @@ module Pod
#
#
attr_accessor
:targets
attr_accessor
:targets
# @return [Hash{String=>Symbol}] A hash representing all the user build
# configurations across all integration targets. Each key
# corresponds to the name of a configuration and its value to
# its type (`:debug` or `:release`).
#
def
all_user_build_configurations
targets
.
inject
({})
do
|
result
,
target
|
result
.
merge
(
target
.
user_build_configurations
)
end
end
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
spec/unit/installer/analyzer_spec.rb
View file @
d791a305
...
@@ -89,7 +89,7 @@ module Pod
...
@@ -89,7 +89,7 @@ module Pod
target
.
user_target_uuids
.
should
==
[
"A346496C14F9BE9A0080D870"
]
target
.
user_target_uuids
.
should
==
[
"A346496C14F9BE9A0080D870"
]
user_proj
=
Xcodeproj
::
Project
.
new
(
target
.
user_project_path
)
user_proj
=
Xcodeproj
::
Project
.
new
(
target
.
user_project_path
)
user_proj
.
objects_by_uuid
[
target
.
user_target_uuids
.
first
].
name
.
should
==
'SampleProject'
user_proj
.
objects_by_uuid
[
target
.
user_target_uuids
.
first
].
name
.
should
==
'SampleProject'
target
.
user_build_configurations
.
should
==
{
"Test"
=>
:release
,
"App Store"
=>
:release
}
target
.
user_build_configurations
.
should
==
{
"Test"
=>
:release
,
"App Store"
=>
:release
}
target
.
platform
.
to_s
.
should
==
'iOS 6.0'
target
.
platform
.
to_s
.
should
==
'iOS 6.0'
end
end
...
@@ -103,6 +103,12 @@ module Pod
...
@@ -103,6 +103,12 @@ module Pod
target
.
platform
.
to_s
.
should
==
'iOS 6.0'
target
.
platform
.
to_s
.
should
==
'iOS 6.0'
end
end
it
"returns all the configurations the user has in any of its projects and/or targets"
do
target_definition
=
@analyzer
.
podfile
.
target_definition_list
.
first
target_definition
.
stubs
(
:build_configurations
).
returns
(
"AdHoc"
=>
:test
)
@analyzer
.
analyze
.
all_user_build_configurations
.
should
==
{
"AdHoc"
=>
:test
,
"Test"
=>
:release
,
"App Store"
=>
:release
}
end
#--------------------------------------#
#--------------------------------------#
it
"locks the version of the dependencies which did not change in the Podfile"
do
it
"locks the version of the dependencies which did not change in the Podfile"
do
...
@@ -314,7 +320,6 @@ module Pod
...
@@ -314,7 +320,6 @@ module Pod
configurations
.
should
==
{
'AppStore'
=>
:release
}
configurations
.
should
==
{
'AppStore'
=>
:release
}
end
end
it
"returns the user build configurations specified in the target definition"
do
it
"returns the user build configurations specified in the target definition"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
build_configurations
=
{
'AppStore'
=>
:release
}
target_definition
.
build_configurations
=
{
'AppStore'
=>
:release
}
...
...
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