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
ddc58eb2
Commit
ddc58eb2
authored
Feb 23, 2016
by
Boris Bügling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix repo lint for path arguments
parent
b5813f3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
lint.rb
lib/cocoapods/command/repo/lint.rb
+9
-5
lint_spec.rb
spec/functional/command/repo/lint_spec.rb
+6
-0
No files found.
lib/cocoapods/command/repo/lint.rb
View file @
ddc58eb2
...
...
@@ -35,16 +35,20 @@ module Pod
#
def
run
if
@name
sources
=
SourcesManager
.
sources
([
@name
])
if
File
.
exist?
(
@name
)
sources
=
[
Pathname
.
new
(
@name
)]
else
sources
=
SourcesManager
.
sources
([
@name
]).
map
(
&
:repo
)
end
else
sources
=
SourcesManager
.
aggregate
.
sources
sources
=
SourcesManager
.
aggregate
.
sources
.
map
(
&
:repo
)
end
sources
.
each
do
|
source
|
SourcesManager
.
check_version_information
(
source
.
repo
)
UI
.
puts
"
\n
Linting spec repo `
#{
source
.
repo
.
basename
}
`
\n
"
.
yellow
SourcesManager
.
check_version_information
(
source
)
UI
.
puts
"
\n
Linting spec repo `
#{
source
.
basename
}
`
\n
"
.
yellow
validator
=
Source
::
HealthReporter
.
new
(
source
.
repo
)
validator
=
Source
::
HealthReporter
.
new
(
source
)
validator
.
pre_check
do
|
_name
,
_version
|
UI
.
print
'.'
end
...
...
spec/functional/command/repo/lint_spec.rb
View file @
ddc58eb2
...
...
@@ -17,6 +17,12 @@ module Pod
lambda
{
run_command
(
'repo'
,
'lint'
,
repo
)
}.
should
.
not
.
raise
end
it
'lints a repository by relative path'
do
repo
=
fixture
(
'spec-repos/test_repo'
)
repo
=
repo
.
relative_path_from
(
SpecHelper
.
temporary_directory
).
to_s
lambda
{
run_command
(
'repo'
,
'lint'
,
repo
)
}.
should
.
not
.
raise
end
it
'raises when there is no repository with given name'
do
repo
=
fixture
(
'spec-repos/not_existing_repo'
).
to_s
e
=
lambda
{
run_command
(
'repo'
,
'lint'
,
repo
)
}.
should
.
raise
Informative
...
...
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