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
3ff30dc6
Commit
3ff30dc6
authored
Jul 27, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XCConfig] Collapse public and private pod xcconfig
parent
3424bef1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
290 deletions
+50
-290
xcconfig.rb
lib/cocoapods/generator/xcconfig.rb
+1
-2
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+7
-62
public_pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
+0
-53
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+2
-7
target.rb
lib/cocoapods/target.rb
+0
-12
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+37
-56
public_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
+0
-90
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+3
-5
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+0
-3
No files found.
lib/cocoapods/generator/xcconfig.rb
View file @
3ff30dc6
...
@@ -6,8 +6,7 @@ module Pod
...
@@ -6,8 +6,7 @@ module Pod
#
#
module
XCConfig
module
XCConfig
autoload
:AggregateXCConfig
,
'cocoapods/generator/xcconfig/aggregate_xcconfig'
autoload
:AggregateXCConfig
,
'cocoapods/generator/xcconfig/aggregate_xcconfig'
autoload
:PublicPodXCConfig
,
'cocoapods/generator/xcconfig/public_pod_xcconfig'
autoload
:PodXCConfig
,
'cocoapods/generator/xcconfig/pod_xcconfig'
autoload
:PrivatePodXCConfig
,
'cocoapods/generator/xcconfig/private_pod_xcconfig'
autoload
:XCConfigHelper
,
'cocoapods/generator/xcconfig/xcconfig_helper'
autoload
:XCConfigHelper
,
'cocoapods/generator/xcconfig/xcconfig_helper'
end
end
end
end
...
...
lib/cocoapods/generator/xcconfig/p
rivate_p
od_xcconfig.rb
→
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
3ff30dc6
...
@@ -3,28 +3,21 @@ module Pod
...
@@ -3,28 +3,21 @@ module Pod
module
XCConfig
module
XCConfig
# Generates the private xcconfigs for the pod targets.
# Generates the private xcconfigs for the pod targets.
#
#
# The
private xcconfig file for a Pod target merges the configuration
# The
xcconfig file for a Pod target merges the pod target
#
values of the public namespaced xcconfig with the default private
#
configuration values with the default configuration values
#
configuration values
required by CocoaPods.
# required by CocoaPods.
#
#
class
P
rivateP
odXCConfig
class
PodXCConfig
# @return [Target] the target represented by this xcconfig.
# @return [Target] the target represented by this xcconfig.
#
#
attr_reader
:target
attr_reader
:target
# @return [Xcodeproj::Config] The public xcconfig which this one will
# use.
#
attr_reader
:public_xcconfig
# Initialize a new instance
# Initialize a new instance
#
#
# @param [Target] target @see target
# @param [Target] target @see target
# @param [Xcodeproj::Config] public_xcconfig @see public_xcconfig
#
#
def
initialize
(
target
,
public_xcconfig
)
def
initialize
(
target
)
@target
=
target
@target
=
target
@public_xcconfig
=
public_xcconfig
end
end
# @return [Xcodeproj::Config] The generated xcconfig.
# @return [Xcodeproj::Config] The generated xcconfig.
...
@@ -71,60 +64,12 @@ module Pod
...
@@ -71,60 +64,12 @@ module Pod
config
.
merge!
(
build_settings
)
config
.
merge!
(
build_settings
)
end
end
xcconfig_hash
=
add_xcconfig_namespaced_keys
(
public_xcconfig
.
to_hash
,
config
,
target
.
xcconfig_prefix
)
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
=
Xcodeproj
::
Config
.
new
(
xcconfig_hash
)
XCConfigHelper
.
add_settings_for_file_accessors_of_target
(
target
,
@xcconfig
)
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
@xcconfig
.
includes
=
[
target
.
name
]
@xcconfig
@xcconfig
end
end
private
#-----------------------------------------------------------------------#
# !@group Private Helpers
# Returns the hash representation of an xcconfig which inherit from the
# namespaced keys of a given one.
#
# @param [Hash] source_config
# The xcconfig whose keys need to be inherited.
#
# @param [Hash] destination_config
# The config which should inherit the source config keys.
#
# @return [Hash] The inheriting xcconfig.
#
def
add_xcconfig_namespaced_keys
(
source_config
,
destination_config
,
prefix
)
result
=
destination_config
.
dup
source_config
.
each
do
|
key
,
_value
|
prefixed_key
=
prefix
+
conditional_less_key
(
key
)
current_value
=
destination_config
[
key
]
if
current_value
result
[
key
]
=
"
#{
current_value
}
${
#{
prefixed_key
}
}"
else
result
[
key
]
=
"${
#{
prefixed_key
}
}"
end
end
result
end
# Strips the [*]-syntax from the given xcconfig key.
#
# @param [String] key
# The key to strip.
#
# @return [String] The stripped key.
#
def
conditional_less_key
(
key
)
brackets_index
=
key
.
index
(
'['
)
if
brackets_index
key
[
0
...
brackets_index
]
else
key
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
end
end
end
end
...
...
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
deleted
100644 → 0
View file @
3424bef1
module
Pod
module
Generator
module
XCConfig
# Generates the public xcconfigs for the pod targets.
#
# The public xcconfig file for a Pod is completely namespaced to prevent
# configuration value collision with the build settings of other Pods. This
# xcconfig includes the standard podspec defined values including
# libraries, frameworks, weak frameworks and xcconfig overrides.
#
class
PublicPodXCConfig
# @return [Target] the target represented by this xcconfig.
#
attr_reader
:target
# Initialize a new instance
#
# @param [Target] target @see target
#
def
initialize
(
target
)
@target
=
target
end
# @return [Xcodeproj::Config] The generated xcconfig.
#
attr_reader
:xcconfig
# Generates and saves the xcconfig to the given path.
#
# @param [Pathname] path
# the path where the prefix header should be stored.
#
# @return [void]
#
def
save_as
(
path
)
generate
.
save_as
(
path
,
target
.
xcconfig_prefix
)
end
# Generates the xcconfig for the target.
#
# @return [Xcodeproj::Config]
#
def
generate
@xcconfig
=
Xcodeproj
::
Config
.
new
XCConfigHelper
.
add_settings_for_file_accessors_of_target
(
target
,
@xcconfig
)
@xcconfig
end
#-----------------------------------------------------------------------#
end
end
end
end
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
3ff30dc6
...
@@ -163,13 +163,8 @@ module Pod
...
@@ -163,13 +163,8 @@ module Pod
#
#
def
create_xcconfig_file
def
create_xcconfig_file
path
=
target
.
xcconfig_path
path
=
target
.
xcconfig_path
public_gen
=
Generator
::
XCConfig
::
PublicPodXCConfig
.
new
(
target
)
xcconfig_gen
=
Generator
::
XCConfig
::
PodXCConfig
.
new
(
target
)
public_gen
.
save_as
(
path
)
xcconfig_gen
.
save_as
(
path
)
add_file_to_support_group
(
path
)
path
=
target
.
xcconfig_private_path
private_gen
=
Generator
::
XCConfig
::
PrivatePodXCConfig
.
new
(
target
,
public_gen
.
xcconfig
)
private_gen
.
save_as
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
native_target
.
build_configurations
.
each
do
|
c
|
native_target
.
build_configurations
.
each
do
|
c
|
...
...
lib/cocoapods/target.rb
View file @
3ff30dc6
...
@@ -75,12 +75,6 @@ module Pod
...
@@ -75,12 +75,6 @@ module Pod
requires_frameworks?
?
:
framework
:
:static_library
requires_frameworks?
?
:
framework
:
:static_library
end
end
# @return [String] the XCConfig namespaced prefix.
#
def
xcconfig_prefix
label
.
upcase
.
gsub
(
/[^A-Z]/
,
'_'
)
+
'_'
end
# @return [String] A string suitable for debugging.
# @return [String] A string suitable for debugging.
#
#
def
inspect
def
inspect
...
@@ -140,12 +134,6 @@ module Pod
...
@@ -140,12 +134,6 @@ module Pod
end
end
end
end
# @return [Pathname] the absolute path of the private xcconfig file.
#
def
xcconfig_private_path
support_files_dir
+
"
#{
label
}
-Private.xcconfig"
end
# @return [Pathname] the absolute path of the header file which contains
# @return [Pathname] the absolute path of the header file which contains
# the exported foundation constants with framework version
# the exported foundation constants with framework version
# information and all headers, which should been exported in the
# information and all headers, which should been exported in the
...
...
spec/unit/generator/xcconfig/p
rivate_p
od_xcconfig_spec.rb
→
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
3ff30dc6
...
@@ -3,15 +3,25 @@ require File.expand_path('../../../../spec_helper', __FILE__)
...
@@ -3,15 +3,25 @@ require File.expand_path('../../../../spec_helper', __FILE__)
module
Pod
module
Pod
module
Generator
module
Generator
module
XCConfig
module
XCConfig
describe
P
rivateP
odXCConfig
do
describe
PodXCConfig
do
describe
'in general'
do
describe
'in general'
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@pod_target
=
fixture_pod_target
(
@spec
)
@pod_target
=
fixture_pod_target
(
@spec
)
@consumer
=
@pod_target
.
spec_consumers
.
first
@consumer
=
@pod_target
.
spec_consumers
.
first
@podfile
=
@pod_target
.
podfile
@podfile
=
@pod_target
.
podfile
public_xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration'
)
@generator
=
PodXCConfig
.
new
(
@pod_target
)
@generator
=
PrivatePodXCConfig
.
new
(
@pod_target
,
public_xcconfig
)
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
frameworks
=
[
'QuartzCore'
]
@spec
.
weak_frameworks
=
[
'iAd'
]
@spec
.
libraries
=
[
'xml2'
]
file_accessors
=
[
Sandbox
::
FileAccessor
.
new
(
fixture
(
'banana-lib'
),
@consumer
)]
# vendored_framework_paths = [config.sandbox.root + 'BananaLib/BananaLib.framework']
# Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns(vendored_framework_paths)
@pod_target
.
stubs
(
:file_accessors
).
returns
(
file_accessors
)
@xcconfig
=
@generator
.
generate
@xcconfig
=
@generator
.
generate
end
end
...
@@ -19,6 +29,30 @@ module Pod
...
@@ -19,6 +29,30 @@ module Pod
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
end
end
it
'includes the xcconfig of the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-no_compact_unwind'
)
end
it
'includes the libraries for the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-l"xml2"'
)
end
it
'includes the frameworks of the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-framework "QuartzCore"'
)
end
it
'includes the weak-frameworks of the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-weak_framework "iAd"'
)
end
it
'includes the developer frameworks search paths when SenTestingKit is detected'
do
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
frameworks
=
[
'SenTestingKit'
]
xcconfig
=
@generator
.
generate
framework_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
framework_search_paths
.
should
.
include
(
'$(SDKROOT)/Developer'
)
end
it
'does not configure the project to load all members that implement Objective-c classes or categories from the static library'
do
it
'does not configure the project to load all members that implement Objective-c classes or categories from the static library'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
'-ObjC'
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
'-ObjC'
end
end
...
@@ -51,10 +85,6 @@ module Pod
...
@@ -51,10 +85,6 @@ module Pod
@xcconfig
.
to_hash
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
==
expected
@xcconfig
.
to_hash
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
==
expected
end
end
it
'adds the pod namespaced configuration items'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
"${
#{
@pod_target
.
xcconfig_prefix
}
OTHER_LDFLAGS}"
)
end
it
'sets the relative path of the pods root for spec libraries to ${SRCROOT}'
do
it
'sets the relative path of the pods root for spec libraries to ${SRCROOT}'
do
@xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}'
@xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}'
end
end
...
@@ -70,55 +100,6 @@ module Pod
...
@@ -70,55 +100,6 @@ module Pod
generated
.
class
.
should
==
Xcodeproj
::
Config
generated
.
class
.
should
==
Xcodeproj
::
Config
end
end
end
end
#-------------------------------------------------------------------------#
describe
'Private Helpers'
do
before
do
@config
=
PrivatePodXCConfig
.
new
(
stub
,
stub
)
end
#----------------------------------------#
describe
'#add_xcconfig_namespaced_keys'
do
it
'appends to the values of the keys of the destination the value of the keys of the source'
do
source_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/MyPod'
}
destination_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/BuildHeaders'
}
result
=
@config
.
send
(
:add_xcconfig_namespaced_keys
,
source_config
,
destination_config
,
'PREFIX_'
)
result
.
should
==
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/BuildHeaders ${PREFIX_HEADER_SEARCH_PATHS}'
}
end
it
'uses the key of the destination xcconfig if not present in the source'
do
source_config
=
{}
destination_config
=
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/BuildHeaders'
}
result
=
@config
.
send
(
:add_xcconfig_namespaced_keys
,
source_config
,
destination_config
,
'PREFIX_'
)
result
.
should
==
{
'HEADER_SEARCH_PATHS'
=>
'${PODS_ROOT}/BuildHeaders'
}
end
it
'preserves any value of the source not present in the destination'
do
source_config
=
{
'EXCLUDED_SOURCE_FILE_NAMES'
=>
'ZBarReaderViewImpl_Simulator.m'
}
destination_config
=
{}
result
=
@config
.
send
(
:add_xcconfig_namespaced_keys
,
source_config
,
destination_config
,
'PREFIX_'
)
result
.
should
==
{
'EXCLUDED_SOURCE_FILE_NAMES'
=>
'${PREFIX_EXCLUDED_SOURCE_FILE_NAMES}'
}
end
end
#----------------------------------------#
describe
'#conditional_less_key'
do
it
'returns the key without the xcconfig conditional syntax if present'
do
result
=
@config
.
send
(
:conditional_less_key
,
'EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]'
)
result
.
should
==
'EXCLUDED_SOURCE_FILE_NAMES'
end
it
'returns the key as it is if no conditional syntax is present'
do
result
=
@config
.
send
(
:conditional_less_key
,
'EXCLUDED_SOURCE_FILE_NAMES'
)
result
.
should
==
'EXCLUDED_SOURCE_FILE_NAMES'
end
end
end
#-------------------------------------------------------------------------#
end
end
end
end
end
end
...
...
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
deleted
100644 → 0
View file @
3424bef1
require
File
.
expand_path
(
'../../../../spec_helper'
,
__FILE__
)
module
Pod
module
Generator
module
XCConfig
describe
PublicPodXCConfig
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@pod_target
=
fixture_pod_target
(
@spec
)
@generator
=
PublicPodXCConfig
.
new
(
@pod_target
)
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
frameworks
=
[
'QuartzCore'
]
@spec
.
weak_frameworks
=
[
'iAd'
]
@spec
.
libraries
=
[
'xml2'
]
# vendored_framework_paths = [config.sandbox.root + 'BananaLib/BananaLib.framework']
# Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns(vendored_framework_paths)
@xcconfig
=
@generator
.
generate
end
it
'generates the xcconfig'
do
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
end
it
'includes the xcconfig of the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-no_compact_unwind'
)
end
it
'includes the libraries for the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-l"xml2"'
)
end
it
'includes the frameworks of the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-framework "QuartzCore"'
)
end
it
'includes the weak-frameworks of the specifications'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-weak_framework "iAd"'
)
end
it
'includes the developer frameworks search paths when SenTestingKit is detected'
do
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
frameworks
=
[
'SenTestingKit'
]
xcconfig
=
@generator
.
generate
framework_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
framework_search_paths
.
should
.
include
(
'$(SDKROOT)/Developer'
)
end
it
"doesn't include the developer frameworks if already present"
do
@spec
.
xcconfig
=
{
'FRAMEWORK_SEARCH_PATHS'
=>
'"$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
}
@spec
.
frameworks
=
[
'SenTestingKit'
]
xcconfig
=
@generator
.
generate
framework_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
split
(
' '
)
framework_search_paths
.
select
{
|
path
|
path
==
'"$(SDKROOT)/Developer/Library/Frameworks"'
}.
count
.
should
==
1
framework_search_paths
.
select
{
|
path
|
path
==
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
}.
count
.
should
==
1
end
it
'includes the build settings of the frameworks bundles of the spec'
do
config
.
sandbox
.
stubs
(
:root
).
returns
(
fixture
(
''
))
xcconfig
=
@generator
.
generate
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include?
(
'"$(PODS_ROOT)/banana-lib"'
)
end
it
'includes the build settings of the libraries shipped with the spec'
do
config
.
sandbox
.
stubs
(
:root
).
returns
(
fixture
(
''
))
xcconfig
=
@generator
.
generate
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
.
include?
(
'"$(PODS_ROOT)/banana-lib"'
)
end
#-----------------------------------------------------------------------#
before
do
@path
=
temporary_directory
+
'sample.xcconfig'
@generator
.
save_as
(
@path
)
end
it
'saves the xcconfig'
do
generated
=
Xcodeproj
::
Config
.
new
(
@path
)
generated
.
class
.
should
==
Xcodeproj
::
Config
end
it
'writes the xcconfig with a prefix computed from the target definition and root spec'
do
generated
=
Xcodeproj
::
Config
.
new
(
@path
)
generated
.
to_hash
.
each
{
|
k
,
_v
|
k
.
should
.
start_with
(
@pod_target
.
xcconfig_prefix
)
}
end
end
end
end
end
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
3ff30dc6
...
@@ -100,7 +100,6 @@ module Pod
...
@@ -100,7 +100,6 @@ module Pod
@installer
.
install!
@installer
.
install!
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
'Pods-BananaLib-Private.xcconfig'
,
'Pods-BananaLib-dummy.m'
,
'Pods-BananaLib-dummy.m'
,
'Pods-BananaLib-prefix.pch'
,
'Pods-BananaLib-prefix.pch'
,
'Pods-BananaLib.xcconfig'
,
'Pods-BananaLib.xcconfig'
,
...
@@ -127,7 +126,7 @@ module Pod
...
@@ -127,7 +126,7 @@ module Pod
@installer
.
install!
@installer
.
install!
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'Pods-BananaLib-banana_bundle'
}
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'Pods-BananaLib-banana_bundle'
}
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_p
rivate_p
ath
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
bundle_target
.
build_configurations
.
each
do
|
bc
|
bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
base_configuration_reference
.
real_path
.
should
==
file
bc
.
base_configuration_reference
.
real_path
.
should
==
file
end
end
...
@@ -142,7 +141,6 @@ module Pod
...
@@ -142,7 +141,6 @@ module Pod
@project
.
support_files_group
@project
.
support_files_group
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
'BananaLib-Private.xcconfig'
,
'BananaLib-dummy.m'
,
'BananaLib-dummy.m'
,
'BananaLib-prefix.pch'
,
'BananaLib-prefix.pch'
,
'BananaLib.xcconfig'
,
'BananaLib.xcconfig'
,
...
@@ -169,7 +167,7 @@ module Pod
...
@@ -169,7 +167,7 @@ module Pod
@installer
.
install!
@installer
.
install!
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-banana_bundle'
}
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-banana_bundle'
}
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_p
rivate_p
ath
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
bundle_target
.
build_configurations
.
each
do
|
bc
|
bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
base_configuration_reference
.
real_path
.
should
==
file
bc
.
base_configuration_reference
.
real_path
.
should
==
file
end
end
...
@@ -180,7 +178,7 @@ module Pod
...
@@ -180,7 +178,7 @@ module Pod
it
'creates the xcconfig file'
do
it
'creates the xcconfig file'
do
@installer
.
install!
@installer
.
install!
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_p
rivate_p
ath
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
xcconfig
=
Xcodeproj
::
Config
.
new
(
file
)
xcconfig
=
Xcodeproj
::
Config
.
new
(
file
)
xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}'
xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}'
end
end
...
...
spec/unit/target/pod_target_spec.rb
View file @
3ff30dc6
...
@@ -159,9 +159,6 @@ module Pod
...
@@ -159,9 +159,6 @@ module Pod
@pod_target
.
xcconfig_path
.
to_s
.
should
.
include?
(
@pod_target
.
xcconfig_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/BananaLib/BananaLib.xcconfig'
,
'Pods/Target Support Files/BananaLib/BananaLib.xcconfig'
,
)
)
@pod_target
.
xcconfig_private_path
.
to_s
.
should
.
include
(
'Pods/Target Support Files/BananaLib/BananaLib-Private.xcconfig'
,
)
end
end
it
'returns the path for the CONFIGURATION_BUILD_DIR build setting'
do
it
'returns the path for the CONFIGURATION_BUILD_DIR build setting'
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