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
da1fcacc
Commit
da1fcacc
authored
Nov 20, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the specs run with the addition of a new Reachability version.
parent
b842655c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
32 deletions
+40
-32
master
spec/fixtures/spec-repos/master
+1
-1
command_spec.rb
spec/functional/command_spec.rb
+2
-2
integration_spec.rb
spec/integration_spec.rb
+19
-14
installer_spec.rb
spec/unit/installer_spec.rb
+5
-4
resolver_spec.rb
spec/unit/resolver_spec.rb
+13
-11
No files found.
master
@
49cb8823
Subproject commit
a0a6f17c205e76074384af2dbcc18796eff40ce0
Subproject commit
49cb88232dc6547bfc9751521a38889ec9f9f803
spec/functional/command_spec.rb
View file @
da1fcacc
...
...
@@ -78,8 +78,8 @@ describe "Pod::Command" do
it
"searches for a pod with name, summary, or description matching the given query ignoring case"
do
[
[
'systemCONfiguration'
,
%w{ Reachablity }
],
[
'is'
,
%w{ ASIHTTPRequest Reachablity SSZipArchive }
],
[
'systemCONfiguration'
,
%w{ Reachab
i
lity }
],
[
'is'
,
%w{ ASIHTTPRequest Reachab
i
lity SSZipArchive }
],
].
each
do
|
query
,
results
|
command
=
Pod
::
Command
.
parse
(
'search'
,
'--silent'
,
'--full'
,
query
)
def
command
.
puts
(
msg
=
''
)
...
...
spec/integration_spec.rb
View file @
da1fcacc
...
...
@@ -156,6 +156,7 @@ else
config
.
rootspec
=
self
self
.
platform
platform
dependency
'Reachability'
,
'< 2.0.5'
if
platform
==
:ios
dependency
'ASIWebPageRequest'
,
'>= 1.8.1'
dependency
'JSONKit'
,
'>= 1.0'
dependency
'SSZipArchive'
,
'< 2'
...
...
@@ -175,11 +176,13 @@ else
'DEPENDENCIES'
=>
[
"ASIWebPageRequest (>= 1.8.1)"
,
"JSONKit (>= 1.0)"
,
"Reachability (< 2.0.5)"
,
"SSZipArchive (< 2)"
,
]
}
unless
platform
==
:ios
# No Reachability is required by ASIHTTPRequest on OSX
lock_file_contents
[
'DEPENDENCIES'
].
delete_at
(
2
)
lock_file_contents
[
'PODS'
].
delete_at
(
3
)
lock_file_contents
[
'PODS'
][
0
]
=
'ASIHTTPRequest (1.8.1)'
end
...
...
@@ -196,23 +199,25 @@ else
end
end
it
"does not activate pods that are only part of other pods"
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
if
platform
==
:ios
it
"does not activate pods that are only part of other pods"
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
dependency
'Reachability'
end
self
.
platform
platform
dependency
'Reachability'
,
'2.0.4'
# only 2.0.4 is part of ASIHTTPRequest’s source.
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
YAML
.
load
(
installer
.
lock_file
.
read
).
should
==
{
'PODS'
=>
[{
'Reachability (2.0.4)'
=>
[
"ASIHTTPRequest (>= 1.8)"
]
}],
'DOWNLOAD_ONLY'
=>
[
"ASIHTTPRequest (1.8.1)"
],
'DEPENDENCIES'
=>
[
"Reachability"
]
}
YAML
.
load
(
installer
.
lock_file
.
read
).
should
==
{
'PODS'
=>
[{
'Reachability (2.0.4)'
=>
[
"ASIHTTPRequest (>= 1.8)"
]
}],
'DOWNLOAD_ONLY'
=>
[
"ASIHTTPRequest (1.8.1)"
],
'DEPENDENCIES'
=>
[
"Reachability (= 2.0.4)"
]
}
end
end
it
"adds resources to the xcode copy script"
do
...
...
spec/unit/installer_spec.rb
View file @
da1fcacc
...
...
@@ -25,8 +25,6 @@ describe "Pod::Installer" do
config
.
silent
=
true
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
project_pods_root
=
fixture
(
'integration'
)
def
config
.
ios?
;
true
;
end
def
config
.
osx?
;
false
;
end
end
after
do
...
...
@@ -34,12 +32,13 @@ describe "Pod::Installer" do
end
it
"generates a BridgeSupport metadata file from all the pod headers"
do
spec
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:osx
dependency
'ASIHTTPRequest'
end
config
.
rootspec
=
podfile
expected
=
[]
installer
=
Pod
::
Installer
.
new
(
spec
)
installer
=
Pod
::
Installer
.
new
(
podfile
)
installer
.
build_specifications
.
each
do
|
spec
|
spec
.
header_files
.
each
do
|
header
|
expected
<<
config
.
project_pods_root
+
header
...
...
@@ -55,6 +54,7 @@ describe "Pod::Installer" do
dependency
'JSONKit'
end
end
config
.
rootspec
=
podfile
installer
=
Pod
::
Installer
.
new
(
podfile
)
installer
.
target_installers
.
map
(
&
:definition
).
map
(
&
:name
).
should
==
[
:not_empty
]
end
...
...
@@ -64,6 +64,7 @@ describe "Pod::Installer" do
platform
:osx
dependency
'ASIHTTPRequest'
end
config
.
rootspec
=
podfile
installer
=
Pod
::
Installer
.
new
(
podfile
)
installer
.
target_installers
.
first
.
install!
phases
=
installer
.
project
.
targets
.
first
.
buildPhases
...
...
spec/unit/resolver_spec.rb
View file @
da1fcacc
...
...
@@ -22,12 +22,16 @@ end
describe
"Pod::Resolver"
do
before
do
Pod
::
Spec
::
Set
.
reset!
@config_before
=
config
Pod
::
Config
.
instance
=
nil
config
.
silent
=
true
config
.
repos_dir
=
fixture
(
'spec-repos'
)
def
config
.
ios?
;
true
;
end
def
config
.
osx?
;
false
;
end
@podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
dependency
'ASIWebPageRequest'
end
config
.
rootspec
=
@podfile
end
after
do
...
...
@@ -39,31 +43,29 @@ describe "Pod::Resolver" do
sets
<<
Pod
::
Spec
::
Set
.
by_pod_dir
(
fixture
(
'spec-repos/master/Reachability'
))
sets
<<
Pod
::
Spec
::
Set
.
by_pod_dir
(
fixture
(
'spec-repos/master/ASIHTTPRequest'
))
sets
<<
Pod
::
Spec
::
Set
.
by_pod_dir
(
fixture
(
'spec-repos/master/ASIWebPageRequest'
))
resolver
=
Pod
::
Resolver
.
new
(
Pod
::
Spec
.
new
{
|
s
|
s
.
dependency
'ASIWebPageRequest'
}
)
resolver
=
Pod
::
Resolver
.
new
(
@podfile
)
resolver
.
resolve
.
sort_by
(
&
:name
).
should
==
sets
.
sort_by
(
&
:name
)
end
it
"does not raise if all dependencies match the platform of the root spec (Podfile)"
do
spec
=
Pod
::
Spec
.
new
{
|
s
|
s
.
dependency
'ASIWebPageRequest'
}
resolver
=
Pod
::
Resolver
.
new
(
spec
)
resolver
=
Pod
::
Resolver
.
new
(
@podfile
)
spec
.
platform
=
:ios
@podfile
.
platform
:ios
lambda
{
resolver
.
resolve
}.
should
.
not
.
raise
spec
.
platform
=
:osx
@podfile
.
platform
:osx
lambda
{
resolver
.
resolve
}.
should
.
not
.
raise
end
it
"raises once any of the dependencies does not match the platform of the root spec (Podfile)"
do
spec
=
Pod
::
Spec
.
new
{
|
s
|
s
.
dependency
'ASIWebPageRequest'
}
resolver
=
StubbedResolver
.
new
(
spec
)
resolver
=
StubbedResolver
.
new
(
config
.
rootspec
)
spec
.
platform
=
:ios
@podfile
.
platform
:ios
resolver
.
stub_platform
=
:ios
lambda
{
resolver
.
resolve
}.
should
.
not
.
raise
resolver
.
stub_platform
=
:osx
lambda
{
resolver
.
resolve
}.
should
.
raise
Pod
::
Informative
spec
.
platform
=
:osx
@podfile
.
platform
:osx
resolver
.
stub_platform
=
:osx
lambda
{
resolver
.
resolve
}.
should
.
not
.
raise
resolver
.
stub_platform
=
:ios
...
...
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