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
6ca43bce
Commit
6ca43bce
authored
Nov 24, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Added #specification.
parent
dad16075
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
external_sources.rb
lib/cocoapods/external_sources.rb
+3
-6
resolver.rb
lib/cocoapods/resolver.rb
+1
-1
sandbox.rb
lib/cocoapods/sandbox.rb
+1
-1
resolver_spec.rb
spec/unit/resolver_spec.rb
+10
-3
No files found.
lib/cocoapods/external_sources.rb
View file @
6ca43bce
...
...
@@ -66,11 +66,8 @@ module Pod
# sandbox or by fetching the remote source, associated with the
# external source.
#
# TODO: rename to specification.
#
def
specification_from_sandbox
(
sandbox
)
specification_from_local
(
sandbox
)
||
specification_from_external
(
sandbox
)
def
specification
(
sandbox
)
specification_from_local
(
sandbox
)
||
specification_from_external
(
sandbox
)
end
# @return [Specification] returns the specification associated with the
...
...
@@ -267,7 +264,7 @@ module Pod
path
=
Pathname
.
new
(
@params
[
:local
]).
expand_path
path
+=
"
#{
name
}
.podspec"
# unless path.to_s.include?("#{name}.podspec")
unless
path
.
exist?
raise
Informative
,
"No podspec found for `
#{
name
}
` in `
#{
@params
[
:local
]
}
`"
raise
Informative
,
"No podspec found for `
#{
name
}
` in `
#{
@params
[
:local
]
}
`"
end
path
end
...
...
lib/cocoapods/resolver.rb
View file @
6ca43bce
...
...
@@ -235,7 +235,7 @@ module Pod
if
update_external_specs
spec
=
source
.
specification_from_external
(
sandbox
)
else
spec
=
source
.
specification
_from_sandbox
(
sandbox
)
spec
=
source
.
specification
(
sandbox
)
end
set
=
Specification
::
Set
::
External
.
new
(
spec
)
set
...
...
lib/cocoapods/sandbox.rb
View file @
6ca43bce
...
...
@@ -131,7 +131,7 @@ module Pod
# @param [String] name
# the name of the Pod for which the specification is requested.
#
# @return [Specification] the specification.
# @return [Specification] the specification
if the file is found
.
#
def
specification
(
name
)
if
file
=
podspec_for_name
(
name
)
...
...
spec/unit/resolver_spec.rb
View file @
6ca43bce
...
...
@@ -64,8 +64,15 @@ module Pod
]
end
xit
"returns the specifications that originated from external sources"
do
it
"it resolves specifications from external sources"
do
podspec
=
fixture
(
'integration/Reachability/Reachability.podspec'
)
podfile
=
Podfile
.
new
do
platform
:ios
pod
"Reachability"
,
:podspec
=>
podspec
end
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
)
resolver
.
resolve
resolver
.
specs
.
map
(
&
:to_s
).
should
==
[
'Reachability (3.0.0)'
]
end
end
...
...
@@ -146,7 +153,7 @@ module Pod
fss
.
subspec
'SecondSubSpec'
end
end
ExternalSources
::
GitSource
.
any_instance
.
stubs
(
:specification
_from_sandbox
).
returns
(
spec
)
ExternalSources
::
GitSource
.
any_instance
.
stubs
(
:specification
).
returns
(
spec
)
resolver
=
Resolver
.
new
(
config
.
sandbox
,
@podfile
)
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:name
).
sort
.
should
==
%w{ MainSpec/FirstSubSpec MainSpec/FirstSubSpec/SecondSubSpec }
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