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
c8ce4ad1
Commit
c8ce4ad1
authored
Oct 21, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2461 from mrackwitz/refactorings
Refactorings in Preparation to Framework Support
parents
ca511f0f
8f0a245e
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
225 additions
and
135 deletions
+225
-135
CHANGELOG.md
CHANGELOG.md
+5
-0
cocoapods.rb
lib/cocoapods.rb
+1
-0
header.rb
lib/cocoapods/generator/header.rb
+75
-0
prefix_header.rb
lib/cocoapods/generator/prefix_header.rb
+15
-34
library_representation.rb
lib/cocoapods/hooks/library_representation.rb
+1
-1
installer.rb
lib/cocoapods/installer.rb
+3
-3
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+21
-21
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+17
-17
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+19
-19
target.rb
lib/cocoapods/target.rb
+1
-1
pod_target.rb
lib/cocoapods/target/pod_target.rb
+2
-2
header_spec.rb
spec/unit/generator/header_spec.rb
+38
-0
prefix_header_spec.rb
spec/unit/generator/prefix_header_spec.rb
+0
-10
library_representation_spec.rb
spec/unit/hooks/library_representation_spec.rb
+1
-1
aggregate_target_installer_spec.rb
...aller/target_installer/aggregate_target_installer_spec.rb
+2
-2
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+7
-7
target_installer_spec.rb
spec/unit/installer/target_installer_spec.rb
+3
-3
user_project_integrator_spec.rb
spec/unit/installer/user_project_integrator_spec.rb
+14
-14
No files found.
CHANGELOG.md
View file @
c8ce4ad1
...
@@ -10,6 +10,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
...
@@ -10,6 +10,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
repo push`
in CocoaPods 0.33.
repo push`
in CocoaPods 0.33.
[
Fabio Pelosin
](
https://github.com/fabiopelosin
)
[
Fabio Pelosin
](
https://github.com/fabiopelosin
)
*
Refactorings in preparation to framework support, which could break usages
of the Hooks-API.
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
#2461
](
https://github.com/CocoaPods/CocoaPods/issues/2461
)
## 0.34.4
## 0.34.4
...
...
lib/cocoapods.rb
View file @
c8ce4ad1
...
@@ -56,6 +56,7 @@ module Pod
...
@@ -56,6 +56,7 @@ module Pod
autoload
:BridgeSupport
,
'cocoapods/generator/bridge_support'
autoload
:BridgeSupport
,
'cocoapods/generator/bridge_support'
autoload
:CopyResourcesScript
,
'cocoapods/generator/copy_resources_script'
autoload
:CopyResourcesScript
,
'cocoapods/generator/copy_resources_script'
autoload
:DummySource
,
'cocoapods/generator/dummy_source'
autoload
:DummySource
,
'cocoapods/generator/dummy_source'
autoload
:Header
,
'cocoapods/generator/header'
autoload
:PrefixHeader
,
'cocoapods/generator/prefix_header'
autoload
:PrefixHeader
,
'cocoapods/generator/prefix_header'
autoload
:TargetEnvironmentHeader
,
'cocoapods/generator/target_environment_header'
autoload
:TargetEnvironmentHeader
,
'cocoapods/generator/target_environment_header'
autoload
:XCConfig
,
'cocoapods/generator/xcconfig'
autoload
:XCConfig
,
'cocoapods/generator/xcconfig'
...
...
lib/cocoapods/generator/header.rb
0 → 100644
View file @
c8ce4ad1
module
Pod
module
Generator
# Generates a header file.
#
# According to the platform the header imports `UIKit/UIKit.h` or
# `Cocoa/Cocoa.h`.
#
class
Header
# @return [Symbol] the platform for which the prefix header will be
# generated.
#
attr_reader
:platform
# @return [Array<String>] The list of the headers to import.
#
attr_reader
:imports
# @param [Symbol] platform
# @see platform
#
def
initialize
(
platform
)
@platform
=
platform
@imports
=
[]
end
# Generates the contents of the header according to the platform.
#
# @note If the platform is iOS an import call to `UIKit/UIKit.h` is
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
# is imported.
#
# @return [String]
#
def
generate
result
=
""
result
<<
generate_platform_import_header
result
<<
"
\n
"
imports
.
each
do
|
import
|
result
<<
%|#import "#{import}"\n|
end
result
end
# Generates and saves the header to the given path.
#
# @param [Pathname] path
# The path where the header should be stored.
#
# @return [void]
#
def
save_as
(
path
)
path
.
open
(
'w'
)
{
|
header
|
header
.
write
(
generate
)
}
end
#-----------------------------------------------------------------------#
protected
# Generates the contents of the header according to the platform.
#
# @note If the platform is iOS an import call to `UIKit/UIKit.h` is
# added to the top of the header. For OS X `Cocoa/Cocoa.h` is
# imported.
#
# @return [String]
#
def
generate_platform_import_header
"#import
#{
platform
==
:ios
?
'<UIKit/UIKit.h>'
:
'<Cocoa/Cocoa.h>'
}
\n
"
end
end
end
end
lib/cocoapods/generator/prefix_header.rb
View file @
c8ce4ad1
...
@@ -6,38 +6,26 @@ module Pod
...
@@ -6,38 +6,26 @@ module Pod
# According to the platform the prefix header imports `UIKit/UIKit.h` or
# According to the platform the prefix header imports `UIKit/UIKit.h` or
# `Cocoa/Cocoa.h`.
# `Cocoa/Cocoa.h`.
#
#
class
PrefixHeader
class
PrefixHeader
<
Header
# @return [Array<FileAccessor>] The file accessors for which to generate
# @return [Array<FileAccessor>] The file accessors for which to generate
# the prefix header.
# the prefix header.
#
#
attr_reader
:file_accessors
attr_reader
:file_accessors
# @
return [Platform] the platform for which the prefix header will be
# @
param [Array<FileAccessor>] file_accessors
#
generated.
#
@see file_accessors
#
#
attr_reader
:platform
# @param [Platform] platform
# @see platform
# @return [Array<String>] The list of the headers to import (with
# quotes).
#
attr_reader
:imports
# @param [Platform] platform @see platform
# @param [Array<LocalPod>] consumers @see consumers
#
#
def
initialize
(
file_accessors
,
platform
)
def
initialize
(
file_accessors
,
platform
)
@file_accessors
=
file_accessors
@file_accessors
=
file_accessors
@platform
=
platform
super
platform
@imports
=
[]
end
end
# Generates the contents of the prefix header according to the platform
# Generates the contents of the prefix header according to the platform
# and the pods.
# and the pods.
#
#
# @note If the platform is iOS an import call to `UIKit/UIKit.h` is
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
# is imported.
#
# @note Only unique prefix_header_contents are added to the prefix
# @note Only unique prefix_header_contents are added to the prefix
# header.
# header.
#
#
...
@@ -48,20 +36,12 @@ module Pod
...
@@ -48,20 +36,12 @@ module Pod
# file_accessor.prefix_header.
# file_accessor.prefix_header.
#
#
def
generate
def
generate
result
=
"#ifdef __OBJC__
\n
"
result
=
super
result
<<
"#import
#{
platform
==
:ios
?
'<UIKit/UIKit.h>'
:
'<Cocoa/Cocoa.h>'
}
\n
"
result
<<
"#endif
\n
"
imports
.
each
do
|
import
|
result
<<
%(\n#import "#{import}")
end
unique_prefix_header_contents
=
file_accessors
.
map
do
|
file_accessor
|
unique_prefix_header_contents
=
file_accessors
.
map
do
|
file_accessor
|
file_accessor
.
spec_consumer
.
prefix_header_contents
file_accessor
.
spec_consumer
.
prefix_header_contents
end
.
compact
.
uniq
end
.
compact
.
uniq
result
<<
"
\n
"
unique_prefix_header_contents
.
each
do
|
prefix_header_contents
|
unique_prefix_header_contents
.
each
do
|
prefix_header_contents
|
result
<<
prefix_header_contents
result
<<
prefix_header_contents
result
<<
"
\n
"
result
<<
"
\n
"
...
@@ -75,15 +55,16 @@ module Pod
...
@@ -75,15 +55,16 @@ module Pod
result
result
end
end
# Generates and saves the prefix header to the given path.
protected
#
# @param [Pathname] path
# Generates the contents of the header according to the platform.
# the path where the prefix header should be stored.
#
#
# @return [
void
]
# @return [
String
]
#
#
def
save_as
(
path
)
def
generate_platform_import_header
path
.
open
(
'w'
)
{
|
header
|
header
.
write
(
generate
)
}
result
=
"#ifdef __OBJC__
\n
"
result
<<
super
result
<<
"#endif
\n
"
end
end
end
end
end
end
...
...
lib/cocoapods/hooks/library_representation.rb
View file @
c8ce4ad1
...
@@ -69,7 +69,7 @@ module Pod
...
@@ -69,7 +69,7 @@ module Pod
# process.
# process.
#
#
def
target
def
target
library
.
target
library
.
native_
target
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
lib/cocoapods/installer.rb
View file @
c8ce4ad1
...
@@ -418,7 +418,7 @@ module Pod
...
@@ -418,7 +418,7 @@ module Pod
pod_targets
.
sort_by
(
&
:name
).
each
do
|
pod_target
|
pod_targets
.
sort_by
(
&
:name
).
each
do
|
pod_target
|
pod_target
.
file_accessors
.
each
do
|
file_accessor
|
pod_target
.
file_accessors
.
each
do
|
file_accessor
|
file_accessor
.
spec_consumer
.
frameworks
.
each
do
|
framework
|
file_accessor
.
spec_consumer
.
frameworks
.
each
do
|
framework
|
pod_target
.
target
.
add_system_framework
(
framework
)
pod_target
.
native_
target
.
add_system_framework
(
framework
)
end
end
end
end
end
end
...
@@ -428,7 +428,7 @@ module Pod
...
@@ -428,7 +428,7 @@ module Pod
def
set_target_dependencies
def
set_target_dependencies
aggregate_targets
.
each
do
|
aggregate_target
|
aggregate_targets
.
each
do
|
aggregate_target
|
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
aggregate_target
.
target
.
add_dependency
(
pod_target
.
target
)
aggregate_target
.
native_target
.
add_dependency
(
pod_target
.
native_
target
)
pod_target
.
dependencies
.
each
do
|
dep
|
pod_target
.
dependencies
.
each
do
|
dep
|
unless
dep
==
pod_target
.
pod_name
unless
dep
==
pod_target
.
pod_name
...
@@ -437,7 +437,7 @@ module Pod
...
@@ -437,7 +437,7 @@ module Pod
unless
pod_dependency_target
unless
pod_dependency_target
puts
"[BUG] DEP:
#{
dep
}
"
puts
"[BUG] DEP:
#{
dep
}
"
end
end
pod_target
.
target
.
add_dependency
(
pod_dependency_target
.
target
)
pod_target
.
native_target
.
add_dependency
(
pod_dependency_target
.
native_
target
)
end
end
end
end
end
end
...
...
lib/cocoapods/installer/target_installer.rb
View file @
c8ce4ad1
...
@@ -10,16 +10,16 @@ module Pod
...
@@ -10,16 +10,16 @@ module Pod
#
#
attr_reader
:sandbox
attr_reader
:sandbox
# @return [
Library
] The library whose target needs to be generated.
# @return [
Target
] The library whose target needs to be generated.
#
#
attr_reader
:
library
attr_reader
:
target
# @param [Project] project @see project
# @param [Project] project @see project
# @param [
Library] library @see library
# @param [
Target] target @see target
#
#
def
initialize
(
sandbox
,
library
)
def
initialize
(
sandbox
,
target
)
@sandbox
=
sandbox
@sandbox
=
sandbox
@
library
=
library
@
target
=
target
end
end
private
private
...
@@ -36,31 +36,31 @@ module Pod
...
@@ -36,31 +36,31 @@ module Pod
# @return [void]
# @return [void]
#
#
def
add_target
def
add_target
name
=
library
.
label
name
=
target
.
label
platform
=
library
.
platform
.
name
platform
=
target
.
platform
.
name
deployment_target
=
library
.
platform
.
deployment_target
.
to_s
deployment_target
=
target
.
platform
.
deployment_target
.
to_s
@target
=
project
.
new_target
(
:static_library
,
name
,
platform
,
deployment_target
)
@
native_
target
=
project
.
new_target
(
:static_library
,
name
,
platform
,
deployment_target
)
library
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
target
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
configuration
=
@target
.
add_build_configuration
(
bc_name
,
type
)
configuration
=
@
native_
target
.
add_build_configuration
(
bc_name
,
type
)
end
end
settings
=
{
'OTHER_LDFLAGS'
=>
''
,
'OTHER_LIBTOOLFLAGS'
=>
''
}
settings
=
{
'OTHER_LDFLAGS'
=>
''
,
'OTHER_LIBTOOLFLAGS'
=>
''
}
if
library
.
archs
if
target
.
archs
settings
[
'ARCHS'
]
=
library
.
archs
settings
[
'ARCHS'
]
=
target
.
archs
end
end
@target
.
build_configurations
.
each
do
|
configuration
|
@
native_
target
.
build_configurations
.
each
do
|
configuration
|
configuration
.
build_settings
.
merge!
(
settings
)
configuration
.
build_settings
.
merge!
(
settings
)
end
end
library
.
target
=
@
target
target
.
native_target
=
@native_
target
end
end
# Creates the directory where to store the support files of the target.
# Creates the directory where to store the support files of the target.
#
#
def
create_support_files_dir
def
create_support_files_dir
library
.
support_files_dir
.
mkdir
target
.
support_files_dir
.
mkdir
end
end
# Generates a dummy source file for each target so libraries that contain
# Generates a dummy source file for each target so libraries that contain
...
@@ -69,11 +69,11 @@ module Pod
...
@@ -69,11 +69,11 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_dummy_source
def
create_dummy_source
path
=
library
.
dummy_source_path
path
=
target
.
dummy_source_path
generator
=
Generator
::
DummySource
.
new
(
library
.
label
)
generator
=
Generator
::
DummySource
.
new
(
target
.
label
)
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
file_reference
=
add_file_to_support_group
(
path
)
file_reference
=
add_file_to_support_group
(
path
)
target
.
source_build_phase
.
add_file_reference
(
file_reference
)
native_
target
.
source_build_phase
.
add_file_reference
(
file_reference
)
end
end
# @return [PBXNativeTarget] the target generated by the installation
# @return [PBXNativeTarget] the target generated by the installation
...
@@ -81,7 +81,7 @@ module Pod
...
@@ -81,7 +81,7 @@ module Pod
#
#
# @note Generated by the {#add_target} step.
# @note Generated by the {#add_target} step.
#
#
attr_reader
:target
attr_reader
:
native_
target
private
private
...
@@ -98,7 +98,7 @@ module Pod
...
@@ -98,7 +98,7 @@ module Pod
# @return [TargetDefinition] the target definition of the library.
# @return [TargetDefinition] the target definition of the library.
#
#
def
target_definition
def
target_definition
library
.
target_definition
target
.
target_definition
end
end
# @return [PBXGroup] the group where the file references to the support
# @return [PBXGroup] the group where the file references to the support
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
c8ce4ad1
...
@@ -9,7 +9,7 @@ module Pod
...
@@ -9,7 +9,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
install!
def
install!
UI
.
message
"- Installing target `
#{
library
.
name
}
`
#{
library
.
platform
}
"
do
UI
.
message
"- Installing target `
#{
target
.
name
}
`
#{
target
.
platform
}
"
do
add_target
add_target
create_support_files_dir
create_support_files_dir
create_suport_files_group
create_suport_files_group
...
@@ -33,8 +33,8 @@ module Pod
...
@@ -33,8 +33,8 @@ module Pod
#
#
def
create_suport_files_group
def
create_suport_files_group
parent
=
project
.
support_files_group
parent
=
project
.
support_files_group
name
=
library
.
name
name
=
target
.
name
dir
=
library
.
support_files_dir
dir
=
target
.
support_files_dir
@support_files_group
=
parent
.
new_group
(
name
,
dir
)
@support_files_group
=
parent
.
new_group
(
name
,
dir
)
end
end
...
@@ -43,11 +43,11 @@ module Pod
...
@@ -43,11 +43,11 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_xcconfig_file
def
create_xcconfig_file
target
.
build_configurations
.
each
do
|
configuration
|
native_
target
.
build_configurations
.
each
do
|
configuration
|
path
=
library
.
xcconfig_path
(
configuration
.
name
)
path
=
target
.
xcconfig_path
(
configuration
.
name
)
gen
=
Generator
::
XCConfig
::
AggregateXCConfig
.
new
(
library
,
configuration
.
name
)
gen
=
Generator
::
XCConfig
::
AggregateXCConfig
.
new
(
target
,
configuration
.
name
)
gen
.
save_as
(
path
)
gen
.
save_as
(
path
)
library
.
xcconfigs
[
configuration
.
name
]
=
gen
.
xcconfig
target
.
xcconfigs
[
configuration
.
name
]
=
gen
.
xcconfig
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
configuration
.
base_configuration_reference
=
xcconfig_file_ref
configuration
.
base_configuration_reference
=
xcconfig_file_ref
end
end
...
@@ -57,8 +57,8 @@ module Pod
...
@@ -57,8 +57,8 @@ module Pod
# pods and the installed specifications of a pod.
# pods and the installed specifications of a pod.
#
#
def
create_target_environment_header
def
create_target_environment_header
path
=
library
.
target_environment_header_path
path
=
target
.
target_environment_header_path
generator
=
Generator
::
TargetEnvironmentHeader
.
new
(
library
.
specs_by_build_configuration
)
generator
=
Generator
::
TargetEnvironmentHeader
.
new
(
target
.
specs_by_build_configuration
)
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
end
end
...
@@ -66,15 +66,15 @@ module Pod
...
@@ -66,15 +66,15 @@ module Pod
# Generates the bridge support metadata if requested by the {Podfile}.
# Generates the bridge support metadata if requested by the {Podfile}.
#
#
# @note The bridge support metadata is added to the resources of the
# @note The bridge support metadata is added to the resources of the
#
library
because it is needed for environments interpreted at
#
target
because it is needed for environments interpreted at
# runtime.
# runtime.
#
#
# @return [void]
# @return [void]
#
#
def
create_bridge_support_file
def
create_bridge_support_file
if
target_definition
.
podfile
.
generate_bridge_support?
if
target_definition
.
podfile
.
generate_bridge_support?
path
=
library
.
bridge_support_path
path
=
target
.
bridge_support_path
headers
=
target
.
headers_build_phase
.
files
.
map
{
|
bf
|
sandbox
.
root
+
bf
.
file_ref
.
path
}
headers
=
native_
target
.
headers_build_phase
.
files
.
map
{
|
bf
|
sandbox
.
root
+
bf
.
file_ref
.
path
}
generator
=
Generator
::
BridgeSupport
.
new
(
headers
)
generator
=
Generator
::
BridgeSupport
.
new
(
headers
)
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
...
@@ -91,15 +91,15 @@ module Pod
...
@@ -91,15 +91,15 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_copy_resources_script
def
create_copy_resources_script
path
=
library
.
copy_resources_script_path
path
=
target
.
copy_resources_script_path
file_accessors
=
library
.
pod_targets
.
map
(
&
:file_accessors
).
flatten
file_accessors
=
target
.
pod_targets
.
map
(
&
:file_accessors
).
flatten
resource_paths
=
file_accessors
.
map
{
|
accessor
|
accessor
.
resources
.
flatten
.
map
{
|
res
|
res
.
relative_path_from
(
project
.
path
.
dirname
)
}
}.
flatten
resource_paths
=
file_accessors
.
map
{
|
accessor
|
accessor
.
resources
.
flatten
.
map
{
|
res
|
res
.
relative_path_from
(
project
.
path
.
dirname
)
}
}.
flatten
resource_bundles
=
file_accessors
.
map
{
|
accessor
|
accessor
.
resource_bundles
.
keys
.
map
{
|
name
|
"${BUILT_PRODUCTS_DIR}/
#{
name
}
.bundle"
}
}.
flatten
resource_bundles
=
file_accessors
.
map
{
|
accessor
|
accessor
.
resource_bundles
.
keys
.
map
{
|
name
|
"${BUILT_PRODUCTS_DIR}/
#{
name
}
.bundle"
}
}.
flatten
resources
=
[]
resources
=
[]
resources
.
concat
(
resource_paths
)
resources
.
concat
(
resource_paths
)
resources
.
concat
(
resource_bundles
)
resources
.
concat
(
resource_bundles
)
resources
<<
bridge_support_file
if
bridge_support_file
resources
<<
bridge_support_file
if
bridge_support_file
generator
=
Generator
::
CopyResourcesScript
.
new
(
resources
,
library
.
platform
)
generator
=
Generator
::
CopyResourcesScript
.
new
(
resources
,
target
.
platform
)
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
end
end
...
@@ -109,10 +109,10 @@ module Pod
...
@@ -109,10 +109,10 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_acknowledgements
def
create_acknowledgements
basepath
=
library
.
acknowledgements_basepath
basepath
=
target
.
acknowledgements_basepath
Generator
::
Acknowledgements
.
generators
.
each
do
|
generator_class
|
Generator
::
Acknowledgements
.
generators
.
each
do
|
generator_class
|
path
=
generator_class
.
path_from_basepath
(
basepath
)
path
=
generator_class
.
path_from_basepath
(
basepath
)
file_accessors
=
library
.
pod_targets
.
map
(
&
:file_accessors
).
flatten
file_accessors
=
target
.
pod_targets
.
map
(
&
:file_accessors
).
flatten
generator
=
generator_class
.
new
(
file_accessors
)
generator
=
generator_class
.
new
(
file_accessors
)
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
c8ce4ad1
...
@@ -9,7 +9,7 @@ module Pod
...
@@ -9,7 +9,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
install!
def
install!
UI
.
message
"- Installing target `
#{
library
.
name
}
`
#{
library
.
platform
}
"
do
UI
.
message
"- Installing target `
#{
target
.
name
}
`
#{
target
.
platform
}
"
do
add_target
add_target
create_support_files_dir
create_support_files_dir
add_files_to_build_phases
add_files_to_build_phases
...
@@ -33,15 +33,15 @@ module Pod
...
@@ -33,15 +33,15 @@ module Pod
# @return [void]
# @return [void]
#
#
def
add_files_to_build_phases
def
add_files_to_build_phases
library
.
file_accessors
.
each
do
|
file_accessor
|
target
.
file_accessors
.
each
do
|
file_accessor
|
consumer
=
file_accessor
.
spec_consumer
consumer
=
file_accessor
.
spec_consumer
flags
=
compiler_flags_for_consumer
(
consumer
)
flags
=
compiler_flags_for_consumer
(
consumer
)
all_source_files
=
file_accessor
.
source_files
all_source_files
=
file_accessor
.
source_files
regular_source_files
=
all_source_files
.
reject
{
|
sf
|
sf
.
extname
==
'.d'
}
regular_source_files
=
all_source_files
.
reject
{
|
sf
|
sf
.
extname
==
'.d'
}
regular_file_refs
=
regular_source_files
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
regular_file_refs
=
regular_source_files
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
target
.
add_file_references
(
regular_file_refs
,
flags
)
native_
target
.
add_file_references
(
regular_file_refs
,
flags
)
other_file_refs
=
(
all_source_files
-
regular_source_files
).
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
other_file_refs
=
(
all_source_files
-
regular_source_files
).
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
target
.
add_file_references
(
other_file_refs
,
nil
)
native_
target
.
add_file_references
(
other_file_refs
,
nil
)
end
end
end
end
...
@@ -53,22 +53,22 @@ module Pod
...
@@ -53,22 +53,22 @@ module Pod
# @return [void]
# @return [void]
#
#
def
add_resources_bundle_targets
def
add_resources_bundle_targets
library
.
file_accessors
.
each
do
|
file_accessor
|
target
.
file_accessors
.
each
do
|
file_accessor
|
file_accessor
.
resource_bundles
.
each
do
|
bundle_name
,
paths
|
file_accessor
.
resource_bundles
.
each
do
|
bundle_name
,
paths
|
# Add a dependency on an existing Resource Bundle target if possible
# Add a dependency on an existing Resource Bundle target if possible
if
bundle_target
=
project
.
targets
.
find
{
|
target
|
target
.
name
==
bundle_name
}
if
bundle_target
=
project
.
targets
.
find
{
|
target
|
target
.
name
==
bundle_name
}
target
.
add_dependency
(
bundle_target
)
native_
target
.
add_dependency
(
bundle_target
)
next
next
end
end
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
bundle_target
=
project
.
new_resources_bundle
(
bundle_name
,
file_accessor
.
spec_consumer
.
platform_name
)
bundle_target
=
project
.
new_resources_bundle
(
bundle_name
,
file_accessor
.
spec_consumer
.
platform_name
)
bundle_target
.
add_resources
(
file_references
)
bundle_target
.
add_resources
(
file_references
)
library
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
target
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
bundle_target
.
add_build_configuration
(
bc_name
,
type
)
bundle_target
.
add_build_configuration
(
bc_name
,
type
)
end
end
target
.
add_dependency
(
bundle_target
)
native_
target
.
add_dependency
(
bundle_target
)
end
end
end
end
end
end
...
@@ -78,17 +78,17 @@ module Pod
...
@@ -78,17 +78,17 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_xcconfig_file
def
create_xcconfig_file
path
=
library
.
xcconfig_path
path
=
target
.
xcconfig_path
public_gen
=
Generator
::
XCConfig
::
PublicPodXCConfig
.
new
(
library
)
public_gen
=
Generator
::
XCConfig
::
PublicPodXCConfig
.
new
(
target
)
public_gen
.
save_as
(
path
)
public_gen
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
path
=
library
.
xcconfig_private_path
path
=
target
.
xcconfig_private_path
private_gen
=
Generator
::
XCConfig
::
PrivatePodXCConfig
.
new
(
library
,
public_gen
.
xcconfig
)
private_gen
=
Generator
::
XCConfig
::
PrivatePodXCConfig
.
new
(
target
,
public_gen
.
xcconfig
)
private_gen
.
save_as
(
path
)
private_gen
.
save_as
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
target
.
build_configurations
.
each
do
|
c
|
native_
target
.
build_configurations
.
each
do
|
c
|
c
.
base_configuration_reference
=
xcconfig_file_ref
c
.
base_configuration_reference
=
xcconfig_file_ref
end
end
end
end
...
@@ -100,13 +100,13 @@ module Pod
...
@@ -100,13 +100,13 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_prefix_header
def
create_prefix_header
path
=
library
.
prefix_header_path
path
=
target
.
prefix_header_path
generator
=
Generator
::
PrefixHeader
.
new
(
library
.
file_accessors
,
library
.
platform
)
generator
=
Generator
::
PrefixHeader
.
new
(
target
.
file_accessors
,
target
.
platform
)
generator
.
imports
<<
library
.
target_environment_header_path
.
basename
generator
.
imports
<<
target
.
target_environment_header_path
.
basename
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
target
.
build_configurations
.
each
do
|
c
|
native_
target
.
build_configurations
.
each
do
|
c
|
relative_path
=
path
.
relative_path_from
(
project
.
path
.
dirname
)
relative_path
=
path
.
relative_path_from
(
project
.
path
.
dirname
)
c
.
build_settings
[
'GCC_PREFIX_HEADER'
]
=
relative_path
.
to_s
c
.
build_settings
[
'GCC_PREFIX_HEADER'
]
=
relative_path
.
to_s
end
end
...
@@ -176,8 +176,8 @@ module Pod
...
@@ -176,8 +176,8 @@ module Pod
# @return [PBXFileReference] the file reference of the added file.
# @return [PBXFileReference] the file reference of the added file.
#
#
def
add_file_to_support_group
(
path
)
def
add_file_to_support_group
(
path
)
pod_name
=
library
.
pod_name
pod_name
=
target
.
pod_name
dir
=
library
.
support_files_dir
dir
=
target
.
support_files_dir
group
=
project
.
pod_support_files_group
(
pod_name
,
dir
)
group
=
project
.
pod_support_files_group
(
pod_name
,
dir
)
group
.
new_file
(
path
)
group
.
new_file
(
path
)
end
end
...
...
lib/cocoapods/target.rb
View file @
c8ce4ad1
...
@@ -52,7 +52,7 @@ module Pod
...
@@ -52,7 +52,7 @@ module Pod
# @return [PBXNativeTarget] the target generated in the Pods project for
# @return [PBXNativeTarget] the target generated in the Pods project for
# this library.
# this library.
#
#
attr_accessor
:target
attr_accessor
:
native_
target
# @return [Platform] the platform for this library.
# @return [Platform] the platform for this library.
#
#
...
...
lib/cocoapods/target/pod_target.rb
View file @
c8ce4ad1
...
@@ -57,8 +57,8 @@ module Pod
...
@@ -57,8 +57,8 @@ module Pod
# depends.
# depends.
#
#
def
dependencies
def
dependencies
spec
s
.
map
do
|
spec
|
spec
_consumers
.
map
do
|
consumer
|
spec
.
consumer
(
platform
)
.
dependencies
.
map
{
|
dep
|
Specification
.
root_name
(
dep
.
name
)
}
consumer
.
dependencies
.
map
{
|
dep
|
Specification
.
root_name
(
dep
.
name
)
}
end
.
flatten
end
.
flatten
end
end
...
...
spec/unit/generator/header_spec.rb
0 → 100644
View file @
c8ce4ad1
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Header
=
Generator
::
Header
do
before
do
@gen
=
Header
.
new
(
Pod
::
Platform
.
ios
)
end
it
'includes the imports'
do
@gen
.
imports
<<
'header.h'
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
#import <UIKit/UIKit.h>
#import "header.h"
EOS
end
it
'imports UIKit in iOS platforms'
do
@gen
.
stubs
(
:platform
).
returns
(
Pod
::
Platform
.
ios
)
@gen
.
generate
.
should
.
include?
(
'#import <UIKit/UIKit.h>'
)
end
it
'imports Cocoa for OS X platforms'
do
@gen
.
stubs
(
:platform
).
returns
(
Pod
::
Platform
.
osx
)
@gen
.
generate
.
should
.
include?
(
'#import <Cocoa/Cocoa.h>'
)
end
it
'writes the header file to the disk'
do
path
=
temporary_directory
+
'Test.h'
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
#import <UIKit/UIKit.h>
EOS
end
end
end
spec/unit/generator/prefix_header_spec.rb
View file @
c8ce4ad1
...
@@ -80,16 +80,6 @@ module Pod
...
@@ -80,16 +80,6 @@ module Pod
EOS
EOS
end
end
it
'imports UIKit in iOS platforms'
do
@gen
.
stubs
(
:platform
).
returns
(
Pod
::
Platform
.
ios
)
@gen
.
generate
.
should
.
include?
(
'#import <UIKit/UIKit.h>'
)
end
it
'imports Cocoa for OS X platforms'
do
@gen
.
stubs
(
:platform
).
returns
(
Pod
::
Platform
.
osx
)
@gen
.
generate
.
should
.
include?
(
'#import <Cocoa/Cocoa.h>'
)
end
it
'writes the prefix header file to the disk'
do
it
'writes the prefix header file to the disk'
do
path
=
temporary_directory
+
'Test.pch'
path
=
temporary_directory
+
'Test.pch'
@gen
.
save_as
(
path
)
@gen
.
save_as
(
path
)
...
...
spec/unit/hooks/library_representation_spec.rb
View file @
c8ce4ad1
...
@@ -64,7 +64,7 @@ module Pod
...
@@ -64,7 +64,7 @@ module Pod
it
'returns the native target'
do
it
'returns the native target'
do
target
=
stub
target
=
stub
@lib
.
target
=
target
@lib
.
native_
target
=
target
@rep
.
target
.
should
==
target
@rep
.
target
.
should
==
target
end
end
...
...
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
c8ce4ad1
...
@@ -109,7 +109,7 @@ module Pod
...
@@ -109,7 +109,7 @@ module Pod
it
'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default'
do
it
'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default'
do
@installer
.
install!
@installer
.
install!
@installer
.
library
.
target
.
build_configurations
.
each
do
|
config
|
@installer
.
target
.
native_
target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'GCC_WARN_INHIBIT_ALL_WARNINGS'
].
should
.
be
.
nil
config
.
build_settings
[
'GCC_WARN_INHIBIT_ALL_WARNINGS'
].
should
.
be
.
nil
end
end
end
end
...
@@ -166,7 +166,7 @@ module Pod
...
@@ -166,7 +166,7 @@ module Pod
it
'creates a dummy source to ensure the creation of a single base library'
do
it
'creates a dummy source to ensure the creation of a single base library'
do
@installer
.
install!
@installer
.
install!
build_files
=
@installer
.
library
.
target
.
source_build_phase
.
files
build_files
=
@installer
.
target
.
native_
target
.
source_build_phase
.
files
build_file
=
build_files
.
find
{
|
bf
|
bf
.
file_ref
.
path
.
include?
(
'Pods-dummy.m'
)
}
build_file
=
build_files
.
find
{
|
bf
|
bf
.
file_ref
.
path
.
include?
(
'Pods-dummy.m'
)
}
build_file
.
should
.
be
.
not
.
nil
build_file
.
should
.
be
.
not
.
nil
build_file
.
file_ref
.
path
.
should
==
'Pods-dummy.m'
build_file
.
file_ref
.
path
.
should
==
'Pods-dummy.m'
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
c8ce4ad1
...
@@ -88,7 +88,7 @@ module Pod
...
@@ -88,7 +88,7 @@ module Pod
it
'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default'
do
it
'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default'
do
@installer
.
install!
@installer
.
install!
@installer
.
library
.
target
.
build_configurations
.
each
do
|
config
|
@installer
.
target
.
native_
target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'GCC_WARN_INHIBIT_ALL_WARNINGS'
].
should
.
be
.
nil
config
.
build_settings
[
'GCC_WARN_INHIBIT_ALL_WARNINGS'
].
should
.
be
.
nil
end
end
end
end
...
@@ -97,7 +97,7 @@ module Pod
...
@@ -97,7 +97,7 @@ module Pod
it
'adds the source files of each pod to the target of the Pod library'
do
it
'adds the source files of each pod to the target of the Pod library'
do
@installer
.
install!
@installer
.
install!
names
=
@installer
.
library
.
target
.
source_build_phase
.
files
.
map
{
|
bf
|
bf
.
file_ref
.
display_name
}
names
=
@installer
.
target
.
native_
target
.
source_build_phase
.
files
.
map
{
|
bf
|
bf
.
file_ref
.
display_name
}
names
.
should
.
include
(
'Banana.m'
)
names
.
should
.
include
(
'Banana.m'
)
end
end
...
@@ -142,7 +142,7 @@ module Pod
...
@@ -142,7 +142,7 @@ module Pod
it
'creates a dummy source to ensure the compilation of libraries with only categories'
do
it
'creates a dummy source to ensure the compilation of libraries with only categories'
do
@installer
.
install!
@installer
.
install!
build_files
=
@installer
.
library
.
target
.
source_build_phase
.
files
build_files
=
@installer
.
target
.
native_
target
.
source_build_phase
.
files
build_file
=
build_files
.
find
{
|
bf
|
bf
.
file_ref
.
display_name
==
'Pods-BananaLib-dummy.m'
}
build_file
=
build_files
.
find
{
|
bf
|
bf
.
file_ref
.
display_name
==
'Pods-BananaLib-dummy.m'
}
build_file
.
should
.
be
.
not
.
nil
build_file
.
should
.
be
.
not
.
nil
build_file
.
file_ref
.
path
.
should
==
'Pods-BananaLib-dummy.m'
build_file
.
file_ref
.
path
.
should
==
'Pods-BananaLib-dummy.m'
...
@@ -158,10 +158,10 @@ module Pod
...
@@ -158,10 +158,10 @@ module Pod
end
end
it
'flags should not be added to dtrace files'
do
it
'flags should not be added to dtrace files'
do
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
target
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
install!
@installer
.
install!
dtrace_files
=
@installer
.
library
.
target
.
source_build_phase
.
files
.
reject
do
|
sf
|
dtrace_files
=
@installer
.
target
.
native_target
.
source_build_phase
.
files
.
reject
do
|
sf
|
!
(
File
.
extname
(
sf
.
file_ref
.
path
)
==
'.d'
)
!
(
File
.
extname
(
sf
.
file_ref
.
path
)
==
'.d'
)
end
end
dtrace_files
.
each
do
|
dt
|
dtrace_files
.
each
do
|
dt
|
...
@@ -170,7 +170,7 @@ module Pod
...
@@ -170,7 +170,7 @@ module Pod
end
end
it
'adds -w per pod if target definition inhibits warnings for that pod'
do
it
'adds -w per pod if target definition inhibits warnings for that pod'
do
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
target
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
.
should
.
include?
(
'-w'
)
flags
.
should
.
include?
(
'-w'
)
...
@@ -182,7 +182,7 @@ module Pod
...
@@ -182,7 +182,7 @@ module Pod
end
end
it
'adds -Xanalyzer -analyzer-disable-checker per pod'
do
it
'adds -Xanalyzer -analyzer-disable-checker per pod'
do
@installer
.
library
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@installer
.
target
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
=
@installer
.
send
(
:compiler_flags_for_consumer
,
@spec
.
consumer
(
:ios
))
flags
.
should
.
include?
(
'-Xanalyzer -analyzer-disable-checker'
)
flags
.
should
.
include?
(
'-Xanalyzer -analyzer-disable-checker'
)
...
...
spec/unit/installer/target_installer_spec.rb
View file @
c8ce4ad1
...
@@ -32,7 +32,7 @@ module Pod
...
@@ -32,7 +32,7 @@ module Pod
it
'adds the architectures to the custom build configurations of the user target'
do
it
'adds the architectures to the custom build configurations of the user target'
do
@pod_target
.
archs
=
'$(ARCHS_STANDARD_64_BIT)'
@pod_target
.
archs
=
'$(ARCHS_STANDARD_64_BIT)'
@installer
.
send
(
:add_target
)
@installer
.
send
(
:add_target
)
@installer
.
send
(
:target
).
resolved_build_setting
(
'ARCHS'
).
should
==
{
@installer
.
send
(
:
native_
target
).
resolved_build_setting
(
'ARCHS'
).
should
==
{
'Release'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'Release'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'Debug'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'Debug'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'AppStore'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'AppStore'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
...
@@ -42,8 +42,8 @@ module Pod
...
@@ -42,8 +42,8 @@ module Pod
it
'always clears the OTHER_LDFLAGS and OTHER_LIBTOOLFLAGS, because these lib targets do not ever need any'
do
it
'always clears the OTHER_LDFLAGS and OTHER_LIBTOOLFLAGS, because these lib targets do not ever need any'
do
@installer
.
send
(
:add_target
)
@installer
.
send
(
:add_target
)
@installer
.
send
(
:target
).
resolved_build_setting
(
'OTHER_LDFLAGS'
).
values
.
uniq
.
should
==
[
''
]
@installer
.
send
(
:
native_
target
).
resolved_build_setting
(
'OTHER_LDFLAGS'
).
values
.
uniq
.
should
==
[
''
]
@installer
.
send
(
:target
).
resolved_build_setting
(
'OTHER_LIBTOOLFLAGS'
).
values
.
uniq
.
should
==
[
''
]
@installer
.
send
(
:
native_
target
).
resolved_build_setting
(
'OTHER_LIBTOOLFLAGS'
).
values
.
uniq
.
should
==
[
''
]
end
end
end
end
...
...
spec/unit/installer/user_project_integrator_spec.rb
View file @
c8ce4ad1
...
@@ -18,12 +18,12 @@ module Pod
...
@@ -18,12 +18,12 @@ module Pod
end
end
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
Xcodeproj
::
Project
.
new
(
config
.
sandbox
.
project_path
).
save
Xcodeproj
::
Project
.
new
(
config
.
sandbox
.
project_path
).
save
@
library
=
AggregateTarget
.
new
(
@podfile
.
target_definitions
[
'Pods'
],
config
.
sandbox
)
@
target
=
AggregateTarget
.
new
(
@podfile
.
target_definitions
[
'Pods'
],
config
.
sandbox
)
@
library
.
client_root
=
sample_project_path
.
dirname
@
target
.
client_root
=
sample_project_path
.
dirname
@
library
.
user_project_path
=
sample_project_path
@
target
.
user_project_path
=
sample_project_path
@
library
.
user_target_uuids
=
[
'A346496C14F9BE9A0080D870'
]
@
target
.
user_target_uuids
=
[
'A346496C14F9BE9A0080D870'
]
empty_library
=
AggregateTarget
.
new
(
@podfile
.
target_definitions
[
:empty
],
config
.
sandbox
)
empty_library
=
AggregateTarget
.
new
(
@podfile
.
target_definitions
[
:empty
],
config
.
sandbox
)
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
library
,
empty_library
])
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
target
,
empty_library
])
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
@@ -59,10 +59,10 @@ module Pod
...
@@ -59,10 +59,10 @@ module Pod
UI
.
warnings
=
''
UI
.
warnings
=
''
target_config
=
stub
(
:name
=>
'Release'
,
:build_settings
=>
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
[
'FLAG=1'
]
})
target_config
=
stub
(
:name
=>
'Release'
,
:build_settings
=>
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
[
'FLAG=1'
]
})
user_target
=
stub
(
:name
=>
'SampleProject'
,
:build_configurations
=>
[
target_config
])
user_target
=
stub
(
:name
=>
'SampleProject'
,
:build_configurations
=>
[
target_config
])
@
library
.
stubs
(
:user_targets
).
returns
([
user_target
])
@
target
.
stubs
(
:user_targets
).
returns
([
user_target
])
@
library
.
xcconfigs
[
'Release'
]
=
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
}
@
target
.
xcconfigs
[
'Release'
]
=
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
}
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
library
])
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
target
])
@integrator
.
unstub
(
:warn_about_xcconfig_overrides
)
@integrator
.
unstub
(
:warn_about_xcconfig_overrides
)
@integrator
.
send
(
:warn_about_xcconfig_overrides
)
@integrator
.
send
(
:warn_about_xcconfig_overrides
)
...
@@ -74,10 +74,10 @@ module Pod
...
@@ -74,10 +74,10 @@ module Pod
UI
.
warnings
=
''
UI
.
warnings
=
''
target_config
=
stub
(
:name
=>
'Release'
,
:build_settings
=>
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
[
'FLAG=1'
,
'${inherited}'
]
})
target_config
=
stub
(
:name
=>
'Release'
,
:build_settings
=>
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
[
'FLAG=1'
,
'${inherited}'
]
})
user_target
=
stub
(
:name
=>
'SampleProject'
,
:build_configurations
=>
[
target_config
])
user_target
=
stub
(
:name
=>
'SampleProject'
,
:build_configurations
=>
[
target_config
])
@
library
.
stubs
(
:user_targets
).
returns
([
user_target
])
@
target
.
stubs
(
:user_targets
).
returns
([
user_target
])
@
library
.
xcconfigs
[
'Release'
]
=
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
}
@
target
.
xcconfigs
[
'Release'
]
=
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
}
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
library
])
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
target
])
@integrator
.
unstub
(
:warn_about_xcconfig_overrides
)
@integrator
.
unstub
(
:warn_about_xcconfig_overrides
)
@integrator
.
send
(
:warn_about_xcconfig_overrides
)
@integrator
.
send
(
:warn_about_xcconfig_overrides
)
...
@@ -88,10 +88,10 @@ module Pod
...
@@ -88,10 +88,10 @@ module Pod
UI
.
warnings
=
''
UI
.
warnings
=
''
target_config
=
stub
(
:name
=>
'Release'
,
:build_settings
=>
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
[
'FLAG=1'
,
'$(inherited)'
]
})
target_config
=
stub
(
:name
=>
'Release'
,
:build_settings
=>
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
[
'FLAG=1'
,
'$(inherited)'
]
})
user_target
=
stub
(
:name
=>
'SampleProject'
,
:build_configurations
=>
[
target_config
])
user_target
=
stub
(
:name
=>
'SampleProject'
,
:build_configurations
=>
[
target_config
])
@
library
.
stubs
(
:user_targets
).
returns
([
user_target
])
@
target
.
stubs
(
:user_targets
).
returns
([
user_target
])
@
library
.
xcconfigs
[
'Release'
]
=
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
}
@
target
.
xcconfigs
[
'Release'
]
=
{
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
}
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
library
])
@integrator
=
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
temporary_directory
,
[
@
target
])
@integrator
.
unstub
(
:warn_about_xcconfig_overrides
)
@integrator
.
unstub
(
:warn_about_xcconfig_overrides
)
@integrator
.
send
(
:warn_about_xcconfig_overrides
)
@integrator
.
send
(
:warn_about_xcconfig_overrides
)
...
...
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