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
1f47b8af
Commit
1f47b8af
authored
Sep 08, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests. Improve validation xcodebuild command spaced path handling
parent
8a812059
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
validator.rb
lib/cocoapods/validator.rb
+1
-1
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+9
-3
validator_spec.rb
spec/unit/validator_spec.rb
+1
-1
No files found.
lib/cocoapods/validator.rb
View file @
1f47b8af
...
@@ -718,7 +718,7 @@ module Pod
...
@@ -718,7 +718,7 @@ module Pod
#
#
def
xcodebuild
def
xcodebuild
require
'fourflusher'
require
'fourflusher'
command
=
%W(clean build -workspace
#{
validation_dir
}
/App.xcworkspace -scheme App -configuration Release)
command
=
[
'clean'
,
'build'
,
'-workspace'
,
File
.
join
(
validation_dir
,
'App.xcworkspace'
),
'-scheme'
,
'App'
,
'-configuration'
,
'Release'
]
case
consumer
.
platform_name
case
consumer
.
platform_name
when
:ios
when
:ios
command
+=
%w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator)
command
+=
%w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator)
...
...
spec/unit/sources_manager_spec.rb
View file @
1f47b8af
...
@@ -90,7 +90,9 @@ module Pod
...
@@ -90,7 +90,9 @@ module Pod
it
'updates source backed by a git repository'
do
it
'updates source backed by a git repository'
do
set_up_test_repo_for_update
set_up_test_repo_for_update
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%w(pull --ff-only)
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
options
.
join
(
' '
).
should
.
equal
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
end
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
end
end
...
@@ -105,8 +107,12 @@ module Pod
...
@@ -105,8 +107,12 @@ module Pod
set_up_test_repo_for_update
set_up_test_repo_for_update
test_repo_path
.
join
(
'.git'
,
'shallow'
).
open
(
'w'
)
{
|
f
|
f
<<
'a'
*
40
}
test_repo_path
.
join
(
'.git'
,
'shallow'
).
open
(
'w'
)
{
|
f
|
f
<<
'a'
*
40
}
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%w(fetch --unshallow)
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%w(pull --ff-only)
)
options
.
join
(
' '
).
should
.
equal
%W(-C
#{
test_repo_path
}
fetch --unshallow)
.
join
(
' '
)
end
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
options
.
join
(
' '
).
should
.
equal
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
end
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
UI
.
output
.
should
.
match
/deep fetch.+`master`.+improve future performance/
UI
.
output
.
should
.
match
/deep fetch.+`master`.+improve future performance/
...
...
spec/unit/validator_spec.rb
View file @
1f47b8af
...
@@ -435,7 +435,7 @@ module Pod
...
@@ -435,7 +435,7 @@ module Pod
Executable
.
stubs
(
:capture_command
).
with
(
'git'
,
[
'config'
,
'--get'
,
'remote.origin.url'
],
:capture
=>
:out
).
returns
([
'https://github.com/CocoaPods/Specs.git'
])
Executable
.
stubs
(
:capture_command
).
with
(
'git'
,
[
'config'
,
'--get'
,
'remote.origin.url'
],
:capture
=>
:out
).
returns
([
'https://github.com/CocoaPods/Specs.git'
])
Executable
.
stubs
(
:which
).
with
(
:xcrun
)
Executable
.
stubs
(
:which
).
with
(
:xcrun
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
command
=
%w(clean build -workspace App.xcworkspace -scheme App -configuration Release)
command
=
[
'clean'
,
'build'
,
'-workspace'
,
File
.
join
(
validator
.
validation_dir
,
'App.xcworkspace'
),
'-scheme'
,
'App'
,
'-configuration'
,
'Release'
]
Executable
.
expects
(
:capture_command
).
with
(
'xcodebuild'
,
command
,
:capture
=>
:merge
).
once
.
returns
([
''
,
stub
(
:success?
=>
true
)])
Executable
.
expects
(
:capture_command
).
with
(
'xcodebuild'
,
command
,
:capture
=>
:merge
).
once
.
returns
([
''
,
stub
(
:success?
=>
true
)])
args
=
%w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator)
+
Fourflusher
::
SimControl
.
new
.
destination
(
'Apple TV 1080p'
)
args
=
%w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator)
+
Fourflusher
::
SimControl
.
new
.
destination
(
'Apple TV 1080p'
)
Executable
.
expects
(
:capture_command
).
with
(
'xcodebuild'
,
command
+
args
,
:capture
=>
:merge
).
once
.
returns
([
''
,
stub
(
:success?
=>
true
)])
Executable
.
expects
(
:capture_command
).
with
(
'xcodebuild'
,
command
+
args
,
:capture
=>
:merge
).
once
.
returns
([
''
,
stub
(
:success?
=>
true
)])
...
...
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