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
329f29ba
Commit
329f29ba
authored
Sep 18, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Source] list the name of the repos.
parent
ffe95281
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
source.rb
lib/cocoapods/source.rb
+12
-2
source_spec.rb
spec/unit/source_spec.rb
+4
-0
No files found.
lib/cocoapods/source.rb
View file @
329f29ba
...
...
@@ -2,14 +2,20 @@ module Pod
class
Source
class
Aggregate
def
all
@sources
||=
begin
@sources
||=
dirs
.
map
{
|
repo
|
Source
.
new
(
repo
)
}
end
def
dirs
repos_dir
=
Config
.
instance
.
repos_dir
unless
repos_dir
.
exist?
raise
Informative
,
"No spec repos found in `
#{
repos_dir
}
'. "
\
"To fetch the `master' repo run: $ pod setup"
end
repos_dir
.
children
.
select
(
&
:directory?
).
map
{
|
repo
|
Source
.
new
(
repo
)
}
repos_dir
.
children
.
select
(
&
:directory?
)
end
def
names
dirs
.
map
{
|
repo
|
repo
.
basename
.
to_s
}.
sort
end
def
all_sets
...
...
@@ -48,6 +54,10 @@ module Pod
Aggregate
.
new
.
search_by_name
(
name
,
full_text_search
)
end
def
self
.
names
Aggregate
.
new
.
names
end
attr_reader
:repo
def
initialize
(
repo
)
...
...
spec/unit/source_spec.rb
View file @
329f29ba
...
...
@@ -36,4 +36,8 @@ describe "Pod::Source" do
Pod
::
Source
.
search
(
Pod
::
Dependency
.
new
(
'RestKit/DoesNotExist'
))
}.
should
.
raise
Pod
::
Informative
end
it
"return the names of the repos"
do
Pod
::
Source
.
names
.
should
==
%w| repo1 repo2 |
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