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
0d387594
Commit
0d387594
authored
Nov 24, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ExternalSources] Clean-up and docs.
parent
48fdc200
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
15 deletions
+42
-15
external_sources.rb
lib/cocoapods/external_sources.rb
+0
-0
external_sources_spec.rb
spec/unit/external_sources_spec.rb
+42
-15
No files found.
lib/cocoapods/external_sources.rb
View file @
0d387594
This diff is collapsed.
Click to expand it.
spec/unit/external_sources_spec.rb
View file @
0d387594
...
@@ -2,39 +2,66 @@ require File.expand_path('../../spec_helper', __FILE__)
...
@@ -2,39 +2,66 @@ require File.expand_path('../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
ExternalSources
do
describe
ExternalSources
do
before
do
it
"returns the instance of appropriate concrete class according to the parameters"
do
@sandbox
=
temporary_sandbox
git
=
Dependency
.
new
(
"Reachability"
,
:git
=>
nil
)
podspec
=
Dependency
.
new
(
"Reachability"
,
:podspec
=>
nil
)
local
=
Dependency
.
new
(
"Reachability"
,
:local
=>
nil
)
ExternalSources
.
from_dependency
(
git
).
class
.
should
==
ExternalSources
::
GitSource
ExternalSources
.
from_dependency
(
podspec
).
class
.
should
==
ExternalSources
::
PodspecSource
ExternalSources
.
from_dependency
(
local
).
class
.
should
==
ExternalSources
::
LocalSource
end
end
describe
ExternalSources
::
AbstractExternalSource
do
xit
"returns the name"
do
end
xit
"returns the params"
do
end
xit
"returns the compares to another"
do
end
xit
"returns the specification"
do
end
xit
"returns the specification from the sandbox if available"
do
end
xit
"returns the specification fetching it from the external source"
do
end
end
end
it
"marks a LocalPod as downloaded if it's from GitSource"
do
describe
ExternalSources
::
GitSource
do
it
"creates a copy of the podspec"
do
dependency
=
Dependency
.
new
(
"Reachability"
,
:git
=>
fixture
(
'integration/Reachability'
))
dependency
=
Dependency
.
new
(
"Reachability"
,
:git
=>
fixture
(
'integration/Reachability'
))
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
.
copy_external_source_into_sandbox
(
@sandbox
,
Platform
.
ios
)
external_source
.
copy_external_source_into_sandbox
(
config
.
sandbox
,
Platform
.
ios
)
@sandbox
.
installed_pod_named
(
'Reachability'
,
Platform
.
ios
).
downloaded
.
should
.
be
.
true
path
=
config
.
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
.
should
.
exist?
end
end
it
"
creates a copy of the podspec (GitSource)
"
do
it
"
marks a LocalPod as downloaded
"
do
dependency
=
Dependency
.
new
(
"Reachability"
,
:git
=>
fixture
(
'integration/Reachability'
))
dependency
=
Dependency
.
new
(
"Reachability"
,
:git
=>
fixture
(
'integration/Reachability'
))
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
.
copy_external_source_into_sandbox
(
@sandbox
,
Platform
.
ios
)
external_source
.
copy_external_source_into_sandbox
(
config
.
sandbox
,
Platform
.
ios
)
path
=
@sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
config
.
sandbox
.
installed_pod_named
(
'Reachability'
,
Platform
.
ios
).
downloaded
.
should
.
be
.
true
path
.
should
.
exist?
end
end
it
"creates a copy of the podspec (PodspecSource)"
do
xit
"returns the description"
do
end
end
describe
ExternalSources
::
PodspecSource
do
it
"creates a copy of the podspec"
do
dependency
=
Dependency
.
new
(
"Reachability"
,
:podspec
=>
fixture
(
'integration/Reachability/Reachability.podspec'
).
to_s
)
dependency
=
Dependency
.
new
(
"Reachability"
,
:podspec
=>
fixture
(
'integration/Reachability/Reachability.podspec'
).
to_s
)
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
.
copy_external_source_into_sandbox
(
@
sandbox
,
Platform
.
ios
)
external_source
.
copy_external_source_into_sandbox
(
config
.
sandbox
,
Platform
.
ios
)
path
=
@
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
=
config
.
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
.
should
.
exist?
path
.
should
.
exist?
end
end
it
"creates a copy of the podspec (LocalSource)"
do
xit
"returns the description"
do
end
end
describe
ExternalSources
::
LocalSource
do
it
"creates a copy of the podspec"
do
dependency
=
Dependency
.
new
(
"Reachability"
,
:local
=>
fixture
(
'integration/Reachability'
))
dependency
=
Dependency
.
new
(
"Reachability"
,
:local
=>
fixture
(
'integration/Reachability'
))
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
=
ExternalSources
.
from_dependency
(
dependency
)
external_source
.
copy_external_source_into_sandbox
(
@
sandbox
,
Platform
.
ios
)
external_source
.
copy_external_source_into_sandbox
(
config
.
sandbox
,
Platform
.
ios
)
path
=
@
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
=
config
.
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
.
should
.
exist?
path
.
should
.
exist?
end
end
xit
"returns the description"
do
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