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
c06de172
Commit
c06de172
authored
Aug 26, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Xcodeproj] Rename Project::save_as
parent
3a9f5197
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
28 deletions
+20
-28
Gemfile.lock
Gemfile.lock
+1
-1
installer.rb
lib/cocoapods/installer.rb
+1
-1
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+1
-9
init_spec.rb
spec/functional/command/init_spec.rb
+14
-14
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+1
-1
user_project_integrator_spec.rb
spec/unit/installer/user_project_integrator_spec.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+1
-1
No files found.
Gemfile.lock
View file @
c06de172
...
@@ -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:
00c89436cd64b9e26db60fcf8ca99dbd62b01b58
revision:
230cd26ab0c73c70e6017458a8eea920e5f76233
branch: paths-refactor
branch: paths-refactor
specs:
specs:
xcodeproj (0.9.0)
xcodeproj (0.9.0)
...
...
lib/cocoapods/installer.rb
View file @
c06de172
...
@@ -377,7 +377,7 @@ module Pod
...
@@ -377,7 +377,7 @@ module Pod
UI
.
message
"- Writing Xcode project file to
#{
UI
.
path
sandbox
.
project_path
}
"
do
UI
.
message
"- Writing Xcode project file to
#{
UI
.
path
sandbox
.
project_path
}
"
do
pods_project
.
main_group
.
sort_by_type!
pods_project
.
main_group
.
sort_by_type!
pods_project
[
'Frameworks'
].
sort_by_type!
pods_project
[
'Frameworks'
].
sort_by_type!
pods_project
.
save
_as
(
sandbox
.
project_path
)
pods_project
.
save
end
end
end
end
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
c06de172
...
@@ -32,7 +32,7 @@ module Pod
...
@@ -32,7 +32,7 @@ module Pod
add_pods_library
add_pods_library
add_copy_resources_script_phase
add_copy_resources_script_phase
add_check_manifest_lock_script_phase
add_check_manifest_lock_script_phase
save_user_project
user_project
.
save
end
end
end
end
...
@@ -182,14 +182,6 @@ module Pod
...
@@ -182,14 +182,6 @@ module Pod
end
end
end
end
# Saves the changes to the user project to the disk.
#
# @return [void]
#
def
save_user_project
user_project
.
save_as
(
target
.
user_project_path
)
end
#---------------------------------------------------------------------#
#---------------------------------------------------------------------#
# @!group Private helpers.
# @!group Private helpers.
...
...
spec/functional/command/init_spec.rb
View file @
c06de172
...
@@ -17,8 +17,8 @@ module Pod
...
@@ -17,8 +17,8 @@ module Pod
it
"complains if more than one project exists and none is specified"
do
it
"complains if more than one project exists and none is specified"
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
temporary_directory
+
'test1.xcodeproj'
)
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test2.xcodeproj'
).
save
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
temporary_directory
+
'test2.xcodeproj'
)
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test1.xcodeproj'
).
save
lambda
{
run_command
(
'init'
)
}.
should
.
raise
Informative
lambda
{
run_command
(
'init'
)
}.
should
.
raise
Informative
end
end
end
end
...
@@ -26,14 +26,14 @@ module Pod
...
@@ -26,14 +26,14 @@ module Pod
it
"complains if a Podfile already exists"
do
it
"complains if a Podfile already exists"
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
(
Pathname
.
pwd
+
'Podfile'
).
open
(
'w'
)
{
|
f
|
f
<<
"pod 'AFNetworking'"
}
(
Pathname
.
pwd
+
'Podfile'
).
open
(
'w'
)
{
|
f
|
f
<<
"pod 'AFNetworking'"
}
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
temporary_directory
+
'test1.xcodeproj'
)
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test1.xcodeproj'
).
save
lambda
{
run_command
(
'init'
)
}.
should
.
raise
Informative
lambda
{
run_command
(
'init'
)
}.
should
.
raise
Informative
end
end
end
end
it
"creates a Podfile for a project in current directory"
do
it
"creates a Podfile for a project in current directory"
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
temporary_directory
+
'test1.xcodeproj'
)
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test1.xcodeproj'
).
save
run_command
(
'init'
)
run_command
(
'init'
)
Pathname
.
new
(
temporary_directory
+
'Podfile'
).
exist?
.
should
==
true
Pathname
.
new
(
temporary_directory
+
'Podfile'
).
exist?
.
should
==
true
end
end
...
@@ -41,8 +41,8 @@ module Pod
...
@@ -41,8 +41,8 @@ module Pod
it
"creates a Podfile for a specified project"
do
it
"creates a Podfile for a specified project"
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
temporary_directory
+
'test1.xcodeproj'
)
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test1.xcodeproj'
).
save
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
temporary_directory
+
'test2.xcodeproj'
)
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test2.xcodeproj'
).
save
run_command
(
'init'
,
'test2.xcodeproj'
)
run_command
(
'init'
,
'test2.xcodeproj'
)
Pathname
.
new
(
temporary_directory
+
'Podfile'
).
exist?
.
should
==
true
Pathname
.
new
(
temporary_directory
+
'Podfile'
).
exist?
.
should
==
true
config
.
podfile
.
nil?
.
should
==
false
config
.
podfile
.
nil?
.
should
==
false
...
@@ -51,10 +51,10 @@ module Pod
...
@@ -51,10 +51,10 @@ module Pod
it
"creates a Podfile with targets from the project"
do
it
"creates a Podfile with targets from the project"
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
project
=
Xcodeproj
::
Project
.
new
(
'path
'
)
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj
'
)
target1
=
project
.
new_target
(
:application
,
"AppA"
,
:ios
)
target1
=
project
.
new_target
(
:application
,
"AppA"
,
:ios
)
target2
=
project
.
new_target
(
:application
,
"AppB"
,
:ios
)
target2
=
project
.
new_target
(
:application
,
"AppB"
,
:ios
)
project
.
save
_as
(
temporary_directory
+
'test.xcodeproj'
)
project
.
save
run_command
(
'init'
)
run_command
(
'init'
)
...
@@ -73,9 +73,9 @@ module Pod
...
@@ -73,9 +73,9 @@ module Pod
open
(
config
.
default_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'AFNetworking'"
}
open
(
config
.
default_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'AFNetworking'"
}
project
=
Xcodeproj
::
Project
.
new
(
'path
'
)
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj
'
)
project
.
new_target
(
:application
,
'AppA'
,
:ios
)
project
.
new_target
(
:application
,
'AppA'
,
:ios
)
project
.
save
_as
(
temporary_directory
+
'test.xcodeproj'
)
project
.
save
run_command
(
'init'
)
run_command
(
'init'
)
...
@@ -92,9 +92,9 @@ module Pod
...
@@ -92,9 +92,9 @@ module Pod
open
(
config
.
default_test_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'Kiwi'"
}
open
(
config
.
default_test_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'Kiwi'"
}
project
=
Xcodeproj
::
Project
.
new
(
'path
'
)
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj
'
)
project
.
new_target
(
:application
,
"AppTests"
,
:ios
)
project
.
new_target
(
:application
,
"AppTests"
,
:ios
)
project
.
save
_as
(
temporary_directory
+
'test.xcodeproj'
)
project
.
save
run_command
(
'init'
)
run_command
(
'init'
)
...
@@ -111,9 +111,9 @@ module Pod
...
@@ -111,9 +111,9 @@ module Pod
open
(
config
.
default_test_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'Kiwi'"
}
open
(
config
.
default_test_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'Kiwi'"
}
project
=
Xcodeproj
::
Project
.
new
(
'path
'
)
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj
'
)
project
.
new_target
(
:application
,
"App"
,
:ios
)
project
.
new_target
(
:application
,
"App"
,
:ios
)
project
.
save
_as
(
temporary_directory
+
'test.xcodeproj'
)
project
.
save
run_command
(
'init'
)
run_command
(
'init'
)
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
c06de172
...
@@ -13,7 +13,7 @@ module Pod
...
@@ -13,7 +13,7 @@ module Pod
before
do
before
do
sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
@sample_project
=
Xcodeproj
::
Project
.
open
(
sample_project_path
)
@sample_project
=
Xcodeproj
::
Project
.
open
(
sample_project_path
)
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
config
.
sandbox
.
project_path
)
Xcodeproj
::
Project
.
new
(
config
.
sandbox
.
project_path
).
save
@target
=
@sample_project
.
targets
.
first
@target
=
@sample_project
.
targets
.
first
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
.
link_with_first_target
=
true
target_definition
.
link_with_first_target
=
true
...
...
spec/unit/installer/user_project_integrator_spec.rb
View file @
c06de172
...
@@ -17,7 +17,7 @@ module Pod
...
@@ -17,7 +17,7 @@ module Pod
end
end
end
end
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
,
nil
)
config
.
sandbox
.
project
=
Project
.
new
(
config
.
sandbox
,
nil
)
Xcodeproj
::
Project
.
new
(
'path'
).
save_as
(
config
.
sandbox
.
project_path
)
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
@library
.
user_project_path
=
sample_project_path
@library
.
user_project_path
=
sample_project_path
...
...
spec/unit/installer_spec.rb
View file @
c06de172
...
@@ -348,7 +348,7 @@ module Pod
...
@@ -348,7 +348,7 @@ module Pod
it
"saves the project to the given path"
do
it
"saves the project to the given path"
do
path
=
temporary_directory
+
'Pods/Pods.xcodeproj'
path
=
temporary_directory
+
'Pods/Pods.xcodeproj'
@installer
.
pods_project
.
expects
(
:save
_as
).
with
(
path
)
@installer
.
pods_project
.
expects
(
:save
)
@installer
.
send
(
:write_pod_project
)
@installer
.
send
(
:write_pod_project
)
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