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
1f5d4f0e
Commit
1f5d4f0e
authored
Aug 27, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Xcodeproj][Project] Remove build configurations from initialization
parent
4dcef288
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
23 deletions
+16
-23
Gemfile.lock
Gemfile.lock
+1
-1
installer.rb
lib/cocoapods/installer.rb
+4
-1
project.rb
lib/cocoapods/project.rb
+2
-2
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_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
+4
-14
target_installer_spec.rb
spec/unit/installer/target_installer_spec.rb
+1
-1
user_project_integrator_spec.rb
spec/unit/installer/user_project_integrator_spec.rb
+1
-1
project_spec.rb
spec/unit/project_spec.rb
+1
-1
No files found.
Gemfile.lock
View file @
1f5d4f0e
...
@@ -17,7 +17,7 @@ GIT
...
@@ -17,7 +17,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
b1878be0ea3e2f212a2f61be089c757d13b637db
revision:
5f0fc07355716817b7591a859774a93f6773d559
branch: paths-refactor
branch: paths-refactor
specs:
specs:
xcodeproj (0.9.0)
xcodeproj (0.9.0)
...
...
lib/cocoapods/installer.rb
View file @
1f5d4f0e
...
@@ -285,7 +285,10 @@ module Pod
...
@@ -285,7 +285,10 @@ module Pod
#
#
def
prepare_pods_project
def
prepare_pods_project
UI
.
message
"- Creating Pods project"
do
UI
.
message
"- Creating Pods project"
do
@pods_project
=
Pod
::
Project
.
new
(
sandbox
,
analysis_result
.
all_user_build_configurations
)
@pods_project
=
Pod
::
Project
.
new
(
sandbox
)
analysis_result
.
all_user_build_configurations
.
each
do
|
name
,
type
|
@pods_project
.
add_build_configuration
(
name
,
type
)
end
if
config
.
podfile_path
if
config
.
podfile_path
@pods_project
.
add_podfile
(
config
.
podfile_path
)
@pods_project
.
add_podfile
(
config
.
podfile_path
)
end
end
...
...
lib/cocoapods/project.rb
View file @
1f5d4f0e
...
@@ -17,8 +17,8 @@ module Pod
...
@@ -17,8 +17,8 @@ module Pod
# @param [Sandbox] sandbox @see #sandbox
# @param [Sandbox] sandbox @see #sandbox
#
#
def
initialize
(
sandbox
,
build_configurations
)
def
initialize
(
sandbox
)
super
(
sandbox
.
project_path
,
build_configurations
)
# Recreate the project from scratch for now.
super
(
sandbox
.
project_path
)
# Recreate the project from scratch for now.
# TODO
# TODO
raise
unless
sandbox
.
is_a?
(
Sandbox
)
raise
unless
sandbox
.
is_a?
(
Sandbox
)
@sandbox
=
sandbox
@sandbox
=
sandbox
...
...
spec/unit/installer/file_references_installer_spec.rb
View file @
1f5d4f0e
...
@@ -7,7 +7,7 @@ module Pod
...
@@ -7,7 +7,7 @@ module Pod
@file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@pod_target
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
@pod_target
.
file_accessors
=
[
@file_accessor
]
@pod_target
.
file_accessors
=
[
@file_accessor
]
@project
=
Project
.
new
(
config
.
sandbox
,
nil
)
@project
=
Project
.
new
(
config
.
sandbox
)
@installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
@pod_target
],
@project
)
@installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
@pod_target
],
@project
)
end
end
...
...
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
1f5d4f0e
...
@@ -9,7 +9,7 @@ module Pod
...
@@ -9,7 +9,7 @@ module Pod
xcodeproj
'dummy'
xcodeproj
'dummy'
end
end
@target_definition
=
@podfile
.
target_definitions
[
'Pods'
]
@target_definition
=
@podfile
.
target_definitions
[
'Pods'
]
@project
=
Project
.
new
(
config
.
sandbox
,
nil
)
@project
=
Project
.
new
(
config
.
sandbox
)
config
.
sandbox
.
project
=
@project
config
.
sandbox
.
project
=
@project
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
1f5d4f0e
...
@@ -9,8 +9,7 @@ module Pod
...
@@ -9,8 +9,7 @@ module Pod
xcodeproj
'dummy'
xcodeproj
'dummy'
end
end
@target_definition
=
@podfile
.
target_definitions
[
'Pods'
]
@target_definition
=
@podfile
.
target_definitions
[
'Pods'
]
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@project
=
Project
.
new
(
config
.
sandbox
)
@project
=
Project
.
new
(
config
.
sandbox
,
user_build_configurations
)
config
.
sandbox
.
project
=
@project
config
.
sandbox
.
project
=
@project
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
...
@@ -20,9 +19,8 @@ module Pod
...
@@ -20,9 +19,8 @@ module Pod
@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
=
user_build_configurations
@pod_target
.
file_accessors
=
[
file_accessor
]
@pod_target
.
file_accessors
=
[
file_accessor
]
@pod_target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
}
@installer
=
Installer
::
PodTargetInstaller
.
new
(
config
.
sandbox
,
@pod_target
)
@installer
=
Installer
::
PodTargetInstaller
.
new
(
config
.
sandbox
,
@pod_target
)
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
...
@@ -48,13 +46,6 @@ module Pod
...
@@ -48,13 +46,6 @@ module Pod
@project
.
targets
.
first
.
name
.
should
==
'Pods-BananaLib'
@project
.
targets
.
first
.
name
.
should
==
'Pods-BananaLib'
end
end
it
"adds the user build configurations to the target"
do
@installer
.
install!
target
=
@project
.
targets
.
first
target
.
build_settings
(
'Test'
)[
"VALIDATE_PRODUCT"
].
should
==
nil
target
.
build_settings
(
'AppStore'
)[
"VALIDATE_PRODUCT"
].
should
==
"YES"
end
it
"sets VALIDATE_PRODUCT to YES for the Release configuration for iOS targets"
do
it
"sets VALIDATE_PRODUCT to YES for the Release configuration for iOS targets"
do
@installer
.
install!
@installer
.
install!
target
=
@project
.
targets
.
first
target
=
@project
.
targets
.
first
...
@@ -67,7 +58,6 @@ module Pod
...
@@ -67,7 +58,6 @@ module Pod
target
.
platform_name
.
should
==
:ios
target
.
platform_name
.
should
==
:ios
target
.
deployment_target
.
should
==
"6.0"
target
.
deployment_target
.
should
==
"6.0"
target
.
build_settings
(
'Debug'
)[
"IPHONEOS_DEPLOYMENT_TARGET"
].
should
==
"6.0"
target
.
build_settings
(
'Debug'
)[
"IPHONEOS_DEPLOYMENT_TARGET"
].
should
==
"6.0"
target
.
build_settings
(
'AppStore'
)[
"IPHONEOS_DEPLOYMENT_TARGET"
].
should
==
"6.0"
end
end
it
"sets the platform and the deployment target for OS X targets"
do
it
"sets the platform and the deployment target for OS X targets"
do
...
@@ -77,10 +67,10 @@ module Pod
...
@@ -77,10 +67,10 @@ module Pod
target
.
platform_name
.
should
==
:osx
target
.
platform_name
.
should
==
:osx
target
.
deployment_target
.
should
==
"10.8"
target
.
deployment_target
.
should
==
"10.8"
target
.
build_settings
(
'Debug'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.8"
target
.
build_settings
(
'Debug'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.8"
target
.
build_settings
(
'AppStore'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.8"
end
end
it
"adds the user's build configurations to the target"
do
it
"adds the user's build configurations to the target"
do
@pod_target
.
user_build_configurations
.
merge!
({
'AppStore'
=>
:release
,
'Test'
=>
:debug
})
@installer
.
install!
@installer
.
install!
@project
.
targets
.
first
.
build_configurations
.
map
(
&
:name
).
sort
.
should
==
%w{ AppStore Debug Release Test }
@project
.
targets
.
first
.
build_configurations
.
map
(
&
:name
).
sort
.
should
==
%w{ AppStore Debug Release Test }
end
end
...
@@ -88,7 +78,7 @@ module Pod
...
@@ -88,7 +78,7 @@ module Pod
it
"it creates different hash instances for the build settings of various build configurations"
do
it
"it creates different hash instances for the build settings of various build configurations"
do
@installer
.
install!
@installer
.
install!
build_settings
=
@project
.
targets
.
first
.
build_configurations
.
map
(
&
:build_settings
)
build_settings
=
@project
.
targets
.
first
.
build_configurations
.
map
(
&
:build_settings
)
build_settings
.
map
(
&
:object_id
).
uniq
.
count
.
should
==
4
build_settings
.
map
(
&
:object_id
).
uniq
.
count
.
should
==
2
end
end
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
...
...
spec/unit/installer/target_installer_spec.rb
View file @
1f5d4f0e
...
@@ -9,7 +9,7 @@ module Pod
...
@@ -9,7 +9,7 @@ module Pod
xcodeproj
'dummy'
xcodeproj
'dummy'
end
end
@target_definition
=
@podfile
.
target_definitions
[
'Pods'
]
@target_definition
=
@podfile
.
target_definitions
[
'Pods'
]
@project
=
Project
.
new
(
config
.
sandbox
,
nil
)
@project
=
Project
.
new
(
config
.
sandbox
)
config
.
sandbox
.
project
=
@project
config
.
sandbox
.
project
=
@project
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
...
...
spec/unit/installer/user_project_integrator_spec.rb
View file @
1f5d4f0e
...
@@ -16,7 +16,7 @@ module Pod
...
@@ -16,7 +16,7 @@ module Pod
end
end
end
end
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
,
nil
)
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
)
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
)
@library
=
AggregateTarget
.
new
(
@podfile
.
target_definitions
[
'Pods'
],
config
.
sandbox
)
@library
.
client_root
=
sample_project_path
.
dirname
@library
.
client_root
=
sample_project_path
.
dirname
...
...
spec/unit/project_spec.rb
View file @
1f5d4f0e
...
@@ -4,7 +4,7 @@ module Pod
...
@@ -4,7 +4,7 @@ module Pod
describe
Project
do
describe
Project
do
before
do
before
do
@project
=
Project
.
new
(
config
.
sandbox
,
nil
)
@project
=
Project
.
new
(
config
.
sandbox
)
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