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
f5133b57
Unverified
Commit
f5133b57
authored
Oct 21, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CocoaPods specs to run on Linux
parent
4ee74e2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
.travis.yml
.travis.yml
+3
-0
validator.rb
lib/cocoapods/validator.rb
+5
-1
info_plist_file_spec.rb
spec/unit/generator/info_plist_file_spec.rb
+1
-1
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+1
-1
validator_spec.rb
spec/unit/validator_spec.rb
+1
-2
No files found.
.travis.yml
View file @
f5133b57
language
:
ruby
cache
:
bundler
cache
:
bundler
matrix
:
matrix
:
...
@@ -37,6 +38,8 @@ before_install:
...
@@ -37,6 +38,8 @@ before_install:
-
if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem update --system; fi
-
if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem update --system; fi
before_script
:
before_script
:
-
git config --global user.email "tests@cocoapods.org"
-
git config --global user.name "CocoaPods Tests"
-
bundle exec pod env
-
bundle exec pod env
script
:
script
:
...
...
lib/cocoapods/validator.rb
View file @
f5133b57
...
@@ -518,7 +518,7 @@ module Pod
...
@@ -518,7 +518,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
build_pod
def
build_pod
if
Executable
.
which
(
'xcodebuild'
).
nil
?
if
!
xcodebuild_available
?
UI
.
warn
"Skipping compilation with `xcodebuild' because it can't be found.
\n
"
.
yellow
UI
.
warn
"Skipping compilation with `xcodebuild' because it can't be found.
\n
"
.
yellow
else
else
UI
.
message
"
\n
Building with xcodebuild.
\n
"
.
yellow
do
UI
.
message
"
\n
Building with xcodebuild.
\n
"
.
yellow
do
...
@@ -549,6 +549,10 @@ module Pod
...
@@ -549,6 +549,10 @@ module Pod
end
end
end
end
def
xcodebuild_available?
!
Executable
.
which
(
'xcodebuild'
).
nil?
end
FILE_PATTERNS
=
%i(source_files resources preserve_paths vendored_libraries
FILE_PATTERNS
=
%i(source_files resources preserve_paths vendored_libraries
vendored_frameworks public_header_files preserve_paths
vendored_frameworks public_header_files preserve_paths
private_header_files resource_bundles)
.
freeze
private_header_files resource_bundles)
.
freeze
...
...
spec/unit/generator/info_plist_file_spec.rb
View file @
f5133b57
...
@@ -56,7 +56,7 @@ module Pod
...
@@ -56,7 +56,7 @@ module Pod
generator
.
save_as
(
file
)
generator
.
save_as
(
file
)
`plutil -lint
#{
file
}
`
`plutil -lint
#{
file
}
`
$?
.
should
.
be
.
success
$?
.
should
.
be
.
success
end
end
if
Executable
.
which
(
'plutil'
)
it
'generates a correct Info.plist file'
do
it
'generates a correct Info.plist file'
do
generator
=
Generator
::
InfoPlistFile
.
new
(
mock
(
'Target'
,
:platform
=>
stub
(
:name
=>
:ios
)))
generator
=
Generator
::
InfoPlistFile
.
new
(
mock
(
'Target'
,
:platform
=>
stub
(
:name
=>
:ios
)))
...
...
spec/unit/sandbox_spec.rb
View file @
f5133b57
...
@@ -84,7 +84,7 @@ module Pod
...
@@ -84,7 +84,7 @@ module Pod
it
'handles symlinks in /tmp'
do
it
'handles symlinks in /tmp'
do
tmp_sandbox
=
Pod
::
Sandbox
.
new
(
'/tmp/CocoaPods'
)
tmp_sandbox
=
Pod
::
Sandbox
.
new
(
'/tmp/CocoaPods'
)
tmp_sandbox
.
root
.
should
.
be
==
Pathname
.
new
(
'/
private/tmp/CocoaPods'
)
tmp_sandbox
.
root
.
should
.
be
==
Pathname
.
new
(
'/
tmp/CocoaPods'
).
realpath
require
'fileutils'
require
'fileutils'
FileUtils
.
rm_rf
(
tmp_sandbox
.
root
)
FileUtils
.
rm_rf
(
tmp_sandbox
.
root
)
end
end
...
...
spec/unit/validator_spec.rb
View file @
f5133b57
...
@@ -17,6 +17,7 @@ module Pod
...
@@ -17,6 +17,7 @@ module Pod
describe
Validator
do
describe
Validator
do
before
do
before
do
Validator
.
any_instance
.
stubs
(
:xcodebuild
).
returns
(
''
)
Validator
.
any_instance
.
stubs
(
:xcodebuild
).
returns
(
''
)
Validator
.
any_instance
.
stubs
(
:xcodebuild_available?
).
returns
(
true
)
end
end
# @return [void]
# @return [void]
...
@@ -413,7 +414,6 @@ module Pod
...
@@ -413,7 +414,6 @@ module Pod
git
=
Executable
.
which
(
:git
)
git
=
Executable
.
which
(
:git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
:xcrun
)
Executable
.
stubs
(
:which
).
with
(
:xcrun
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
status
=
mock
status
=
mock
status
.
stubs
(
:success?
).
returns
(
false
)
status
.
stubs
(
:success?
).
returns
(
false
)
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
...
@@ -434,7 +434,6 @@ module Pod
...
@@ -434,7 +434,6 @@ module Pod
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
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'
)
command
=
[
'clean'
,
'build'
,
'-workspace'
,
File
.
join
(
validator
.
validation_dir
,
'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'
)
...
...
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