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
66595cd1
Commit
66595cd1
authored
May 09, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PodTarget] Initialize with array of target definitions
parent
8b5c0110
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
17 additions
and
17 deletions
+17
-17
pod_target.rb
lib/cocoapods/target/pod_target.rb
+3
-3
spec_helper.rb
spec/spec_helper.rb
+1
-1
module_map_spec.rb
spec/unit/generator/module_map_spec.rb
+1
-1
private_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
+1
-1
public_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
+1
-1
pre_install_hooks_context_spec.rb
spec/unit/installer/pre_install_hooks_context_spec.rb
+1
-1
aggregate_target_installer_spec.rb
...aller/target_installer/aggregate_target_installer_spec.rb
+1
-1
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+1
-1
target_installer_spec.rb
spec/unit/installer/target_installer_spec.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+3
-3
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+2
-2
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+1
-1
No files found.
lib/cocoapods/target/pod_target.rb
View file @
66595cd1
...
@@ -18,12 +18,12 @@ module Pod
...
@@ -18,12 +18,12 @@ module Pod
alias_method
:scoped?
,
:scoped
alias_method
:scoped?
,
:scoped
# @param [Specification] spec @see spec
# @param [Specification] spec @see spec
# @param [
TargetDefinition] target_definition @see target_definition
# @param [
Array<TargetDefinition>] target_definitions @see target_definitions
# @param [Sandbox] sandbox @see sandbox
# @param [Sandbox] sandbox @see sandbox
#
#
def
initialize
(
specs
,
target_definition
,
sandbox
)
def
initialize
(
specs
,
target_definition
s
,
sandbox
)
@specs
=
specs
@specs
=
specs
@target_definition
=
target_definition
@target_definition
s
=
target_definitions
@sandbox
=
sandbox
@sandbox
=
sandbox
@build_headers
=
Sandbox
::
HeadersStore
.
new
(
sandbox
,
'Private'
)
@build_headers
=
Sandbox
::
HeadersStore
.
new
(
sandbox
,
'Private'
)
@file_accessors
=
[]
@file_accessors
=
[]
...
...
spec/spec_helper.rb
View file @
66595cd1
...
@@ -125,7 +125,7 @@ def fixture_pod_target(spec_or_name, platform = :ios, target_definition = nil)
...
@@ -125,7 +125,7 @@ def fixture_pod_target(spec_or_name, platform = :ios, target_definition = nil)
spec
=
spec_or_name
.
is_a?
(
Pod
::
Specification
)
?
spec_or_name
:
fixture_spec
(
spec_or_name
)
spec
=
spec_or_name
.
is_a?
(
Pod
::
Specification
)
?
spec_or_name
:
fixture_spec
(
spec_or_name
)
target_definition
||=
fixture_target_definition
target_definition
||=
fixture_target_definition
target_definition
.
store_pod
(
spec
.
name
)
target_definition
.
store_pod
(
spec
.
name
)
Pod
::
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
).
tap
do
|
pod_target
|
Pod
::
PodTarget
.
new
([
spec
],
[
target_definition
]
,
config
.
sandbox
).
tap
do
|
pod_target
|
pod_target
.
stubs
(
:platform
).
returns
(
platform
)
pod_target
.
stubs
(
:platform
).
returns
(
platform
)
pod_target
.
file_accessors
<<
fixture_file_accessor
(
spec
.
defined_in_file
,
platform
)
pod_target
.
file_accessors
<<
fixture_file_accessor
(
spec
.
defined_in_file
,
platform
)
consumer
=
spec
.
consumer
(
platform
)
consumer
=
spec
.
consumer
(
platform
)
...
...
spec/unit/generator/module_map_spec.rb
View file @
66595cd1
...
@@ -5,7 +5,7 @@ module Pod
...
@@ -5,7 +5,7 @@ module Pod
before
do
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
@pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
]
,
config
.
sandbox
)
@gen
=
Generator
::
ModuleMap
.
new
(
@pod_target
)
@gen
=
Generator
::
ModuleMap
.
new
(
@pod_target
)
end
end
...
...
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
View file @
66595cd1
...
@@ -9,7 +9,7 @@ module Pod
...
@@ -9,7 +9,7 @@ module Pod
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@consumer
=
@spec
.
consumer
(
:ios
)
@consumer
=
@spec
.
consumer
(
:ios
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@pod_target
=
PodTarget
.
new
([
@spec
],
target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
target_definition
]
,
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
public_xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration'
)
public_xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration'
)
@generator
=
PrivatePodXCConfig
.
new
(
@pod_target
,
public_xcconfig
)
@generator
=
PrivatePodXCConfig
.
new
(
@pod_target
,
public_xcconfig
)
...
...
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
View file @
66595cd1
...
@@ -7,7 +7,7 @@ module Pod
...
@@ -7,7 +7,7 @@ module Pod
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@pod_target
=
PodTarget
.
new
([
@spec
],
@target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
]
,
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
@generator
=
PublicPodXCConfig
.
new
(
@pod_target
)
@generator
=
PublicPodXCConfig
.
new
(
@pod_target
)
...
...
spec/unit/installer/pre_install_hooks_context_spec.rb
View file @
66595cd1
...
@@ -8,7 +8,7 @@ module Pod
...
@@ -8,7 +8,7 @@ module Pod
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
]
,
config
.
sandbox
)
umbrella
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
umbrella
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
umbrella
.
user_project_path
=
'/path/project.xcodeproj'
umbrella
.
user_project_path
=
'/path/project.xcodeproj'
umbrella
.
user_target_uuids
=
[
'UUID'
]
umbrella
.
user_target_uuids
=
[
'UUID'
]
...
...
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
66595cd1
...
@@ -28,7 +28,7 @@ module Pod
...
@@ -28,7 +28,7 @@ module Pod
@target
.
client_root
=
config
.
sandbox
.
root
.
dirname
@target
.
client_root
=
config
.
sandbox
.
root
.
dirname
@target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@pod_target
=
PodTarget
.
new
([
@spec
],
@target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
]
,
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
user_build_configurations
=
@target
.
user_build_configurations
@pod_target
.
user_build_configurations
=
@target
.
user_build_configurations
@pod_target
.
file_accessors
=
[
file_accessor
]
@pod_target
.
file_accessors
=
[
file_accessor
]
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
66595cd1
...
@@ -25,7 +25,7 @@ module Pod
...
@@ -25,7 +25,7 @@ module Pod
@project
.
add_file_reference
(
resource
,
group
)
@project
.
add_file_reference
(
resource
,
group
)
end
end
@pod_target
=
PodTarget
.
new
([
@spec
],
@target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
]
,
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
file_accessors
=
[
file_accessor
]
@pod_target
.
file_accessors
=
[
file_accessor
]
@pod_target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
}
@pod_target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
}
...
...
spec/unit/installer/target_installer_spec.rb
View file @
66595cd1
...
@@ -20,7 +20,7 @@ module Pod
...
@@ -20,7 +20,7 @@ module Pod
@project
.
add_file_reference
(
file
,
group
)
@project
.
add_file_reference
(
file
,
group
)
end
end
@pod_target
=
PodTarget
.
new
([
@spec
],
@target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
]
,
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@pod_target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@pod_target
.
file_accessors
=
[
file_accessor
]
@pod_target
.
file_accessors
=
[
file_accessor
]
...
...
spec/unit/installer_spec.rb
View file @
66595cd1
...
@@ -499,7 +499,7 @@ module Pod
...
@@ -499,7 +499,7 @@ module Pod
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
store_pod
(
'BananaLib'
)
target_definition
.
store_pod
(
'BananaLib'
)
pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
]
,
config
.
sandbox
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
Installer
::
PodTargetInstaller
.
any_instance
.
expects
(
:install!
)
Installer
::
PodTargetInstaller
.
any_instance
.
expects
(
:install!
)
...
@@ -509,7 +509,7 @@ module Pod
...
@@ -509,7 +509,7 @@ module Pod
it
'skips empty pod targets'
do
it
'skips empty pod targets'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
]
,
config
.
sandbox
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
Installer
::
PodTargetInstaller
.
any_instance
.
expects
(
:install!
).
never
Installer
::
PodTargetInstaller
.
any_instance
.
expects
(
:install!
).
never
...
@@ -544,7 +544,7 @@ module Pod
...
@@ -544,7 +544,7 @@ module Pod
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
@pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
]
,
config
.
sandbox
)
@target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
@target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
@mock_target
=
mock
(
'PodNativeTarget'
)
@mock_target
=
mock
(
'PodNativeTarget'
)
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
66595cd1
...
@@ -88,7 +88,7 @@ module Pod
...
@@ -88,7 +88,7 @@ module Pod
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@pod_target
=
PodTarget
.
new
([
@spec
],
@target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
]
,
config
.
sandbox
)
@target
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
@target
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
@target
.
stubs
(
:platform
).
returns
(
:ios
)
@target
.
stubs
(
:platform
).
returns
(
:ios
)
@target
.
pod_targets
=
[
@pod_target
]
@target
.
pod_targets
=
[
@pod_target
]
...
@@ -96,7 +96,7 @@ module Pod
...
@@ -96,7 +96,7 @@ module Pod
describe
'with configuration dependent pod targets'
do
describe
'with configuration dependent pod targets'
do
before
do
before
do
@pod_target_release
=
PodTarget
.
new
([
@spec
],
@target_definition
,
config
.
sandbox
)
@pod_target_release
=
PodTarget
.
new
([
@spec
],
[
@target_definition
]
,
config
.
sandbox
)
@pod_target_release
.
expects
(
:include_in_build_config?
).
with
(
@target_definition
,
'Debug'
).
returns
(
false
)
@pod_target_release
.
expects
(
:include_in_build_config?
).
with
(
@target_definition
,
'Debug'
).
returns
(
false
)
@pod_target_release
.
expects
(
:include_in_build_config?
).
with
(
@target_definition
,
'Release'
).
returns
(
true
)
@pod_target_release
.
expects
(
:include_in_build_config?
).
with
(
@target_definition
,
'Release'
).
returns
(
true
)
@target
.
pod_targets
=
[
@pod_target
,
@pod_target_release
]
@target
.
pod_targets
=
[
@pod_target
,
@pod_target_release
]
...
...
spec/unit/target/pod_target_spec.rb
View file @
66595cd1
...
@@ -5,7 +5,7 @@ module Pod
...
@@ -5,7 +5,7 @@ module Pod
before
do
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@pod_target
=
PodTarget
.
new
([
spec
],
@target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
spec
],
[
@target_definition
]
,
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
end
end
...
...
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