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
0bb08032
Commit
0bb08032
authored
Mar 04, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make all specs green again.
parent
7b46404a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
23 deletions
+35
-23
.travis.yml
.travis.yml
+1
-1
Rakefile
Rakefile
+0
-6
dependency.rb
lib/cocoapods/dependency.rb
+8
-6
downloader.rb
lib/cocoapods/downloader.rb
+1
-0
integration_spec.rb
spec/integration_spec.rb
+25
-10
No files found.
.travis.yml
View file @
0bb08032
...
@@ -3,4 +3,4 @@ rvm:
...
@@ -3,4 +3,4 @@ rvm:
-
1.8.7
-
1.8.7
-
1.9.3
-
1.9.3
before_install
:
git submodule update --init && cd external/Xcodeproj && rake travis:install_opencflite_debs && sudo apt-get install subversion
before_install
:
git submodule update --init && cd external/Xcodeproj && rake travis:install_opencflite_debs && sudo apt-get install subversion
script
:
cd ../.. && bundle exec rake spec
:travis
script
:
cd ../.. && bundle exec rake spec
Rakefile
View file @
0bb08032
...
@@ -81,12 +81,6 @@ namespace :spec do
...
@@ -81,12 +81,6 @@ namespace :spec do
Rake
::
Task
[
'examples:build'
].
invoke
Rake
::
Task
[
'examples:build'
].
invoke
end
end
# For now we don't run the intgration spec, but it should be cleaned up so it can run on Travis.
desc
"Run the travis CI specs"
task
:travis
=>
"ext:cleanbuild"
do
sh
"bacon
#{
FileList
[
'spec/{functional,unit}/**/*_spec.rb'
].
join
(
' '
)
}
"
end
desc
"Rebuild all the fixture tarballs"
desc
"Rebuild all the fixture tarballs"
task
:rebuild_fixture_tarballs
do
task
:rebuild_fixture_tarballs
do
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
...
...
lib/cocoapods/dependency.rb
View file @
0bb08032
...
@@ -157,25 +157,27 @@ module Pod
...
@@ -157,25 +157,27 @@ module Pod
end
end
def
description
def
description
"from
'
#{
@params
[
:git
]
}
'"
.
tap
do
|
description
|
"from
`
#{
@params
[
:git
]
}
'"
.
tap
do
|
description
|
description
<<
", commit `
#{
@params
[
:commit
]
}
'"
if
@params
[
:commit
]
description
<<
", commit `
#{
@params
[
:commit
]
}
'"
if
@params
[
:commit
]
description
<<
", tag `
#{
@params
[
:tag
]
}
'"
if
@params
[
:tag
]
description
<<
", tag `
#{
@params
[
:tag
]
}
'"
if
@params
[
:tag
]
end
end
end
end
end
end
# can be http, file, etc
class
PodspecSource
<
AbstractExternalSource
class
PodspecSource
<
AbstractExternalSource
def
copy_external_source_into_sandbox
(
sandbox
)
def
copy_external_source_into_sandbox
(
sandbox
)
output_path
=
sandbox
.
root
+
"Local Podspecs/
#{
name
}
.podspec"
output_path
=
sandbox
.
root
+
"Local Podspecs/
#{
name
}
.podspec"
podspec_url
=
@params
[
:podspec
]
# can be http, file, etc
output_path
.
dirname
.
mkpath
puts
" * Fetching podspec for `
#{
name
}
' from:
#{
podspec_url
}
"
unless
Config
.
instance
.
silent?
puts
" * Fetching podspec for `
#{
name
}
' from:
#{
@params
[
:podspec
]
}
"
unless
Config
.
instance
.
silent?
open
(
source
)
do
|
io
|
open
(
@params
[
:podspec
]
)
do
|
io
|
output_path
.
open
(
'w'
)
{
|
f
|
f
<<
io
.
read
}
output_path
.
open
(
'w'
)
{
|
f
|
f
<<
io
.
read
}
end
end
end
end
def
description
def
description
version
<<
"from '
#{
source
[
:podspec
]
}
'"
# TODO did we have a version number here too before?
"from `
#{
@params
[
:podspec
]
}
'"
end
end
end
end
end
end
...
...
lib/cocoapods/downloader.rb
View file @
0bb08032
...
@@ -26,6 +26,7 @@ module Pod
...
@@ -26,6 +26,7 @@ module Pod
private
private
def
self
.
for_target
(
target_path
,
options
)
def
self
.
for_target
(
target_path
,
options
)
options
=
options
.
dup
if
url
=
options
.
delete
(
:git
)
if
url
=
options
.
delete
(
:git
)
Git
.
new
(
target_path
,
url
,
options
)
Git
.
new
(
target_path
,
url
,
options
)
elsif
url
=
options
.
delete
(
:hg
)
elsif
url
=
options
.
delete
(
:hg
)
...
...
spec/integration_spec.rb
View file @
0bb08032
require
File
.
expand_path
(
'../spec_helper'
,
__FILE__
)
require
File
.
expand_path
(
'../spec_helper'
,
__FILE__
)
require
'yaml'
require
'yaml'
# TODO Make specs faster by limiting remote network connections
module
SpecHelper
module
SpecHelper
class
Installer
<
Pod
::
Installer
class
Installer
<
Pod
::
Installer
# Here we override the `source' of the pod specifications to point to the integration fixtures.
# Here we override the `source' of the pod specifications to point to the integration fixtures.
...
@@ -45,6 +47,15 @@ else
...
@@ -45,6 +47,15 @@ else
Pod
::
Config
.
instance
=
@config_before
Pod
::
Config
.
instance
=
@config_before
end
end
# This is so we can run at least the specs that don't use xcodebuild on Travis.
def
with_xcodebuild_available
unless
`which xcodebuild`
.
strip
.
empty?
yield
else
puts
"
\n
[!] Skipping xcodebuild, because it can't be found."
end
end
def
should_successfully_perform
(
command
)
def
should_successfully_perform
(
command
)
output
=
`
#{
command
}
2>&1`
output
=
`
#{
command
}
2>&1`
puts
output
unless
$?
.
success?
puts
output
unless
$?
.
success?
...
@@ -193,9 +204,11 @@ else
...
@@ -193,9 +204,11 @@ else
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
Xcodeproj
.
read_plist
(
project_file
).
should
==
installer
.
project
.
to_hash
Xcodeproj
.
read_plist
(
project_file
).
should
==
installer
.
project
.
to_hash
puts
"
\n
[!] Compiling static library..."
with_xcodebuild_available
do
Dir
.
chdir
(
config
.
project_pods_root
)
do
puts
"
\n
[!] Compiling static library..."
should_successfully_perform
"xcodebuild"
Dir
.
chdir
(
config
.
project_pods_root
)
do
should_successfully_perform
"xcodebuild"
end
end
end
end
end
...
@@ -297,13 +310,15 @@ else
...
@@ -297,13 +310,15 @@ else
(
root
+
'Pods-debug-resources.sh'
).
should
.
exist
(
root
+
'Pods-debug-resources.sh'
).
should
.
exist
(
root
+
'Pods-test-resources.sh'
).
should
.
exist
(
root
+
'Pods-test-resources.sh'
).
should
.
exist
Dir
.
chdir
(
config
.
project_pods_root
)
do
with_xcodebuild_available
do
puts
"
\n
[!] Compiling static library `Pods'..."
Dir
.
chdir
(
config
.
project_pods_root
)
do
should_successfully_perform
"xcodebuild -target Pods"
puts
"
\n
[!] Compiling static library `Pods'..."
puts
"
\n
[!] Compiling static library `Pods-debug'..."
should_successfully_perform
"xcodebuild -target Pods"
should_successfully_perform
"xcodebuild -target Pods-debug"
puts
"
\n
[!] Compiling static library `Pods-debug'..."
puts
"
\n
[!] Compiling static library `Pods-test'..."
should_successfully_perform
"xcodebuild -target Pods-debug"
should_successfully_perform
"xcodebuild -target Pods-test"
puts
"
\n
[!] Compiling static library `Pods-test'..."
should_successfully_perform
"xcodebuild -target Pods-test"
end
end
end
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